I am encountering a NullPointerException in the Meta Voice SDK while attempting to activate AppVoiceExperience in my Unity project. The error occurs when the SDK tries to access Android’s Looper.mQueue during initialization. I am on Mac.
I am developing for the Meat Quest 3. I have the Latest version of the Meta Voice SDK installed (v71) as well as the latest version of the Meta Core SDK. I do NOT have the Meta All in One SDK installed. I’ve set up all the Wit voice configuration files as well.
appVoiceExperience.Activate();
This code is causing the error. When I run it in game mode. I dont get an error
Here is the exact error:
2024-12-07 15:02:31.125 14100 14148 Error Unity AndroidJavaException: java.lang.NullPointerException: Attempt to read from field 'android.os.MessageQueue android.os.Looper.mQueue' on a null object reference
2024-12-07 15:02:31.125 14100 14148 Error Unity java.lang.NullPointerException: Attempt to read from field 'android.os.MessageQueue android.os.Looper.mQueue' on a null object reference
2024-12-07 15:02:31.125 14100 14148 Error Unity at android.os.Handler.<init>(Handler.java:257)
2024-12-07 15:02:31.125 14100 14148 Error Unity at android.os.Handler.<init>(Handler.java:162)
2024-12-07 15:02:31.125 14100 14148 Error Unity at com.oculus.assistant.api.voicesdk.core.VoiceSDKConnection$1.<init>(VoiceSDKConnection.java:54)
2024-12-07 15:02:31.125 14100 14148 Error Unity at com.oculus.assistant.api.voicesdk.core.VoiceSDKConnection.<init>(VoiceSDKConnection.java:54)
2024-12-07 15:02:31.125 14100 14148 Error Unity at com.oculus.assistant.api.voicesdk.logging.PlatformLogger$2.<init>(PlatformLogger.java:57)
2024-12-07 15:02:31.125 14100 14148 Error Unity at com.oculus.assistant.api.voicesdk.logging.PlatformLogger.<init>(PlatformLogger.java:56)
2024-12-07 15:02:31.125 14100 14148 Error Unity at com.oculus.assistant.api.unity.logging.UnityPlatformLoggerServiceFragment.createAndAttach(UnityPlatformLoggerServiceFragment.java:53)
2024-12-07 15:02:31.125 14100 14148 Error Unity at com.oculus.assistant.api.unity.logging.UnityPlatformLoggerServiceFragment.createAndAttach(UnityPlatformLogg
This happens regardless of whether I call Activate() in the Awake, Start, or through a delayed coroutine. The same error persists in all cases.
Here are some of my key observations:
- Im actually also getting the exception before my script is even called.
- Awake in VoiceManager is successfully called, but Start encounters the NullPointerException.
- Even delaying the Activate() call with a coroutine or button click does not resolve the issue.
- The required permissions (RECORD_AUDIO, INTERNET, FOREGROUND_SERVICE) are all declared in the AndroidManifest.xml, and the app has been granted these permissions on the device.