Skip to content

Meta Voice SDK - NullPointerException with Looper on Activation #96

@mortezafa

Description

@mortezafa

Im using this tutorial to integrate the Meta Voice SDK into my existing App. Im using Unity editor 6000.0.24f1

https://www.youtube.com/watch?v=nKprzndVHQM&t=399s&ab_channel=BlackWhale-XRAITutorials

I basically copy paste the code he uses in his tutorial

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 reference2024-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 reference2024-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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions