Skip to content

How to Solve "META=INF/com.android.tools/proguard/coroutines.pro' Error #717

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

Closed
CLOUDFIRE91 opened this issue May 10, 2023 · 29 comments
Closed

Comments

@CLOUDFIRE91
Copy link

CLOUDFIRE91 commented May 10, 2023

Unity editor version: Unity 2019.4.40

Firebase Unity SDK version: Firebase_unity_sdk 10.7.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 10.7.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?
Hi All
I am using Quick Start unity master . I am using auth package. I have downloaded firebase_unity_sdk__10.7.0 and installed.. When i compile the project. It shows the error more than one file was found with os independent path..
"META=INF/com.android.tools/proguard/coroutines.pro' See the Console Details.
s1
I tried many solution mentioned in stack overflow. nothing is successful. So any one give the suggestion .how to solve this error.

@paulinon
Copy link
Contributor

Hi @CLOUDFIRE91,

This seems rather unusual, but I'd like to get more context about what's happening here. Version 11.0.0 of the SDK has been released. Could you confirm if the issue persists with this version?

I don't know if you tried this out, but can you try if going to Assets > External Dependency Manager > Android Resolver > Force Resolve makes any difference? Could you list down the solutions that you've tried so far?

@paulinon paulinon added the needs-info Need information for the developer label May 11, 2023
@CLOUDFIRE91
Copy link
Author

Thanks Paulinon for your reply. I have tried this Assets > External Dependency Manager > Android Resolver > Force
/Delete Resolved Libraries and all the methods. Nothing works . I have tick the custom main manifest to proguard file.
Nothing works.

May be i will try firebase 11. and i will update soon.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels May 11, 2023
@CLOUDFIRE91
Copy link
Author

CLOUDFIRE91 commented May 11, 2023

@paulinon i have open fresh quick start unity master for auth. and i have downloaded the firebase 11 sdk and i installed. There are lot of errors displayed . I have attach with it. Is there any Update for quick start unity master.
FirebaseSDK

@paulinon
Copy link
Contributor

paulinon commented May 12, 2023

Hi @CLOUDFIRE91,

Thanks for the update. It turns out that Version 11.0.0 deprecated some methods which are possibly in the quickstart. I'll let the team know about this.

For now, could you try reverting to Version 10.7.0 and reimporting the SDK? Additionally, has clicking Force Resolve made any difference in your implementation?

@paulinon paulinon added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels May 12, 2023
@CLOUDFIRE91
Copy link
Author

HI paulion

I have tried reverting to version 10.7.0 and reimported the SDK. But the same error happens. Error is same. I have tried this stack overflow forum .
https://stackoverflow.com/questions/52518378/more-than-one-file-was-found-with-os-independent-path-meta-inf-proguard-android

it is also not working. and also i tried many forums in stack overflow. But no luck .
Coud you please some Idea how to solve it..

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels May 12, 2023
@AlmostMatt
Copy link
Contributor

Is there any Update for quick start unity master.

I've just now updated the Auth quickstart to be compatible with the 11.0.0 Auth Unity SDK update:
firebase/quickstart-unity#1331

But that seems like an aside from your issue about the error mentioning coroutines.pro.

@CLOUDFIRE91
Copy link
Author

@AlmostMatt

Which Unity Version you are using. for eg unity 2019,2020, like that. because i am receiving the same error still now...

@AlmostMatt
Copy link
Contributor

I was able to reproduce the error about META=INF/com.android.tools/proguard/coroutines.pro by using Unity 2019.4 on Windows with the Auth testapp and Auth 10.7.0, building for Android.

I tried some of the online suggestions about tweaking gradle files and gradle properties, but this did not resolve the issue in my case.

I then opened the same project in Unity 2021.3.151f and I was able to build successfully.

I suspect this is an issue related to which gradle version is used.
This page has a table showing that Unity 2021.1.16f1 and newer use gradle 6.1.1
https://docs.unity3d.com/Manual/android-gradle-overview.html

Could you try using a newer version of Unity to see if you are able to build?

@CLOUDFIRE91
Copy link
Author

@AlmostMatt Thanks for your reply. I think there is a problem in unity 2019.4.40 for firebase auth. you are suggest to change the build.
is there any chance to UNITY TEAM and FIREBASE TEAM can help to rectify the error. i have tried all the stack overflow forum for this error. but it is not works...

Waiting for FIREBASE TEAM for response???????????????????????????????

@AlmostMatt
Copy link
Contributor

@CLOUDFIRE91 I am a member of the Firebase team.

Can you confirm whether or not the issue persists for you with other versions of Unity? Or are you saying that you are required to use Unity 2019 for some other reason?

I also have one additional workaround that you can try in Unity 2019.
In Player Settings, Publishing Settings, you can enable Custom main gradle template and Custom launcher gradle template.

This will create
Assets/Plugins/Android/mainTemplate.gradle
Assets/Plugins/Android/launcherTemplate.gradle

In both of those two files, you can remove the comment on the first line of the file, and add to the end of the file

android {
    packagingOptions {
        pickFirst 'META-INF/**/coroutines.pro'
   }
}

This doesn't necessarily explain why there are duplicate coroutines.pro files, but it should allow the build to continue

@paulinon paulinon added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels May 18, 2023
@CLOUDFIRE91
Copy link
Author

CLOUDFIRE91 commented May 18, 2023

Thanks @AlmostMatt for your reply. I have tried your method . But it is not working. Ok i will shift to Unity 2021.. and i will update to you.

A small request to Firebase Team. When you have updated a firebase auth or something. Kindly update to the user that these updates will works on this unity version. so you must update to this unity version. because i did not check my app for past 3 months. i think it is working fine. now only i check the sms is not received from my app. so only i check with this testapp/auth. and find this error.

So this is my request...kindly inform to all the users of firebase to update to this version. ...if suddenly if the firebase version 9 becomes obsolete what the app users will do if the users not received sms...

Actually many peoples will not use live version of fear of problems and errors. So only i choose 3 version back for the firebase.

This is my request.. Hope Firebase team will understand.

Thanks for your reply.

@CLOUDFIRE91
Copy link
Author

CLOUDFIRE91 commented May 24, 2023

@AlmostMatt

I have installed 2021.3.25f1 and downloaded quik start unity master and Installed Firebase firebase_unity_sdk_11.0.0..I have downloaded googleservices.json. and put it in Assets folder and also i created streaming assets folder and put googleservices.json . I have enabled sha1 and sha256 in firebase console. and enabled keystore in publish settings. There is No Error in Build. Build created successfully. When i build and enter phone number.SMS is not receiving in my mobile..
Just it says Setting Up Firebase Auth Only.

I have enabled assets/AssetResovle/Force Resolve...

kindly help me to solve this error. SMS is not receiving ...

kindly check from your side also..

@AlmostMatt
Copy link
Contributor

AlmostMatt commented May 24, 2023

Glad to hear that updating Unity is letting you work around the META INF error for now.

Can you file a separate GitHub issue for the issue related to sms authentication?
That way this issue can continue to track whether any other solutions are found or improvements made to the META INF issue when using Unity 2019.

Also, in such an issue can you also confirm the following:

  • is 'Phone Authentication' enabled in the firebase console
  • After entering a phone number, did you press any of the buttons on your screen?
    For sms authentication, I think that scrolling down to the "Authenticate Phone Number" button will call "phoneAuthProvider.VerifyPhoneNumber()" which is expected to verify that the phone number is valid by sending an SMS. You can also try "Create User" to test creating an account with email and password.

That said, I just tried doing this locally with Auth 11.0.0 and encountered an error about PhoneAuthOptions. I'll followup to see what is happening in my case. (I may just have some incorrect setup)

@CLOUDFIRE91
Copy link
Author

CLOUDFIRE91 commented May 26, 2023

@AlmostMatt

Thanks for your reply.

Can you file a separate GitHub issue for the issue related to sms

authentication?

I have created one fresh issue. But paulion closed once again i will reopen this issue.
1)I have enabled Phone Authentication in firebase console.
2) I have clicked the button "Authenticate Phone Number" button. I have clicked the button . but nothing works... No message found.

I just tried doing this locally with Auth 11.0.0 and encountered an error about PhoneAuthOptions.

are you saying that there is a bug in firebase and quick start master.. KIndly reply . kindly check from your side whether auth is working or not.

@CLOUDFIRE91
Copy link
Author

Mr @AlmostMatt

Kindly reply.. Is it fault in Ur side or in my side... kindly reply.

@omygirl
Copy link

omygirl commented May 30, 2023

https://stackoverflow.com/questions/76242108/error-phoneauthoptions-does-not-contain-a-definition-for-builder-in-unity
The following are the issues. How do I fix this? If you have a sample code, I would appreciate it if you could let me know.

@AlmostMatt
Copy link
Contributor

AlmostMatt commented May 30, 2023

CLOUDFIRE91

are you saying that there is a bug in firebase and quick start master.. KIndly reply . kindly check from your side whether auth is working or not.

I am still not entirely sure what caused the issue that I encountered previously about PhoneAuthOptions. But I think that the error that I saw was unrelated to the SMS issues that you are experiencing, as you state that there is no error message in your case, but I had a pretty obvious error message about PhoneAuthOptions.

omygirl

The following are the issues. How do I fix this?

You should be able to construct a PhoneAuthOptions with initial variable values as is done in the auth quickstart sample:
https://github.com/firebase/quickstart-unity/blob/bd49417e32303753f0fcc67f1d4cc960f071010e/auth/testapp/Assets/Firebase/Sample/Auth/UIHandler.cs#L841

new Firebase.Auth.PhoneAuthOptions {
PhoneNumber = phoneNumber,
TimeoutInMilliseconds = phoneAuthTimeoutMs,
ForceResendingToken = null
},

@CLOUDFIRE91
Copy link
Author

@AlmostMatt can you share your auth apk.. i can test whether it is working or not ... did you test my apk .. ...whats ur feedback...

@AlmostMatt
Copy link
Contributor

@CLOUDFIRE91
The issue that I had encountered previously was the same as #764, which appears to be different from your issue.

I tried your sample app and I do observe the same thing as you mentioned, where nothing visibly changes when you click "Authenticate Phone Number.
I ran 'adb logcat' while running your app to debug a bit further.

There is an error:
ArgumentNullException: Value cannot be null
at Firebase.Auth.PhoneAuthProvider.GetInstance (Firebase.Auth.FirebaseAuth auth)

I believe this is saying that in UIHandler.cs, 'auth' is null. This would happen if there was an issue during the initialization.

I also see these messages in the adb log:
"firebase: 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"
"Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project"

  1. Can you confirm that a google-services.json file corresponding to your firebase project is present in the Unity project's Assets?
  2. Are you using a custom gradle file that might not depend on google services?

If the issue persists, it might also be helpful if you are able to share a sample unity project, rather than a compiled apk. That makes it easier for us to see what might be wrong.

@AlmostMatt AlmostMatt added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Jun 24, 2023
@google-oss-bot google-oss-bot added the stale Don't have recent activity label Jun 29, 2023
@google-oss-bot
Copy link

Hey @CLOUDFIRE91. 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!

@CLOUDFIRE91
Copy link
Author

@AlmostMatt Thanks for your reply. Just onlyi have look up on your reply. many days i dd not get any reply. So I will update the package soon. I have some problem in installation in unity. So i will update soon . Thanks for your reply.

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer stale Don't have recent activity labels Jun 30, 2023
@AlmostMatt AlmostMatt added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Jul 25, 2023
@google-oss-bot
Copy link

Hey @CLOUDFIRE91. 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 google-oss-bot added the stale Don't have recent activity label Jul 26, 2023
@CLOUDFIRE91
Copy link
Author

CLOUDFIRE91 commented Jul 26, 2023

Hi Almostmatt

Can you confirm that a google-services.json file corresponding to your firebase project is present in the Unity project's
Assets?
Yes I am using Correct Google Services Json file only.

Are you using a custom gradle file that might not depend on google services?

I am not using  custom gradle file build settings....

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer stale Don't have recent activity labels Jul 26, 2023
@AlmostMatt
Copy link
Contributor

AlmostMatt commented Jul 26, 2023

Hi again CLOUDFIRE.
When I previously tested your app I saw the following error message in the logs when using 'adb logcat':
"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"

There is another GitHub issue reporting the same message: #761

It would be good to find out if your issue is related to that issue. If so, they mention that they notice that the following folder and file is not being generated when they build the app:
/Plugins/Android/FirebaseApp.androidlib/res/values/google-services.xml
As a result some firebase functionality was not working.

In their case they found a workaround where installing iOS build support somehow allowed the build to succeed for them.

To check if your issue is related can you check:

  • does "/Plugins/Android/FirebaseApp.androidlib/res/values/google-services.xml" exist in your project?
  • if you install Unity iOS build support, when you build and run on Android is there any change in functionality?

If those are true, then you hopefully have a temporary workaround and can stay tuned for updates to issue 761.
If however your issue is totally unrelated to that issue, then we will probably need more information to help debug, such as the source code of a sample minimal project that can reproduce the issue.

@AlmostMatt AlmostMatt added needs-info Need information for the developer and removed needs-attention Need Googler's attention labels Jul 26, 2023
@CLOUDFIRE91
Copy link
Author

CLOUDFIRE91 commented Jul 27, 2023

Hi AlmostMatt

Thanks for you reply. Yes As you mentioned

the below File is not exist in my project.

/Plugins/Android/FirebaseApp.androidlib/res/values/google-services.xml

when i converted to ios build... the above file has been created.. when i shifted to android and make the build the same error
happens

"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"

happens.

761 issues happen in my build. So What i have to do. Shall i have to wait for another firebase update. When will get updated. because my build is in live...

kindly reply..

So the

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Jul 27, 2023
@argzdev
Copy link

argzdev commented Jun 4, 2024

Hey folks, just bumping this thread. So far upon testing the Firebase Quickstart for Unity, this issue is not present when using "Phone numbers for testing" in Firebase Auth version 11.9.0 and Unity Editor version 2022.3.24f1. I believe updating to the most recent versions will resolve this issue. Other than that, there really isn't any backward compatible fix, and it will likely result to more issues.

To receive SMS, the requirements in Firebase Phone Auth are:

For Android:

To use phone number authentication, Firebase must be able to verify that phone number sign-in requests are coming from your app. There are three ways Firebase Authentication accomplishes this:

  • Play Integrity API
  • reCAPTCHA

For iOS:

To use phone number authentication, Firebase must be able to verify that phone number sign-in requests are coming from your app. There are two ways Firebase Authentication accomplishes this:

  • Silent APNs notifications
  • reCAPTCHA verification

I noticed there were no mention during your setup with the quickstart. This could be why you're unable to receive SMS messages.

Other tips that may help:

Missing /Plugins/Android/FirebaseApp.androidlib/res/values/google-services.xml

  • You need to trigger a rebuild to recreate the google-services.xml. Try changing the platform from Android to Windows, Mac, Linux and then back to Android. This should trigger the rebuild of the google-services.xml.

  • Enable Android Auto Resolution via Assets > External Dependency Manager > Android Resolver > Settings

That said, I'll go ahead and close this thread. Since the issue has branched out to different concerns, and it is likely not related to the initial problem.

@argzdev argzdev closed this as completed Jun 4, 2024
@argzdev argzdev removed the needs-attention Need Googler's attention label Jun 4, 2024
@firebase firebase locked and limited conversation to collaborators Jul 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants