baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

Google Login no longer works after Android 10 upgrade #59

Closed Seanmclem closed 4 years ago

Seanmclem commented 4 years ago

My test device was upgraded to android 10 recently, and my Google login stopped working. It still works on another older device, but not in Android 10. Facebook login still works.

Is there some configuration within the app that I need to check or update to ensure it works? Everything else seems to, so this is the only new issue. I'm sure I just missed some small step somewhere.

I get logged the "native CapacitorFirebaseAuth.signIn" result, but nothing from inside the cfaSignIn-subscribe

Seanmclem commented 4 years ago

ok I fixed it. It seems like I missed this step in the firebase-android integration docs... I thought I added the 2 implementation lines before, but sometimes it seems like npx cap sync clears out custom entries in files like this -so maybe it was that. It worked in Android 9 without it even on another device, but not with Android 10.

So I needed to add these 2 lines:

  implementation 'com.google.firebase:firebase-auth:19.2.0'

  implementation 'com.google.firebase:firebase-firestore:21.4.0'

to the app build.gradle

then the build would fail because my project needed to migrate to androidx. To do that go to the top menu, Migrate > migrate to androidx. (Might want to mention androidx in docs?) After the migration I had no issues, and google Login worked in the next build I tested.

baumblatt commented 4 years ago

@Seanmclem ,

Great news that is everything working. A few weeks ago, we move to Android 10 without migrating to AndroidX. It’s all about the version that you are using from Firebase and other Google services. Versions since June 17, 2019, needs this migration, at this time we choose to wait a little more for Capacitor team, you can follow them on this issue.

Best regards,
Bernardo Baumblatt

Seanmclem commented 4 years ago

@baumblatt do you recommend I revert from androidx and use an older firebase version? For now

If so, what version numbers should we use?

EDIT: Actually the issue you cited seems pretty conclusive. Seems like for most users it works to: npm i -D jetifier then add to package.json scripts "postinstall": "jetifier"

without adding any "-r"

Seems like this should be enough until they update the capacitor CLI.

baumblatt commented 4 years ago

Hello Sean,

This is not rule for that, take a look at the discussion on the issue, there are a lot of people moving forward.

If it's everything working without problems, it's better to use the updated libraries.

In our application, we have others dependencies, so it’s not so simple to migrate do AndroidX.

Best regards, Bernardo Baumblatt.

On Mon, Feb 10, 2020 at 11:39 AM Seanmclem notifications@github.com wrote:

@baumblatt https://github.com/baumblatt do you recommend I revert from androidx and use an older firebase version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/baumblatt/capacitor-firebase-auth/issues/59?email_source=notifications&email_token=ADJMCV5BTB53NF6HPHN4ESTRCFRIVA5CNFSM4KRRKM5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELIXTHI#issuecomment-584153501, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADJMCV3LWD2LW46RQDUXXVDRCFRIVANCNFSM4KRRKM5A .

-- Atenciosamente, Bernardo Baumblatt.

vichanse commented 4 years ago

Hello i had an issue with androidx too, and managed to fix it by just changing android to androidx in the bidge_layout_main.xml file. I think it ain't that hard to do the migration.