# Automated lightmap rebuilding from command line fails

**URL:** <https://forums.unrealengine.com/t/automated-lightmap-rebuilding-from-command-line-fails/432645>\
**Category:** Rendering\
**Tags:** automation-tool, building-lighting, unreal-engine, question\
**Created:** [August 28, 2018, 4:14pm UTC](https://forums.unrealengine.com/t/automated-lightmap-rebuilding-from-command-line-fails/432645 "2018-08-28T16:14:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_69d05961](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_69d05961](https://forums.unrealengine.com/u/anonymous_user_69d05961)\
**Post date:** [August 28, 2018, 4:14pm UTC](https://forums.unrealengine.com/t/automated-lightmap-rebuilding-from-command-line-fails/432645/1 "2018-08-28T16:14:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Straw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Straw](https://forums.unrealengine.com/u/Straw)\
**Post date:** [January 10, 2023, 9:44am UTC](https://forums.unrealengine.com/t/automated-lightmap-rebuilding-from-command-line-fails/432645/2 "2023-01-10T09:44:30Z")

</div>

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