GmsCore icon indicating copy to clipboard operation
GmsCore copied to clipboard

Login to Google account failed

Open b767max opened this issue 1 year ago • 28 comments

When I use microg to try to log in to Google account, I enter the password and click I agree to the terms of use. Microg prompts that the login fails and I cannot connect to Google server I would appreciate it if someone could help me

  1. Enter the account login interface.
  2. Enter the mailbox.
  3. Enter the password.
  4. Click I agree privacy policy
  5. Microg prompt: unable to connect to Google server

Expected behavior Login successful

Screenshots If applicable, add screenshots to help explain your problem.

System Android Version: 12 Custom ROM: Magic UI6.1

Additional context Add any other context about the problem here.

b767max avatar Jul 24 '22 02:07 b767max

Same problem unable to login 😕 Andriod emui 12.0.0 Screenshot_20220725_095104_com google android gms

Wasifazhar00 avatar Jul 25 '22 06:07 Wasifazhar00

Exact same issue for me, is this fixed on the new nightly release?

animesh-sharama avatar Aug 13 '22 14:08 animesh-sharama

Exact same issue for me, is this fixed on the new nightly release?

No i don't know about nightly release i will try it

Wasifazhar00 avatar Aug 17 '22 04:08 Wasifazhar00

is this fixed on the new nightly release?

Doesn't seem to be.

dos1 avatar Sep 01 '22 11:09 dos1

Usually it is fixed by removing the account database (it will remove all account on the device, not just Google) and re-add it again. The list of files to remove is here: https://github.com/micro5k/microg-unofficial-installer/blob/df4effa4a6de6371a0d4a8b2d2ca64aa8010a8d5/zip-content/files/bin/minutil.sh#L39

ale5000-git avatar Sep 01 '22 12:09 ale5000-git

Doesn't help here - FWIW, I'm trying it on a fresh Waydroid container with LineageOS 18.1 (Android 11).

09-01 14:34:12.169  1655  1743 D GmsAuthLoginBrowser: JSBridge: getDroidGuardResult
09-01 14:34:16.758  1655  1743 D GmsAuthLoginBrowser: JSBridge: log
09-01 14:34:19.911  1655  1655 D GmsAuthLoginBrowser: pageFinished: https://accounts.google.com/EmbeddedSetup/signinconsent?source=android&xoauth_display_name=Android%20Device&lang=en&cc=us&langCountry=en_us&hl=en-US&tmpl=new_account&flowName=EmbeddedSetupAndroid&cid=1&TL={REDACTED}#close
09-01 14:34:19.960  1655  1798 D GmsHttpFormClient: -- Request --
09-01 14:34:19.960  1655  1798 D GmsHttpFormClient: add_account=1&androidId={REDACTED}&app=com.google.android.gms&client_sig={REDACTED}&callerPkg=com.google.android.gms&callerSig={REDACTED}&device_country=us&get_accountid=1&google_play_services_version=214816000&ACCESS_TOKEN=1&lang=en_US&operatorCountry=us&sdk_version=30&service=ac2dm&Token={REDACTED}
09-01 14:34:20.090  1655  1798 W GmsAuthLoginBrowser: onException
09-01 14:34:20.090  1655  1798 W GmsAuthLoginBrowser: java.io.IOException: Error=ServerError
09-01 14:34:20.090  1655  1798 W GmsAuthLoginBrowser:   at org.microg.gms.common.HttpFormClient.request(HttpFormClient.java:95)
09-01 14:34:20.090  1655  1798 W GmsAuthLoginBrowser:   at org.microg.gms.common.HttpFormClient$1.run(HttpFormClient.java:203)
09-01 14:34:20.090  1655  1798 W GmsAuthLoginBrowser:   at java.lang.Thread.run(Thread.java:923)

dos1 avatar Sep 01 '22 12:09 dos1

Have you disabled the 2-Step verification in the Google account settings?

ale5000-git avatar Sep 01 '22 20:09 ale5000-git

The account I'm trying to use it with doesn't even have a phone number attached, so there nothing to disable ;) I can login via browser with no troubles. It used to work with microG in the past, although the last time I tried was years ago so that probably doesn't tell much...

dos1 avatar Sep 01 '22 20:09 dos1

I'm experiencing the same thing with 2FA enabled (v 0.2.24.215816-25) so it may not be connected to whether 2FA is enabled or not.

goctav avatar Oct 27 '22 09:10 goctav

Could all of you please update microG GmsCore to the latest nightly build and retry?

ale5000-git avatar Dec 01 '22 09:12 ale5000-git

Could all of you please update microG GmsCore to the latest nightly build and retry?

Had a problem on enter email stage. This build fixes it.

lpylyp avatar Dec 01 '22 15:12 lpylyp

@lpylyp Crash after entering e-mail is a completely different issue that happened when SafetyNet was disabled and which has been fixed by 2a19ef45de5ad43bb3101f72aff477a2fc491e68 already.

@ale5000-git This problem still happens on latest nightly.

dos1 avatar Dec 01 '22 16:12 dos1

@dos1: Could you please take a logcat with the latest nightly build?

ale5000-git avatar Dec 01 '22 16:12 ale5000-git

Could all of you please update microG GmsCore to the latest nightly build and retry?

Had a problem on enter email stage. This build fixes it.

Nothing happen even after update. I think in my case phone spoofing feature is not working Uploading Screenshot_20221201_210430_com.google.android.gms.jpg…

Wasifazhar00 avatar Dec 01 '22 16:12 Wasifazhar00

@Wasifazhar00: You haven't waited the upload completion of the screenshot, so now it isn't working.

ale5000-git avatar Dec 01 '22 16:12 ale5000-git

@ale5000-git Still same thing:

12-01 16:31:32.711  1613  1613 D GmsAuthLoginBrowser: pageFinished: https://accounts.google.com/EmbeddedSetup/signinconsent?source=android&xoauth_display_name=Android%20Device&lang=en&cc=us&langCountry=en_us&hl=en-US&tmpl=new_account&flowName=EmbeddedSetupAndroid&cid=1&TL={REDACTED}#close
12-01 16:31:32.776  1613  1789 D GmsHttpFormClient: -- Request --
12-01 16:31:32.776  1613  1789 D GmsHttpFormClient: add_account=1&androidId={REDACTED}&app=com.google.android.gms&client_sig={REDACTED}&callerPkg=com.google.android.gms&callerSig={REDACTED}&device_country=us&get_accountid=1&google_play_services_version=223616000&ACCESS_TOKEN=1&lang=en_US&operatorCountry=us&sdk_version=30&service=ac2dm&Token=oauth2_{REDACTED}
12-01 16:31:32.942  1613  1789 W GmsAuthLoginBrowser: onException
12-01 16:31:32.942  1613  1789 W GmsAuthLoginBrowser: java.io.IOException: Error=ServerError
12-01 16:31:32.942  1613  1789 W GmsAuthLoginBrowser:   at org.microg.gms.common.HttpFormClient.request(HttpFormClient.java:95)
12-01 16:31:32.942  1613  1789 W GmsAuthLoginBrowser:   at org.microg.gms.common.HttpFormClient$1.run(HttpFormClient.java:203)
12-01 16:31:32.942  1613  1789 W GmsAuthLoginBrowser:   at java.lang.Thread.run(Thread.java:923)

microG Services Core 0.2.25.223616-9 (d01f371)

dos1 avatar Dec 01 '22 16:12 dos1

@dos1: Have you tried if it make any difference with SafetyNet enabled/disabled?

@Wasifazhar00: If your ROM doesn't natively support signature spoofing you should patch the ROM to add it or change ROM.

ale5000-git avatar Dec 01 '22 17:12 ale5000-git

Yes, no difference.

dos1 avatar Dec 01 '22 17:12 dos1

@mar-v-in Could you please also log the response code in addition of the error message here? https://github.com/microg/GmsCore/blob/cb836474b44c689866e4f9dbcba092e072a56586/play-services-base-core/src/main/java/org/microg/gms/common/HttpFormClient.java#L88-L96

ale5000-git avatar Dec 01 '22 20:12 ale5000-git

The response code is not going to be helpful here. It's either 200 (OK) or 500 (Error).

@dos1 is your account a Google Workspace account or anything else to consider about the account? Can you try if creating a new account works?

mar-v-in avatar Dec 01 '22 20:12 mar-v-in

I'm not really sure how it work but in case the network is behind a proxy or something similar isn't possible that it return other 2xx http valid codes?

ale5000-git avatar Dec 01 '22 20:12 ale5000-git

No, the connection is TLS encrypted, proxies cannot modify it. Also the error we see, Error=ServerError is what is actually sent from the Google Server.

I was able to reproduce this in Waydroid with an account that does work on a real device, so at least we now know that for some reason Waydroid is causing this.

mar-v-in avatar Dec 01 '22 23:12 mar-v-in

I was able to workaround this issue with Waydroid by using the Moto G device profile in microG's device registration settings. We can probably generate a device profile matching Waydroid's GAPPS image to get this working more properly.

mar-v-in avatar Dec 02 '22 14:12 mar-v-in

So the problem is the Google ban of uncertified devices?

ale5000-git avatar Dec 02 '22 15:12 ale5000-git

I also see that Error=ServerError. Any (new) way to overcome it?

ildar avatar Mar 25 '23 20:03 ildar

switching profile to Pixel helped.

ildar avatar Mar 28 '23 05:03 ildar