cancel
Showing results for 
Search instead for 
Did you mean: 

"Unavailable invalid" FirebaseAuth for Unity on Quest 2

luisremor
Explorer

I'm having trouble starting Firebase on Meta Quest 2. The app builds without errors and the message that should appear in the
FirebaseAuth dependencyStatus is: "available". However, when starting it on Quest 2, the following message appears: "unavailable invalid"

"Available" status occurs normally on Windows, Unity editor and Android phone. Does anyone know why this error occurs on Quest 2?

I tried rewriting the code, reinstalling the SDKs, setting up another Firebase account, checked the package name, checked Google services, tried options related to internet connection.

 

This is the code:

async void Start()
{
    Debug.Log("Checking dependencies");
    await FirebaseApp.CheckAndFixDependenciesAsync().ContinueWithOnMainThread(task =>
    {
        dependencyStatus = task.Result;         
    });
    Debug.Log("Logging");
    var auth = FirebaseAuth.DefaultInstance;
    await auth.SignInAnonymouslyAsync();
    Debug.Log("Logged!");
    auth.SignOut();
    Debug.Log("Unlogged!");
 }
2 ACCEPTED SOLUTIONS

Accepted Solutions

4vit
Explorer

You can try this one.
Downgrade the Firebase Unity SDK to version 11.6.0 or earlier.
This version uses a lower compileSdkVersion that is compatible with Meta Quest requirements.
To implement this:
Uninstall your current Firebase SDK completely.
Install Firebase Unity SDK version 11.6.0.
Ensure all dependencies are properly resolved after installation.
Adjust Target API Level
If downgrading is not an option, you can try adjusting the Target API Level in your Unity project:
Go to Edit > Project Settings > Player > Android Settings.
Set the Target API Level to 32 or lower, which is compatible with Meta Quest requirements.

View solution in original post

luisremor
Explorer

Hello, we finally solved the problem! Although the application is for Android, all you had to do was install the IOS support build on Unity for Firebase to work and be available!
In build.gradle it was used:

        minSdkVersion 23
        targetSdkVersion 33
        compileSdkVersion 34
 

and it worked. Thanks for helping

View solution in original post

6 REPLIES 6

VineetAvasthi
Honored Guest

Hey @luisremor - Did you find a solution ? I am facing the exact same issue.
My app is for both - Android and Meta Quest 3. It's working fine on Android with Firebase - Auth and Database.

On Quest device, I get this - "Could not resolve all Firebase dependencies: UnavailableInvalid"
Were you able to resolve ? Thanks in advance!

4vit
Explorer

You can try this one.
Downgrade the Firebase Unity SDK to version 11.6.0 or earlier.
This version uses a lower compileSdkVersion that is compatible with Meta Quest requirements.
To implement this:
Uninstall your current Firebase SDK completely.
Install Firebase Unity SDK version 11.6.0.
Ensure all dependencies are properly resolved after installation.
Adjust Target API Level
If downgrading is not an option, you can try adjusting the Target API Level in your Unity project:
Go to Edit > Project Settings > Player > Android Settings.
Set the Target API Level to 32 or lower, which is compatible with Meta Quest requirements.

luisremor
Explorer

Hello, we finally solved the problem! Although the application is for Android, all you had to do was install the IOS support build on Unity for Firebase to work and be available!
In build.gradle it was used:

        minSdkVersion 23
        targetSdkVersion 33
        compileSdkVersion 34
 

and it worked. Thanks for helping

@luisremor - I already have iOS support installed. But not sure how is that relevant to the problem.

QuestTwoTwelve
Honored Guest

Hello, I'm not sure if this is relevant to this post but were you able to get FirebaseAuth to work for authentication like SSO on Quest 2 too or just stuff like username and password? If so, how did you do so?

Hi, I haven't tested SSO, just a normal username and password.