Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta Voice SDK - NullPointerException with Looper on Activation #96

Open
mortezafa opened this issue Dec 8, 2024 · 1 comment
Open

Comments

@mortezafa
Copy link

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.

@yolanother
Copy link
Contributor

This is an issue with Unity 6 + VSDK < v72. Upgrading to v72 when it is released or using Unity 2022 should fix the issue for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants