UpdateCache fails in build on VM

We have an issue in our automated builds where the sound doesn’t work, and we’ve tracked it down to StreamingAssets being missing. After digging through the FMOD integration and extensive logging I think I’ve nailed it down to EventManager.UpdateCache aborting the update when it can’t initialize an output device, and due to the cache not being updated EventManager.CopyToStreamingAssets doesn’t know about any banks.

We are using a virtual machine to build so it’s not weird that it doesn’t have any audio devices.

We have FMOD Unity Integration 2.01.05 which gives the stacktrace below, and I went over the release notes for later versions and found no mention of this issue.

FMOD Studio: Encounterd Error: ERR_OUTPUT_INIT Error initializing output device.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogError (object)
FMODUnity.EditorUtils:CheckResult (FMOD.RESULT) (at Assets/Plugins/FMOD/src/Editor/EditorUtils.cs:25)
FMODUnity.EditorUtils:CreateSystem () (at Assets/Plugins/FMOD/src/Editor/EditorUtils.cs:237)
FMODUnity.EditorUtils:get_System () (at Assets/Plugins/FMOD/src/Editor/EditorUtils.cs:296)
FMODUnity.EventManager:UpdateCache () (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:158)
FMODUnity.EventManager:RefreshBanks () (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:38)
FMODUnity.EventManager:BuildTargetChanged () (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:664)
FMODUnity.EventManager/PreprocessBuild:OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport) (at Assets/Plugins/FMOD/src/Editor/EventManager.cs:853)

Can you please change your Logging Level in FMOD Studio Settings to ‘LOG’ and send over all the output up to and including this error?
Also, what OS and version are you running in your virtual machine?

I’ll see about running a build with those settings and get back to you with the logs.
We are running Windows Server 2019 10.0.17763, and I found a workaround by starting the Windows Audio service.

Good to hear you found a workaround- we tried disabling the audio services to reproduce but in our case FMOD correctly goes into no sound mode. We’ll definitely need those logs to get more info on what’s going wrong there.