ERR_INTERNAL error on Huawei devices

Often crashes on Android 10 mostly on Huawei devices
Unity3D 2019. Fmod integration 2.01.07.Non-fatal Exception: java.lang.Exception: SystemNotInitializedException : [FMOD] Initialization failed : Output forced to NO SOUND mode : ERR_INTERNAL : An error occurred that wasn’t supposed to. Contact support.
at FMODUnity.RuntimeManager.get_Instance(FMODUnity.RuntimeManager)
at FMODUnity.RuntimeManager.get_StudioSystem(FMODUnity.RuntimeManager)
at Game.SoundManager.LoadBanks()
at Game.SoundManager.Initialize()
Buit-in sound disabled in Unity.

Do your logs contain any other FMOD logging at all?

NO. We can see only this error in logs. Error happens on start of the game during initialization.

There are a number of places that can return ERR_INTERNAL, you will need to use the FMOD logging libraries to get more information on the cause of this.

How we can get this logging?
We cant see any debugging libraries or symbols for fmod.

Using a ‘Development Build’ will use the FMOD logging libs and you can also change the logging levels in the FMOD Integration Settings.

Unfortunately, different logging level not helps.
We using ad plugins and fmod in project.
And we noticed this behaviour:
1 Show ad (fullscreen ad with video and sound)
2 Suspend fmod
3 Close ad
4 Trying to resume fmod, but fmod was not unmuted.

The next launch of the game results in this error.
Info AAudio AAudioStreamBuilder_openStream() called ----------------------------------------
Info AudioStreamBuilder rate = 0, channels = 0, format = 0, sharing = SH, dir = OUTPUT
Info AudioStreamBuilder device = 0, sessionId = -1, perfMode = 12, callback: OFF with frames = 0
Info AudioStreamBuilder usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
Debug PlayerBase::PlayerBase()
Info AudioStreamBuilder builder_createStream tryMMap = true for output
Debug AudioStreamInternal_Client open() original HW burst = 240, minMicros = 1000 => SW burst = 240
Info AAudio AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#1 ----------------
Debug AAudio AAudioStream_close(s#1) called ---------------
Debug AAudio AAudioStream_close(s#1) returned 0 ---------
Verbose AudioManager isBluetoothA2dpOn…
Verbose AudioManager isBluetoothScoOn…
Info fmod FMOD::supportsLowLatency : Low latency = true, Pro Audio = false, Bluetooth On = false, Acceptable Block Size = true (960)
Info AAudio AAudioStreamBuilder_openStream() called ----------------------------------------
Info AudioStreamBuilder rate = 0, channels = 0, format = 0, sharing = SH, dir = OUTPUT
Info AudioStreamBuilder device = 0, sessionId = -1, perfMode = 12, callback: ON with frames = 0
Info AudioStreamBuilder usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
Debug PlayerBase::PlayerBase()
Info AudioStreamBuilder builder_createStream tryMMap = true for output
Debug AudioStreamInternal_Client open() original HW burst = 240, minMicros = 1000 => SW burst = 240
Info AAudio AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#2 ----------------
Debug AAudio AAudioStream_close(s#2) called ---------------
Debug AAudio AAudioStream_close(s#2) returned 0 ---------
Info AAudio AAudioStreamBuilder_openStream() called ----------------------------------------
Info AudioStreamBuilder rate = 0, channels = 0, format = 0, sharing = SH, dir = OUTPUT
Info AudioStreamBuilder device = 0, sessionId = -1, perfMode = 12, callback: ON with frames = 0
Info AudioStreamBuilder usage = 14, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0
Debug PlayerBase::PlayerBase()
Info AudioStreamBuilder builder_createStream tryMMap = true for output
Debug AudioStreamInternal_Client open() original HW burst = 240, minMicros = 1000 => SW burst = 240
Info AAudio AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#3 ----------------
Debug AAudio AAudioStream_requestStart(s#3) called --------------
Debug AAudio AAudioStream_requestStart(s#3) returned -895 ---------
Debug AAudio AAudioStream_requestStop(s#3) called
Debug PlayerBase::stop() from IPlayer
Debug AAudio AAudioStream_close(s#3) called ---------------
Debug AAudio AAudioStream_close(s#3) returned 0 ---------
Error Unity [FMOD] Studio::System::initialize returned ERR_INTERNAL, defaulting to no-sound mode.
Error Unity FMODUnity.RuntimeManager:Initialize()
Error Unity FMODUnity.RuntimeManager:get_Instance()
Error Unity FMODUnity.RuntimeManager:get_StudioSystem()
Error Unity FMODSoundManager:LoadBanks()
Error Unity FMODSoundManager:Initialize(SettingsConfig)
Error Unity System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
Error Unity Zenject.ZenInjectMethod:Invoke(Object, Object[])
Error Unity Zenject.DiContainer:CallInjectMethodsTopDown(Object, Type, InjectTypeInfo, List1, InjectContext, Object, Boolean) Error Unity Zenject.DiContainer:InjectExplicitInternal(Object, Type, List1, InjectContext, Object)
Error Unity Zenject.<>c__DisplayClass11_0:b__0()
Error Unity System.Action:Invoke()
Error Unity Zenject.IProviderExtensions:GetAllInstances(IProvider, InjectContext, List1, List1)
Error Unity Zenject.DiContainer:SafeGetInstances(ProviderInfo, InjectContext, List`1)
Error Unity Zenject.DiContainer:Resolve(InjectContext)
Error Unity Zenject.DiContainer:CallInjectMethodsTopDown(Object, Type,
Info AwareBitmapCacher init lrucache size: 2097152 pid=25119
Verbose AudioManager getStreamVolume streamType: 3 volume: 7
Verbose AudioManager getStreamVolume streamType: 3 volume: 7
Error Unity SystemNotInitializedException: [FMOD] Initialization failed : Output forced to NO SOUND mode : ERR_INTERNAL : An error occurred that wasn’t supposed to. Contact support.
Error Unity at FMODUnity.RuntimeManager.get_Instance () [0x00000] in <00000000000000000000000000000000>:0
Error Unity at FMODUnity.RuntimeManager.get_StudioSystem () [0x00000] in <00000000000000000000000000000000>:0
Error Unity at FMODSoundManager.LoadBanks () [0x00000] in <00000000000000000000000000000000>:0
Error Unity at FMODSoundManager.Initialize (SettingsConfig settings) [0x00000] in <00000000000000000000000000000000>:0
Error Unity at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0
Error Unity at Zenject.ZenInjectMethod.Invoke (System.Object obj, System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0

Restarting the game doesn’t help.
Only a complete restart of the phone helps.

I have not been able to reproduce the issue here so far, are you able to share a small project that reproduces this? You can upload it to your FMOD Profile.

Which devices are you seeing this issue on?

we have no repro projects here. its continous problem with even latest version of fmod.
if you want we can send you link to download our game builded with logs.

A built game should be sufficient for us to reproduce this issue. Can you please upload the apk to your FMOD profile?

No. We cant upload project.
We fixed the problem with changing output for android builds to

#if UNITY_ANDROID && !UNITY_EDITOR
            FMOD.OUTPUTTYPE outputType = FMOD.OUTPUTTYPE.OPENSL;
#else

            FMOD.OUTPUTTYPE outputType = currentPlatform.GetOutputType();
#endif

Just find the huawei device. As We can see this is common problem.
Now we looking how to remove libresonanceaudio completely from the project.

Thank you for sharing your solution- we have tested on Huawei devices but couldn’t reproduce these issues with Ads or Resonance Audio. Just to help me try to recreate this issue, can you please tell me what your Output Mode for Android is set to in your Unity FMOD Settings? e.g

What are the problems you are having with Resonance Audio? Is it giving you new errors, crashes, no sound?