After first build, 4.17 always fails, complains about swarm agent (on Mac)

Hi ,

Well, in order to use iOS 11/ARKit I unfortunately have to use a beta version of Xcode… that being said, since ARKit support has now made it into 4.17 preview 3, I could try that, which I assume is considered less experimental, since it doesn’t require building from source?

I believe that would require me to downgrade to Xcode beta 2 (which I was hoping to avoid), though, since the beta 3/4 fix has not yet made it into the UE codebase.

I will try the above and report on the result. In the meantime, I take it there is no quick potential fix a la “swarm agent shouldn’t even be trying to run in your situation, this is how you disable it”?

Thanks,
Gal

Background:

I'm on a mac (latest 2017 iMac, using Sierra). I've successfully checked out, built, and ran the ARKit branch of 4.17 (specifically, I'm running the PR that adds Xcode 9.0 beta 4 support to that branch, since that is the Xcode version I'm using -- https://github.com/EpicGames/UnrealEngine/pull/3816). This all seems to mostly work fine, and I'm able to use both UE4 and ARKit, deploy to an iPhone using this version, etc.

Problem:

After compiling and running the ARSample project, the *first time* (and only the first time) I build lighting in UE4, the build seems to succeed with no issues -- any existing lighting related warnings go away, and I see no errors in the output log, only a couple of warnings that do not seem related (log can be found [here][1]). However, **starting from the second time I try to build lighting** (either by clicking the build button or by building lighting only), I immediately get an error popup saying "Failed to connect to swarm.", and can see this in the log:
MapCheck: New page: Map Check
Cmd: MAP REBUILD ALLVISIBLE
LogEditorServer: Rebuildmap Clear paths rebuilt
TextureStreamingBuild:Display: Compiling optional shaders took 0.019 seconds.
TextureStreamingBuild:Display: Build Texture Streaming took 0.005 seconds.
LightingResults: New page: Lighting Build - Jul 30, 2017, 12:16:03 PM
LogStaticLightingSystem:Warning: Failed to connect to Swarm.
Cmd: MAP CHECK DONTDISPLAYDIALOG
MapCheck: New page: ARSample - Jul 30, 2017, 12:16:04 PM
MapCheck: Info Map check complete: 0 Error(s), 0 Warning(s), took 114.639ms to complete.
LogEditorBuildUtils: Build time 0:01

If I close UE4, and re-build/run ARSample from Xcode, the exact same thing happens – everything seems to work for the first build, and then stops. I’ve tried rebuilding both the ShaderCompilerWorker and UnrealLightmass schemes before rebuilding ARSample, all to no avail.

Does anyone have an idea regarding what’s going wrong or how I can fix it?

The only swarm-related posts I’ve been able to find online seem to be Windows-centric, and server-farm-centric, and I haven’t been able to solve the issue after reading them. Obviously this is an error in a branch off of a preview version, so pretty far from a production-ready version of UE, and I never expected everything to go smoothly – but I’m hoping someone has a lead.

Hi galniv,

The dev-ar-kit branch is considered experimental, and it is unlikely that any issues specific to that branch will be fixed. Have you run into this issue in any other branch, or when using a non-beta version of Xcode?

Hi Gal,

Sorry for not getting back to you sooner. I made a few attempts in 4.18 to reproduce the lighting build issues that you experienced, and have not been able to do so. Are you still experiencing this issue?

Hi Gal,

We have not heard back from you for a while. Do you still need help with this issue? I will be marking this post as resolved for internal tracking purposes, but please feel free to add a comment and re-open the post if you need any additional assistance.