Unable to save cook snapshot

We are attempting to make use of cook snapshots as described in the Unreal doc. We have a custom BuildGraph script we’re using, and I moved over the elements of BuildAndTestProject.xml related to publishing a snapshot into our scripts.

When I attempt to invoke that portion of the script to save to our Shared Zen DDC server ae-zen2, the process fails:

`Running: F:\p4\main\game\Engine\Binaries\Win64\ZenLaunch.exe “F:\p4\main\game\AE\AE.uproject” -SponsorProcessID=142244

LogFileManager: Warning: Failed to open file [C:/Users/tpreston/AppData/Local/UnrealEngine/Common/Zen/Install/zen.link] to read: The system cannot find the file specified.

LogFileManager: Warning: Failed to open file [C:/Users/tpreston/AppData/Local/UnrealEngine/Common/Zen/Install/zen.link] to read: The system cannot find the file specified.

LogZenServiceInstance: Display: Unreal Zen Storage Server HTTP service at [::1]:8558 status: OK!.

Took 1.26s to run ZenLaunch.exe, ExitCode=0

Running: F:\p4\main\game\Engine\Binaries\Win64\zen.exe project-create --hosturl http://ae-zen2:8558 ae.oplog

Took 0.10s to run zen.exe, ExitCode=1

Running: F:\p4\main\game\Engine\Binaries\Win64\zen.exe oplog-export --embedloosefiles --zen http://ae-zen2:8558 --hosturl http://localhost:8558 --target-project ae.oplog --target-oplog unknown_1.7.2.9999.windows AE.41d15ac9 Windows

Took 0.07s to run zen.exe, ExitCode=11

Command failed (Result:11): F:\p4\main\game\Engine\Binaries\Win64\zen.exe oplog-export --embedloosefiles --zen http://ae-zen2:8558 --hosturl http://localhost:8558 --target-project ae.oplog --target-oplog unknown_1.7.2.9999.windows AE.41d15ac9 Windows. See logfile for details: ‘zen-2025.05.11-11.14.52.txt’

Attempt 1 of exporting the oplog failed, retrying…

Running: F:\p4\main\game\Engine\Binaries\Win64\zen.exe oplog-export --embedloosefiles --zen http://ae-zen2:8558 --hosturl http://localhost:8558 --target-project ae.oplog --target-oplog unknown_1.7.2.9999.windows AE.41d15ac9 Windows

Took 0.06s to run zen.exe, ExitCode=11

Command failed (Result:11): F:\p4\main\game\Engine\Binaries\Win64\zen.exe oplog-export --embedloosefiles --zen http://ae-zen2:8558 --hosturl http://localhost:8558 --target-project ae.oplog --target-oplog unknown_1.7.2.9999.windows AE.41d15ac9 Windows. See logfile for details: ‘zen-2025.05.11-11.14.53.txt’`

The logfiles mentioned are not helpful:

`[2025-05-11 11:14:51.575] [warning] Creating zen remote oplog ‘ae.oplog/unknown_1.7.2.9999.windows’

Error: failed creating zen remote oplog: HTTP error 404 Not Found (project ae.oplog not found)`

When I attempt to call the failing Zen.exe command directly with --verbose, I get a little more information:

`[2025-05-11 14:48:11.389] [trace] GET Url: http://localhost:8558/prj, Status: 200, Bytes: 0/347 (Up/Down), Elapsed: 0.001602s

[2025-05-11 14:48:11.391] [trace] GET Url: http://localhost:8558/prj/AE.41d15ac9, Status: 200, Bytes: 0/187 (Up/Down), Elapsed: 0.000398s

[2025-05-11 14:48:11.391] [trace] GET Url: http://localhost:8558/prj/ae.oplog/oplog/unknown_1.7.2.9999.windows, Status: 404, Bytes: 0/26 (Up/Down), Elapsed: 0.000128s, Reponse: ‘project ae.oplog not found’, Reason: ‘Not Found’

[2025-05-11 14:48:11.391] [warning] Creating zen remote oplog ‘ae.oplog/unknown_1.7.2.9999.windows’

[2025-05-11 14:48:11.391] [trace] POST Url: http://localhost:8558/prj/ae.oplog/oplog/unknown_1.7.2.9999.windows, Status: 404, Bytes: 0/26 (Up/Down), Elapsed: 9.7e-05s, Reponse: ‘project ae.oplog not found’, Reason: ‘Not Found’

Error: failed creating zen remote oplog: HTTP error 404 Not Found (project ae.oplog not found)`

So clearly the oplog is not getting created, but I don’t see where in the BuildAndTestProject.xml scripts that’s supposed to happen? Any help would be appreciated.

When you export oplog to another zen instance you first need to create the project on the remote zen instance before uploading the oplog to the same remote zen instance (http://ae-zen2:8558).

This is done via `zen.exe project-create --host http://ae-zen2:8558 --p au.oplog` in your case.

The “export oplog to zen” path is not used inside Epic so testing is not as good as desired, I will have to test this out locally to figure out what goes wrong.

You can use `--force-update` option when creating the project to have it not fail if it exist.

You can explicitly create the project oplog before exporting to it.

zen.exe oplog-create --hosturl http://ae-zen2:8558 --project ae.oplog --oplog unknown_1.7.2.9999.windows --force-updateNote the `--force-update` option here as well.

The oplog must exist before exporting to it in the zen case.

Hello,

I’ve encountered the same issue. The version of zen.exe that is fetched by setup.bat in my environment is 5.5.7.0.

I haven’t checked the source code, so I could be wrong, but I assume there’s some code intended to check whether the project exists on the remote server when executing zen.exe oplog-export. However, it seems to check whether the project exists on the local Zen instance instead.

I tried using the zen.exe version 5.6.7.0 from GitHub, and it works when I run the build graph (without --force-update). So maybe this is a known and already fixed issue. However, I couldn’t find an elegant way to automatically fetch the latest Zen binaries. I had to use a workaround with external scripts.

Version 5.5.7 introduced a regression where you need to manually create the oplog before importing it.

The next release will revert that change but until then you need to explicitly create the oplog before importing into it if you are using zenserver 5.5.7 or later

Release v5.6.8 fixes the regression and creates the oplog automatically.

https://github.com/EpicGames/zen/releases/tag/v5\.6\.8

That was done in the Buildgraph node that I copied from BuildAndTestProject.xml:

`Running: F:\p4\main\game\Engine\Binaries\Win64\zen.exe project-create --hosturl http://ae-zen2:8558 ae.oplog

Took 0.10s to run zen.exe, ExitCode=1`I’m assuming here that the “ExitCode=1” is because the oplog already existed, as an early instance of this operation did return “ExitCode=0”.

Does the oplog need to be created *immediately* before it gets exported? That would explain why my export operation where I invoked it explicitly from the command line failed, but it doesn’t explain why the operation fails when called as part of the Buildgraph script.

Is this also true if we’re trying to use Cloud DDC to store snapshots? What would the parameters to the oplog-create step be in that situation?

Alternatively, is there a more recent version of the exe we can pull from Epic’s P4 that would behave better?