I am unable to add any google accounts to the device.
I am running LineageOS 14.1 on a OnePlus3
I have confirmed that I have the latest microG versions (updated through F-Droid) and that GmsCore is in /system/priv-app and has android permissions granted.
I can go through the login process, but it hangs on the "Just a Sec" screen. I took a logcat and redacted all sensitive information (It does look like the login succeeded):
03-18 12:23:28.765 9208 9208 D GmsAuthLoginBrowser: pageFinished: https://accounts.google.com/EmbeddedSetup/signinconsent?[REDACTED]
03-18 12:23:28.771 9208 10733 D GmsHttpFormClient: -- Request --
03-18 12:23:28.771 9208 10733 D GmsHttpFormClient: accountType=HOSTED_OR_GOOGLE&add_account=1&[REDACTED]
03-18 12:23:28.775 11120 11120 I cnss-daemon: RTM_NEWROUTE Indication
03-18 12:23:28.775 11120 11120 I cnss-daemon: ip type is ipv6
03-18 12:23:28.854 18298 18298 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'
03-18 12:23:28.858 18298 18298 D wpa_supplicant: CTRL-DEBUG: global_ctrl_sock-sendto: sock=9 sndbuf=212992 outq=0 send_len=61
03-18 12:23:29.226 9208 10733 D GmsHttpFormClient: -- Response --
03-18 12:23:29.226 9208 10733 D GmsHttpFormClient: Token=[REDACTED]
03-18 12:23:29.226 9208 10733 D GmsHttpFormClient: Auth=[REDACTED]
03-18 12:23:29.226 9208 10733 D GmsHttpFormClient: SID=[REDACTED]
03-18 12:23:29.226 9208 10733 D GmsHttpFormClient: LSID=[REDACTED]
03-18 12:23:29.226 9208 10733 D GmsHttpFormClient: services=mail,talk,multilogin,omaha,android,cl,friendview,chromiumsync,writely,youtube[REDACTED]
03-18 12:23:29.226 9208 10733 D GmsHttpFormClient: Email=[REDACTED]
03-18 12:23:29.226 9208 10733 D GmsHttpFormClient: GooglePlusUpdate=0
03-18 12:23:29.226 9208 10733 D GmsHttpFormClient: firstName=[REDACTED]
03-18 12:23:29.226 9208 10733 D GmsHttpFormClient: lastName=[REDACTED]
03-18 12:23:29.264 17854 18488 W AccountManagerService: insertAccountIntoDatabase: Account {name=[REDACTED]@gmail.com, type=com.google}, skipping since the account already exists
03-18 12:23:29.266 9208 10733 W GmsAuthLoginBrowser: onException: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
03-18 12:23:31.873 18298 18298 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'
03-18 12:23:31.881 18298 18298 D wpa_supplicant: CTRL-DEBUG: global_ctrl_sock-sendto: sock=9 sndbuf=212992 outq=0 send_len=61
03-18 12:23:34.891 18298 18298 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'
03-18 12:23:34.896 18298 18298 D wpa_supplicant: CTRL-DEBUG: global_ctrl_sock-sendto: sock=9 sndbuf=212992 outq=0 send_len=61
I do see these lines:
03-18 12:23:29.264 17854 18488 W AccountManagerService: insertAccountIntoDatabase: Account {name=[REDACTED]@gmail.com, type=com.google}, skipping since the account already exists
It seems to think that the account already exists, though it isn't in Settings>Accounts.
I would try removing the device from the Google account security center on a computer, then attempting to sign in again.
This could also be a manifestation of #510.
@qntf: Have you tried with the version 0.2.4-111 of microG GmsCore?
Yes, now I get a specific error about being unable to add the account.
The fix does seem to be the one here: https://github.com/microg/android_packages_apps_GmsCore/pull/478/
However, I have verified that the account is NOT already added to the device (in device settings > Accounts), and I have tried revoking the device's access via myaccount on google, but I can't add the account.
I'm pretty sure this is the key: (from logcat)
03-18 12:23:29.264 17854 18488 W AccountManagerService: insertAccountIntoDatabase: Account {name=[REDACTED]@gmail.com, type=com.google}, skipping since the account already exists
There seems to be some sort of "ghost" account in the database that isn't actually in the device accounts. Anyone know how to solve this?
What is the content of /data/system/sync/accounts.xml?
Same problem here:
05-03 23:18:55.365 1808 3304 W AccountManagerService: insertAccountIntoDatabase: Account {[email protected], type=com.google}, skipping since the account already exists
05-03 23:18:55.366 5660 6653 W GmsAuthLoginBrowser: Account NOT created!
/system/data does not exist.
But there is /data/system.
I tried to delete:
/data/system_de/0/accounts_de.db
/data/system/sync/accounts.xml
This deletes all of my stored accounts, but the error still persists.
When I wipe /data completely, logging in works again - so it must be something in there.
Fixed it!
I had to delete these files to properly remove the Google account and be able to relogin:
/data/system_de/0/accounts_de.db
/data/system_ce/0/accounts_ce.db
/data/system/sync/accounts.xml
I found a similar bug at the nextcloud project and they solved it like this:
https://github.com/nextcloud/android/pull/949
Maybe a similar fix can be incorporated into microG.
Are these accounts databases recreated by Android after you delete them?
Yes the files are recreated after a reboot on LOS 14.1.
The problem should be fixed in the new version of microG GmsCore released yesterday, please try it and report back.
Most helpful comment
Fixed it!
I had to delete these files to properly remove the Google account and be able to relogin:
/data/system_de/0/accounts_de.db/data/system_ce/0/accounts_ce.db/data/system/sync/accounts.xmlI found a similar bug at the nextcloud project and they solved it like this:
https://github.com/nextcloud/android/pull/949
Maybe a similar fix can be incorporated into microG.