firebase-unity-sdk icon indicating copy to clipboard operation
firebase-unity-sdk copied to clipboard

Firebase Auth have some dependencies issues

Open JankunChar opened this issue 2 years ago • 33 comments

Unity editor version: Unity 2021.3.27f1

Firebase Unity SDK version: Firebase_unity_sdk (11.2.0).

Problematic Firebase Component: Auth

Other Firebase Components in use: None(only auth)

Additional SDKs you are using:None(only auth)

Platform you are using the Unity editor on: Windows

Platform you are targeting: Android

Scripting Runtime:Mono

Pre-built SDK from the website : Firebase_unity_sdk (11.2.0).

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? What's the issue repro rate? (eg 100%, 1/5 etc) 1

What happened? How can we make the problem occur?

I am new to firebase. I have integrated firebase Auth version (11.2.0).

I am unity 2021.3.27f1. I have placed googleservices.json in Assets Folder.

When i build the firebase and run in my mobile it shows the error.

One or more Firebase dependencies are not present. Current dependency status: UnavailableOther

I have also used Asset/dependency manager/Android Resolve/Force Resolve/ It says resolved...

When i click the Authenticate Phone Number. Nothing happens....

I have spent a lot of time in googling the issue but havent find any useful solution.

could any one can give solution.

Thanks and Regards James

JankunChar avatar Jul 05 '23 10:07 JankunChar

Hi @JankunChar,

Thanks for bringing this to our attention. Have you created a keystore and generated your SHA1 and SHA256 keys? If not, you can set your keystore from the Publishing Settings under your Player Settings and running keytool -list -v -keystore <path_to_keystore> -alias <key_name>. Downloading a new google-services.json file is necessary after this step.

Otherwise, could you provide a minimal, reproducible example of your implementation? We can use this as a baseline for our troubleshooting.

paulinon avatar Jul 05 '23 12:07 paulinon

@paulinon thanks for you reply . I have entered sha1 and sha256 in firebase console. and i have downloaded the latest googleservice.json file . Then only error happens. What i have to do for running the firebase sms successfully?

JankunChar avatar Jul 05 '23 13:07 JankunChar

Hi Paulion

I have attached testapp file in the below link .

(removed because u have downloaded it.)

This is my apk file

(https://www.dropbox.com/s/q9d98zlyeno0505/SmsError.apk?dl=1)

. Kindly do the needful.

JankunChar avatar Jul 06 '23 09:07 JankunChar

Thanks for the additional information, @JankunChar. Upon checking, it seems that you're using version 11.0.0 of the SDK as well as a more recent version of the quickstart. In order to solve the issue in the other ticket you mentioned, have you tried deleting the folders related to the SDK then importing a downgraded SDK version? Could you also provide debug logs that appear while you're running the app build?

paulinon avatar Jul 07 '23 11:07 paulinon

@paulinon Thanks for you reply.

have you tried deleting the folders related to the SDK then importing a downgraded SDK version?

Actually i have opened the Fresh downloaded the Fresh Quick Start Master and then i have downloaded the 10.7.0 . I never installed Firebase 11 Version.

have you tried deleting the folders related to the SDK then importing a downgraded SDK version?

which Folder i have to delete. What you are ask me to do.

 1) Shall i  First Install firebase 11 and  then you ask me to install firebase 10.7.0 then i have to delete the old files. 

Are you ask me to do the above.

I am using Fresh Recent Quck Start master + 10.7.0 ... ( in the thread i have mentioned)..

in case if you upload the old quick start master it will help for me .

Kindly do the needful. My project is in live. So sms is not receiving. I am in deep trouble.

Kindly provide correct qucik start master + firebase version. ,,

Did you check my Apk + my sample project. Whats your feedback????

JankunChar avatar Jul 07 '23 13:07 JankunChar

HI @JankunChar,

Apologies for any confusion this may have caused. To clarify, the workaround for the issue described in #764 is to make use of the VerifyPhoneNumber_DEPRECATED() function in the latest quickstart project (change VerifyPhoneNumber to VerifyPhoneNumber_DEPRECATED in line 1027 of the UIHandler.cs file) with a downgraded version (10.7.0) of the SDK. If you're not facing the error message saying that The type or namespace name 'AuthResult' does not exist in your fresh quickstart project, then you may disregard what I said about deleting the folders related to the SDK then importing a downgraded SDK version.

I utilized the testapp.rar file you provied, but I'm facing the behavior described in #764 instead of nothing happening. Does any error message appear in your fresh project after tapping Authenticate Phone Number? If not, it would be helpful if you provide any logs that may appear as you test the app build so that we can determine what's causing this to happen. You may refer to this page for more information.

paulinon avatar Jul 07 '23 15:07 paulinon

Hi Paulion

I have downloaded the Fresh Unity Quick Start master and then i have installed firebase 10. 7.0.. It says Nothing to Import, All Assets from this package are already in your project. I think there 10.7.0 package default inside the recent quick start master project .

Forum8 7

The Error shows ..

Forum8 7 2

Once i installed firebae 11 . the error goes. But the error displays Firebase Dependencies unavailable other

I have changed the VerifyPhoneNumber_DEPRECATED() to VerifyPhoneNumber. But nothing works.

deleting the folders related to the SDK then importing a downgraded SDK version

Which Folder i have to delete.Kindly mentioned it....

My project is in live. Sms is not receiving. So i am in deep trouble. So kindly provide the solutions with immediate effect.

JankunChar avatar Jul 08 '23 07:07 JankunChar

Kindl look upon this issue. Kindly help me to solve.

JankunChar avatar Jul 08 '23 09:07 JankunChar

Hi @JankunChar,

The Firebase SDK isn't included in the quickstart project. Does the issue in your first screenshot persist when you import this SDK? If so, please provide the steps you're doing to import the SDK. You may refer to the readme.md file for detailed instructions on how to build the project.

Regarding your app build, I'd like you to provide the debug logs I previously asked for. Given that nothing is happening after tapping Authenticate Phone Number, it's possible that the backend could be causing this, and we'd need the debug logs in order to verify whether or not this is the case.

paulinon avatar Jul 10 '23 09:07 paulinon

Hey @JankunChar. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Jul 17 '23 01:07 google-oss-bot

@paulinon i will update soon.

JankunChar avatar Jul 17 '23 08:07 JankunChar

@paulinon Sorry For Delaying. I have downloaded fresh quick start unity master... and i have installed firebase 10.7 . It installed firebase auth. Previously in my project there is a bug. So i have mentioned that the firebase have default version of firebase 10.7. i am wrong. i am so sorry for that message.

I have changed the Verifyphonenumber_deprecated to verifyphonenumber . But it shows the below error. Error2

Editor.txt

i have attached the editor script.

you have asked about debug. log. How can i give that details. Could you share thought on that?????

only Firebase Recent 11.02 version only solve the above error. But when i run it shows firebase dependencies unavailable other.

JankunChar avatar Jul 22 '23 10:07 JankunChar

Hi @JankunChar,

Version 11.3.0 of the SDK has been released. This means that you should be able to use the recent quickstart with the VerifyPhoneNumber function without issue. If the One or more Firebase dependencies are not present error message appears, could you try if Resolving or Force Resovling makes any difference?

Once you've successfully built your app, if tapping Authenticating Phone Number doesn't do anything as you initially reported, it would be helpful if you provide debug logs as you are running the app. From the link I provided, there are various methods to debug your app, but I frequently do this by connecting my device using a USB.

paulinon avatar Jul 24 '23 14:07 paulinon

@paulinon Thank for your reply.I have downloded version11.3.0 .. But the same error continues. In Build Settings i never choose Custom main maninfest to custom proguard file. Is there any default i have to choose... it is empty... (because quick master is empty)..Shall i have to choose anything default...

ForumUpload

I have attached the debug. log (adb log file)...

Final.txt

So kindly do the needful..

JankunChar avatar Jul 25 '23 11:07 JankunChar

Thanks for the update, @JankunChar. Just to clarify, I have a few questions related to your findings:

  • When you mentioned "the same error continues," are you referring to One or more Firebase dependencies are not present. Current dependency status: UnavailableOther? If so, are you seeing this in your app build?
  • I checked the debug logs you provided, Firebase initialization was unsuccessful with an error message saying Failed to read Firebase options from the app's resources. Either make sure google-services.json is included in your build or specify options explicitly. By chance, does the path to your Unity project contain any special character?
  • Does your implementation have a Assets/Plugins/Android/Firebase.androidlib folder that contains AndroidManifest.xml, project.properties and res/values/google-services.xml?

Additionally, enabling custom build files isn't necessary unless Android resolution fails in the editor.

paulinon avatar Jul 26 '23 16:07 paulinon

Thanks Paulinon for you reply. . I am refering to One or more Firebase dependencies are not present. Current dependency status: UnavailableOther..

In My Android Project there is no folder Assets/Plugins/Android/Firebase.androidlib folder that contains AndroidManifest.xml,

I have searched and found the forum. The same error continues in my project.

[(https://github.com/firebase/firebase-unity-sdk/issues/761)]

The Above forum applies to my Error. So Kindly notifies it and rectifies the problem .

Kindly reply when the problem will solved...

JankunChar avatar Jul 28 '23 06:07 JankunChar

Hi @JankunChar,

The issue that you referenced is a bug caused by non-ASCII characters in the path to your Unity project. That said, do you have any non-ASCII characters in your path?

If not, do you have an Assets/Plugins/Android/Firebase folder in your implementation? Starting Unity 2020, this has to be renamed to Assets/Plugins/Android/Firebase.androidlib, and it should contain AndroidManifest.xml, project.properties and res/values/google-services.xml.

paulinon avatar Jul 28 '23 10:07 paulinon

@paulinon thanks for you reply..

My Unity path lies in G:\Fooya25-07-23\auth\testapp... This is the path . what do you mean by

non-ASCII characters in the path to your Unity project.

I cant understand ur question... I have mentioned my path in first line.

do you have an Assets/Plugins/Android/Firebase folder in your implementation?

defaulty i dont have the above folder. When i try to convert into android build to ios build. the above folder has been created..

When i once again convert ios to android build. When i run in android build .

. Firebase dependecies unavailable other error has shown in my mobile.

JankunChar avatar Jul 31 '23 06:07 JankunChar

Hi @JankunChar,

Based on the path name you shared, it doesn't seem to contain any non-ASCII characters. This means we can rule out the bug you previously mentioned as the cause of your issue.

One of the solutions in this Stack Overflow thread suggests that renaming Assets/Plugins/Android/Firebase to Assets/Plugins/Android/Firebase.androidlib resolves the issue. Could you try this out and see if it makes any difference in your implementation?

paulinon avatar Jul 31 '23 11:07 paulinon

Hey @JankunChar. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Aug 07 '23 01:08 google-oss-bot

@paulinon

One of the solutions in this Stack Overflow thread suggests that renaming Assets/Plugins/Android/Firebase to >Assets/Plugins/Android/Firebase.androidlib resolves the issue.

I have tried your above mentioned. but the problem has not been solved. . .Same error happens. (unavailable other ) error happens..

I have read in some forum. if we copied the firebase from the previous working project. it will solve the error. I am going to try it and i will update soon.

Kindly note : only if i switch to ios platoform only Assets/Plugins/Android/Firebase.androidlib created.. defaultly the above folder is not created. in android project.. .

CLOUDFIRE91 avatar Aug 07 '23 06:08 CLOUDFIRE91

Hey @JankunChar. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Aug 14 '23 01:08 google-oss-bot

Waiting for your update...

CLOUDFIRE91 avatar Aug 16 '23 04:08 CLOUDFIRE91

Hi @CLOUDFIRE91,

Does the error appear in the Unity editor or in your app build? If it's in your app build, could you share your latest debug logs as you're running the app?

Also, are you successful in using the solution you read from the forum you mentioned?

paulinon avatar Aug 16 '23 18:08 paulinon

Hey @JankunChar. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Aug 23 '23 01:08 google-oss-bot

I will update soon..

JankunChar avatar Aug 23 '23 09:08 JankunChar

Hey @JankunChar. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Aug 30 '23 01:08 google-oss-bot

@paulinon i have tried to integrate and replace the old firebase files in my project. But it shows error. Did you have any solution for this problem. What is the current status. Did the problem has been solved. is there any update from your side...

CLOUDFIRE91 avatar Aug 30 '23 04:08 CLOUDFIRE91

Hey @JankunChar. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Sep 06 '23 01:09 google-oss-bot

Hi Firebase Team Any updates... From your Side...

JankunChar avatar Sep 06 '23 08:09 JankunChar