Skip to content
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

Can't add google account to device. #505

Closed
qntf opened this issue Mar 18, 2018 · 12 comments
Closed

Can't add google account to device. #505

qntf opened this issue Mar 18, 2018 · 12 comments

Comments

@qntf
Copy link

qntf commented Mar 18, 2018

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

@qntf
Copy link
Author

qntf commented Mar 18, 2018

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.

@rob-3
Copy link

rob-3 commented Mar 26, 2018

I would try removing the device from the Google account security center on a computer, then attempting to sign in again.

@rob-3
Copy link

rob-3 commented Mar 26, 2018

This could also be a manifestation of #510.

@ale5000-git
Copy link
Member

@qntf: Have you tried with the version 0.2.4-111 of microG GmsCore?

@qntf
Copy link
Author

qntf commented Apr 13, 2018

Yes, now I get a specific error about being unable to add the account.

@qntf
Copy link
Author

qntf commented Apr 13, 2018

The fix does seem to be the one here: #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?

@JonnyTech
Copy link

JonnyTech commented Apr 13, 2018

What is the content of /data/system/sync/accounts.xml?

@lichtmetzger
Copy link

lichtmetzger commented May 3, 2018

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.

@lichtmetzger
Copy link

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:
nextcloud/android#949

Maybe a similar fix can be incorporated into microG.

@ghost
Copy link

ghost commented May 3, 2018

Are these accounts databases recreated by Android after you delete them?

@lichtmetzger
Copy link

Yes the files are recreated after a reboot on LOS 14.1.

@ale5000-git
Copy link
Member

ale5000-git commented Jun 2, 2019

The problem should be already fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants