Automated lightmap rebuilding from command line fails

I’m currently working on a script to automate lightmap rebuilding. The command line I’m using for this is

.../UE_4.20/Engine/Binaries/Win64/UE4Editor-Cmd.exe C:\path\to\game.uproject -run=resavepackages -buildlighting -MapsOnly -ProjectOnly -AllowCommandletRendering -log -Map=C:\path\to\game\Content\Maps\Map.umap

and is working as expected usually. However when executing the script from a Jenkins job meaning it is executed from a service process the lighting build fails with the following log message:

[2018.08.28-15.38.50:793][  0]LogContentCommandlet: Error: [REPORT] Failed building lighting for /Game/Maps/Locations/S01L10
[2018.08.28-15.38.50:793][  0]LogStaticLightingSystem: Warning: Failed to build lighting!!! Lighting build failed.

The service used for Jenkins is running from the same user account I used to run the script successfull from local terminal. I guess the failure is related to missing Desktop interaction or some other access right detail that differs for a service from a regular process.

It would be great to get any advice on this.

1 Like

@anonymous_user_69d05961
I am also getting an error for the same reason.
Did you ever solve this error?