Gmscore: Google account already exists on device

Created on 28 May 2019  路  57Comments  路  Source: microg/GmsCore

Steps to reproduce:

  1. Clean install/remove account from settings
  2. Open Gmail/Any app requiring google login
  3. Log in from the web UI prompt.
  4. Everything looks fine, but the app does not receive an account.
  5. Try again to log in and get "this account already exists on device"

The only application where the account works is Google Photos.

microG was not installed as a system application. Network location provider was not setup, but all other checkboxes were checked.

All permissions granted to microg core & apps used.

Versions tested:

  • latest f-droid microg
  • latest nanodroid microg
  • WebView v71
  • WebView v73

running unofficial Lineage 15.1 on whyred
https://forum.xda-developers.com/redmi-note-5-pro/development/rom-unofficial-lineageos-15-1-t3877288

I have logcats but I have to clean sensitive data first. If there is interest, I can PM the log.

馃懃 Google Accounts

Most helpful comment

The issue with some apps not being able to see Google Accounts despite being granted permission is not fixed yet. It is caused by a change in the account permission logic in Android 8+

All 57 comments

Also duplicate of #533

Make sure you grant contacts permission for Google apps manually through system settings, as they tend to not ask for permissions because they are granted automatically by original Google Play Services

@mar-v-in Yes, all permissions were granted to microg core and apps used.

I might try a self-built apk using your newer commits.

PS: Thanks for this amazing project!

@mar-v-in everything is checked many times by many users. Some apps like chrome and gmail can not login (but old versions works as expected).

Tell if you need logs and more info.

Also custom build with latest commits still has this issue

The issue with some apps not being able to see Google Accounts despite being granted permission is not fixed yet. It is caused by a change in the account permission logic in Android 8+

Oh, an another thing: After the first time logging in I get an android system notification "Gmail is requesting permission to account my.[email protected]". Opening this notification allows me to either allow or deny (this doesn't help).

The notification is clearly different than the regular Android permission system. I first suspected it's LineageOS's Privacy Guard, but I have it turned off.

Hi again @mar-v-in

小ustom build with https://github.com/microg/android_packages_apps_GmsCore/commit/30ed2720a0ecd3067fe760e801ecbdbe1b5ff5be test

Chrome login successfully (anyway works weird)
Gmail login - failed

Youtube https://www.youtube.com/watch?v=2ed8a3UPg84
Logcat 2019-05-29-20-03-06.txt

LineageOS 15.1

My experience with Gmail it that it just takes a lot of time to initialize for some reason, but does work.

What worked for me: From clean state (GMail data cleared, account already added to system) grant contacts and google mail permission (and enable the new setting to make accounts visible in microg settings). Then open GMail and navigate through to the point when you have to select the account. If it doesn't display your account yet, do not click to add a new account, go back to system settings and disable+enable sync of google mail for the account and then go back to GMail app.

Beside that, GMail probably doesn't work as well and it might be a good idea to use any other mail client instead.

Thanks for the response, will check.

PS
I use K9 mail client, but lot of people prefer to use gmail (don't know why).

I tested the latest commit, and it does fix the problem at least with WhatsApp. Very nice! I don't need the gmail app, so it's fine if it doesn't work.

Edit: Google Photos does not detect the account either

No, I still can't login gmail.

And now I found similar problem with youtube
On previous build (without https://github.com/microg/android_packages_apps_GmsCore/commit/30ed2720a0ecd3067fe760e801ecbdbe1b5ff5be) everything was fine.
Also problem confirmed on AOSP Extended Pie by other user.

@Nanolx may I ask you to try to login chrome, gmail and youtube for an experiment ?
Thanks

Nope, not working here, aswell. I get alot of E from AccountServiceManager, that it can't determine the packageUid in the logcat. Can post logcat tomorrow.

Am 29. Mai 2019 22:59:10 MESZ schrieb Vladimir Filatov notifications@github.com:

No, I still can't login gmail.

And now I found similar problem with youtube
On previous build (without
https://github.com/microg/android_packages_apps_GmsCore/commit/30ed2720a0ecd3067fe760e801ecbdbe1b5ff5be)
everything was fine.
Also problem confirmed on AOSP Extended Pie by other user.

@Nanolx may I ask you to try to login chrome, gmail and youtube for an
experiment ?
Thanks

--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/microg/android_packages_apps_GmsCore/issues/790#issuecomment-497106777

--
Diese Nachricht wurde von meinem Android-Ger盲t mit K-9 Mail gesendet.

Eh, well, GMail and Google Surveys work, but not Maps, Dive, Chrome or YouTube.

Dunno about previous builds, as I'm normally using K9Mail, NewPipe, Firefox and OsmAnd.

Am 29. Mai 2019 22:59:10 MESZ schrieb Vladimir Filatov notifications@github.com:

No, I still can't login gmail.

And now I found similar problem with youtube
On previous build (without
https://github.com/microg/android_packages_apps_GmsCore/commit/30ed2720a0ecd3067fe760e801ecbdbe1b5ff5be)
everything was fine.
Also problem confirmed on AOSP Extended Pie by other user.

@Nanolx may I ask you to try to login chrome, gmail and youtube for an
experiment ?
Thanks

--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/microg/android_packages_apps_GmsCore/issues/790#issuecomment-497106777

--
Diese Nachricht wurde von meinem Android-Ger盲t mit K-9 Mail gesendet.

Youtube is the only app from gapps family I use =) newpipe is useless for me

@Vavun can you retry YouTube app with 4713797edc21e3f3b2a26194056f63b307e67ef6 ?

@mar-v-in Hi
Will test it as soon as I get home, thanks. Don't know exact time.
Or maybe @Nanolx will do it first.

Oh, just noticed new release.
Is this commit included in 0.2.7 release or I'll should build it by meself ? If included I can test it right now.

For now I checked login with your latest build:
Chrome - OK
GMail - FAIL
YouTube - FAIL

Here's my test results:

  • Drive: OK
  • YouTube: OK
  • Maps: OK
  • Chrome: Fail, I only get the following lines from logcat:
06-01 19:43:16.578  1384 29814 I ActivityManager: START u0 {cmp=com.android.chrome/org.chromium.chrome.browser.signin.AccountSigninActivity (has extras)} from uid 10163
06-01 19:43:16.630  3375  3375 E GoogleCertificates:    at org.chromium.chrome.browser.signin.AccountSigninView.<init>(PG:6)
06-01 19:43:16.630  3375  3375 E GoogleCertificates:    at org.chromium.chrome.browser.signin.AccountSigninActivity.onCreate(PG:24)

As I already said: I don't actually use those apps, I only checked whether they allow login and wether the account is properly connected.

@Vavun did you active the new 'Allow apps to find accounts' setting?

@Nanolx hi
Yes, 'Allow apps to find accounts' activated (I tested both variants)
Strange thing: chome is the only app successfully logged in for me and the only app that failed to log in for you.

PS
I'm still on LineageOS 15.1

UPD

Drive: OK

Drive: FAIL

Yes, I've also wondered why we get the exact opposite result. I'm on AICP 14.0 (Android 9.0/May Build).

When I get home I'll test it on Android 6.0 and 7.1. I don't know what to expect.

@Vavun: The latest change isn't included in the release so you have to compile it yourself.

Yesss !

LineageOS 15.1
YouTube: OK
Drive: OK
Chrome: OK
GMaps: OK
GMail: FAIL

LineageOS 14.1
YouTube: OK
Drive: OK
Chrome: OK
GMaps: OK
GMail: FAIL

LineageOS 13.0
YouTube: OK
Drive: OK
Chrome: OK
GMaps: OK
GMail: FAIL

:-)

@Nanolx I dont know why.
Maybe LOS specific or karma

The latest release just broke everything, except Chromium now asks to use the account. YouTube and Hangouts can't see it and only prompts me to add a new account. I'm on Pie (Havoc)

@baltitenger: You have to enable the option Allow apps to find accounts in microG settings.

Google Voice also doesn't work. Allow apps to find accounts is enabled.

@BeeeWall This might be fixed with the next release, as commit 4713797edc21e3f3b2a26194056f63b307e67ef6 is not included in the current stable 0.2.7.17455 (or create your own build of microG).

I also have Allow apps to find accounts enabled. When should we expect the next release?

@Nanolx Your NanoDroid version seems to fix it for me. Is that commit included in your latest NanoDroid build? If so, I think that it's working.

@BeeeWall Yes, it is.

This has always been problematic with certain apps like gmail, but it has become worse with the recent release from yesterday. Google Play Music used to work for me until yesterday's release. Now that is also stuck in the same "account already exists" loop.

Edit: Even after rolling back, accounts don't work because of a separate issue which, upon searching, seems to be caused by newer chromium versions as webview (74.x at the moment). So accounts were working with the older build since they were signed in before the webview update. To summarize, with the previous microg release, account sign in spins forever. With the recent microg release, account gets added but apps get in to the "account already exists" loop.

Bugreport from 4pda (not mine)
gmail crash on account settings
Lineage OS 14.1
Allow apps to find accounts - enabled
Login - OK

Process: com.google.android.gm
Flags: 0x38cbbe44
Package: com.google.android.gm v61459269 (2019.04.28.246421133.release)
Foreground: Yes
Build: nubia/NX569J/NX569J:6.0.1/MMB29M/eng.nubia.20171127.101623:user/release-keys
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.google.android.gms.accountsettings.action.VIEW_SETTINGS pkg=com.google.android.gms (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1818)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1525)
at android.app.Activity.startActivityForResult(Activity.java:4229)
at md.startActivityForResult(SourceFile:6)
at android.app.Activity.startActivityForResult(Activity.java:4187)
at md.startActivityForResult(SourceFile:3)
at frn.a(SourceFile:18)
at fre.a(Unknown Source)
at nfa.onClick(Unknown Source)
at android.view.View.performClick(View.java:5637)
at android.widget.CompoundButton.performClick(CompoundButton.java:122)
at android.view.View$PerformClick.run(View.java:22433)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6186)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

And yes.
At this moment I am the only microG user on 4pda community who can't login gmail app. On three different devices.
Maybe some kind of account trouble.

I have installed the latest version of GmsCore (17455). I'm seeing the following weird behaviour:

With every Google Services DISABLED --> Google account is successfully added.
With any of the Google Services ENABLED --> Google account fails to be added ("Just a sec..." screen looping forever).

I'm running a custom AOSP build. The Self-Check passes except for the "UnifiedNlp status", which is expected.

Hey, OP here.

The latest version of nanolx-new has fixed all my problems. Gmail, Photos, WhatsApp, Maps, Drive all work fine.

So, IMO this issue should be closed at least after the latest commits are officially released. New issues should be created for any problems.

I built GmsCore-mapbox from source today and can confirm that Maps and Drive work well, fixing the Accounts issue present in v0.2.7.17455.

Google account just broke on youtube for me with 17455. Also can't find "Allow apps to find accounts" as an option in MicroG settings
Running LineageOS for MicroG rom

How already said every existing official build of microG is broken (for now) regarding account handling.
It will works only if you build yourself the latest master or use a fork.

How already said every existing official build of microG is broken (for now) regarding account handling.
It will works only if you build it yourself the latest master or use the fork.

@ale5000-git Check this issue, I had build it from master. Issue 829

You can also use the NanoDroid repo in f-droid and select "Unstable updates". The latest version has everything fixed.

While building from source, are there flags for selecting the old maps implementation or the new one ? gradelew build builds play-services-core-release-unsigned.apk. Which version is it ?

The old maps implementation works fine for me.
Edit: Nevermind. Found the flag.

You can also use the NanoDroid repo in f-droid and select "Unstable updates". The latest version has everything fixed.

Some problem as described in Issue 829

@Eerovil, @Nanolx, when I add the NanoDroid repo to F-Droid, allow the unstable updates and try to update the microg gmscore, I get "Error-7 A previously installed package of the same name has a different signature than the new package". Any idea how to get around that?

@bocekm NanoDroid microG and the official microG are signed with a different key, you have to uninstall the official version first. Note that this means you'll have to resign in to any accounts you are signed in to.

@bocekm To add to this, you need to also clear data, then uninstall and reboot. It should work.

Since it's not possible to uninstall the microG in F-Droid, I tried to wipe data and uninstall it in Titanium Backup, but even after reboot, F-droid still thinks that I have the original microG installed and won't let me update to the NanoDroid version. So, I guess I'll wait till the official microG release.

Google Voice isn't working for me on LineageOS for MicroG. I tried removing GmsCore with a root app remover, and then installing the NanoDroid version, but MicroG settings Self-Check showed that signature spoofing was not activated. Is there a way to activate it for the NanoDroid build?

@chuckwagoncomputing I think you need to flash nanodroid to a system partition for that to work
as LineageOS for MicroG only allows system apps to spoof signatures for security reasons.
Not sure though, haven't tried switching to the nanodroid build yet

There's no technical difference anymore between both builds, so it's of no use to switch between them, especially since mar-v-in released nightlies with the post-release fixes.

Else yes, it needs to be a system app, otherwise it won't work.

Edit: Also the custom build will be dropped with NanoDroid 22.0.

Thanks. Installing it as a system app worked. After the initial reboot it still wasn't spoofing, but with a second reboot it started working.

For whose that still have problems please update to this build and retry.

when is this new build coming to LineageOS for MicroG?
have updated twice to new versions of L4M after the GmsCore build was released, but it still seems to contain the old 17455 build

Edit: Thought lineageOS for MicroG was maintained by the MicroG team, as it's hosted under lineage.microg.org, will ask the relevant repository.

when is this new build coming to LineageOS for MicroG?
have updated twice to new versions of L4M after the GmsCore build was released, but it still seems to contain the old 17455 build

That is something you need to ask over at L4M, as that is not maintained directly by the microg team.

When I click "Sign In" in Google Maps, I get the "Add Account" button but no accounts that I previously added (and when I proceed to add the account, I get the same error mentioned in the title).

I'm not sure if this is a characteristic of Emteria OS but I am still getting this issue with the latest build.

edit: turns out I needed to install Services Framework Proxy. Everything works great!

@jeroen7s: The updated microG is included from 20th of August in LineageOS for microG

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Riamse picture Riamse  路  5Comments

cRaZy-bisCuiT picture cRaZy-bisCuiT  路  4Comments

Teyro picture Teyro  路  4Comments

ghost picture ghost  路  4Comments

n76 picture n76  路  6Comments