microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
8.27k stars 1.7k forks source link

Cannot log in to Google account #975

Closed pmaccarron closed 4 years ago

pmaccarron commented 4 years ago

I can't sign into my google which has a few purchased apps I'd like to access. Whenever I try to sign in I get: "Sorry.... There was a problem communicating with Google servers. Try again later"

This is using Lineage 14.1 with GmsCore-v0.2.10 (or older) on an Nvidia Shield Tablet or a Moto E2.

This used to work on version 0.2.6 however if I roll back now I get the same thing. I just tried another account there and that worked so then attempted to create a family group to share those apps but I couldn't access them without Google Play store shennanigans.

Checking the security settings on each of these google accounts they appear to be set up the same. I tried using the Checkin method in the dialler but that made no difference.

Here is an extract from logcat (full logcat from tablet here and from phone here): --------- beginning of crash 11-05 10:21:01.340 1380 1380 E AndroidRuntime: FATAL EXCEPTION: main 11-05 10:21:01.340 1380 1380 E AndroidRuntime: Process: android.process.media, PID: 1380 11-05 10:21:01.340 1380 1380 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.android.providers.downloads.DownloadProvider: android.database.sqlite.SQLiteException: near ")": syntax error (code 1): , while compiling: SELECT * FROM downloads WHERE () AND ((_id in (484))) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5923) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:5490) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5429) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.app.ActivityThread.-wrap2(ActivityThread.java) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1564) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6186) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: Caused by: android.database.sqlite.SQLiteException: near ")": syntax error (code 1): , while compiling: SELECT * FROM downloads WHERE () AND ((_id in (484))) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.database.sqlite.SQLiteDatabase.validateSql(SQLiteDatabase.java:1699) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:389) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:294) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at com.android.providers.downloads.DownloadProvider.delete(DownloadProvider.java:1250) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at com.android.providers.downloads.DownloadProvider.deleteDownloadsWithIds(DownloadProvider.java:469) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at com.android.providers.downloads.DownloadProvider.onCreate(DownloadProvider.java:454) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1751) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1726) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5920) 11-05 10:21:01.340 1380 1380 E AndroidRuntime: ... 10 more 11-05 10:21:01.357 602 1368 I ActivityManager: Process android.process.media (pid 1380) has died 11-05 10:21:01.357 602 1368 D ActivityManager: cleanUpApplicationRecord -- 1380 11-05 10:21:01.380 602 616 I ActivityManager: Start proc 1501:de.j4velin.wallpaperChanger/u0a75 for broadcast de.j4velin.wallpaperChanger/.receiver.MediaMountedReceiver 11-05 10:21:01.536 602 1388 I ActivityManager: Start proc 1537:android.process.media/u0a7 for broadcast com.android.providers.downloads/.DownloadReceiver 11-05 10:21:01.699 1537 1537 E AndroidRuntime: FATAL EXCEPTION: main 11-05 10:21:01.699 1537 1537 E AndroidRuntime: Process: android.process.media, PID: 1537 11-05 10:21:01.699 1537 1537 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.android.providers.downloads.DownloadProvider: android.database.sqlite.SQLiteException: near ")": syntax error (code 1): , while compiling: SELECT * FROM downloads WHERE () AND ((_id in (484))) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5923) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:5490) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5429) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.app.ActivityThread.-wrap2(ActivityThread.java) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1564) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6186) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: Caused by: android.database.sqlite.SQLiteException: near ")": syntax error (code 1): , while compiling: SELECT * FROM downloads WHERE () AND ((_id in (484))) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.database.sqlite.SQLiteDatabase.validateSql(SQLiteDatabase.java:1699) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:389) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:294) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at com.android.providers.downloads.DownloadProvider.delete(DownloadProvider.java:1250) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at com.android.providers.downloads.DownloadProvider.deleteDownloadsWithIds(DownloadProvider.java:469) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at com.android.providers.downloads.DownloadProvider.onCreate(DownloadProvider.java:454) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1751) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1726) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5920) 11-05 10:21:01.699 1537 1537 E AndroidRuntime: ... 10 more 11-05 10:21:01.703 602 1388 W ActivityManager: Process android.process.media has crashed too many times: killing! 11-05 10:21:01.703 602 1388 I ActivityManager: Killing 1537:android.process.media/u0a7 (adj 0): crash 11-05 10:21:01.703 602 1388 D ActivityManager: cleanUpApplicationRecord -- 1537 11-05 10:21:01.709 602 616 W BroadcastQueue: Unable to launch app com.android.providers.media/10007 for broadcast Intent { act=android.intent.action.MEDIA_MOUNTED dat=file:///storage/emulated/0 flg=0x4000010 (has extras) }: process is bad 11-05 10:21:01.766 602 614 I ActivityManager: Start proc 1566:org.fdroid.fdroid/u0a61 for broadcast org.fdroid.fdroid/.nearby.WifiStateChangeReceiver 11-05 10:21:02.205 602 1402 I ActivityManager: Start proc 1590:org.cyanogenmod.cmparts/1000 for broadcast org.cyanogenmod.cmparts/.BootReceiver 11-05 10:21:02.369 1343 1343 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1357 android.content.ContextWrapper.startService:613 android.content.ContextWrapper.startService:613 com.nvidia.NvCPLSvc.NvCPLService.lw:-1 com.nvidia.NvCPLSvc.NvCPLBootReceiver.onReceive:-1 11-05 10:21:02.384 602 1623 I BootReceiver: Copying /sys/fs/pstore/console-ramoops to DropBox (SYSTEM_LAST_KMSG) 11-05 10:21:02.405 602 1623 I BootReceiver: Copying audit failures to DropBox 11-05 10:21:02.410 602 1623 I BootReceiver: Copied 10201 worth of audits to DropBox 11-05 10:21:02.411 602 613 I ActivityManager: Start proc 1624:com.windscribe.vpn/u0a81 for broadcast com.windscribe.vpn/.bootreceiver.WindscribeBootReceiver 11-05 10:21:02.418 602 1623 I BootReceiver: Checking for fsck errors 11-05 10:21:02.433 602 1623 I ActivityManager: Start proc 1639:android.process.media/u0a7 for content provider com.android.providers.downloads/.DownloadProvider 11-05 10:21:02.463 1343 1343 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:877 android.content.ContextWrapper.sendBroadcast:421 com.nvidia.NvCPLSvc.power.b.cc:-1 com.nvidia.NvCPLSvc.power.b.bt:-1 com.nvidia.NvCPLSvc.power.b.<init>:-1 11-05 10:21:02.505 1639 1639 E AndroidRuntime: FATAL EXCEPTION: main 11-05 10:21:02.505 1639 1639 E AndroidRuntime: Process: android.process.media, PID: 1639 11-05 10:21:02.505 1639 1639 E AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.android.providers.downloads.DownloadProvider: android.database.sqlite.SQLiteException: near ")": syntax error (code 1): , while compiling: SELECT * FROM downloads WHERE () AND ((_id in (484))) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5923) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:5490) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5429) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.app.ActivityThread.-wrap2(ActivityThread.java) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1564) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6186) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: Caused by: android.database.sqlite.SQLiteException: near ")": syntax error (code 1): , while compiling: SELECT * FROM downloads WHERE () AND ((_id in (484))) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.database.sqlite.SQLiteDatabase.validateSql(SQLiteDatabase.java:1699) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:389) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:294) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at com.android.providers.downloads.DownloadProvider.delete(DownloadProvider.java:1250) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at com.android.providers.downloads.DownloadProvider.deleteDownloadsWithIds(DownloadProvider.java:469) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at com.android.providers.downloads.DownloadProvider.onCreate(DownloadProvider.java:454) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1751) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1726) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5920) 11-05 10:21:02.505 1639 1639 E AndroidRuntime: ... 10 more

ale5000-git commented 4 years ago

Have you tried 0.2.10?

pmaccarron commented 4 years ago

Yes, sorry I should have stated that, I updated the post.

Helios747 commented 4 years ago

Can reproduce. Running 0.2.10.19420 on a signature patched but otherwise unmodified AOSP pie. Self check passes all tests. System webview is the AOSP webview, version 66.0.3359.158

My account has 2FA enabled if relevant.

pmaccarron commented 4 years ago

I did some more testing with the two accounts, neither have 2FA enabled or a phone number associated with. The one that doesn't work this is what the relevant part of the logcat looks like: 11-12 08:21:05.107 1176 8607 W AccountManagerService: insertAccountIntoDatabase: Account {name=*****@gmail.com, type=com.google}, skipping since the account already exists 11-12 08:21:05.108 3125 9311 W GmsAuthLoginBrowser: Account NOT created! 11-12 08:21:06.283 3125 4437 D OpenGLRenderer: endAllActiveAnimators on 0x9ac66380 (RippleDrawable) with handle 0x9cf62ac0 11-12 08:21:06.459 1897 1897 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL' 11-12 08:21:06.467 1176 1768 D WifiStateMachine: updateCapabilities for config:TNCAPE993CFfalse,false 11-12 08:21:08.335 1821 1821 I SlideTouchEvent: vel=0.14433149, MinimumFlingVelocity=75 11-12 08:21:08.356 1176 3031 I ActivityManager: START u0 {flg=0x10804000 cmp=com.android.systemui/.recents.RecentsActivity} from uid 10033 on display 0 11-12 08:21:08.527 1176 1187 I art : Background partial concurrent mark sweep GC freed 98810(4MB) AllocSpace objects, 14(400KB) LOS objects, 33% free, 12MB/18MB, paused 3.323ms total 132.054ms 11-12 08:21:09.528 1897 1897 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'

The account that does work gets the following: 11-12 08:22:31.306 9167 9184 I ContactDirectoryManager: Discovered 0 contact directories in 255ms 11-12 08:22:31.645 3125 9410 D GmsAuthManager: token present, but expired 11-12 08:22:31.648 3125 9410 D GmsAuthManager: token present, but expired 11-12 08:22:31.661 3125 9410 D GmsHttpFormClient: -- Request -- 11-12 08:22:31.661 3125 9410 D GmsHttpFormClient: androidId=393d60b8ec9989ce&app=com.google.android.gms&client_sig=38918a453d07199354f8b19af05ec6562ced5788&callerPkg=com.google.android.gms&callerSig=38918a453d07199354f8b19af05ec6562ced5788&device_country=ie&Email=***%40gmail.com&google_play_services_version=19420000&has_permission=1&lang=en_IE&operatorCountry=ie&sdk_version=25&service=oauth2%3Ahttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&source=android&system_partition=1&Token=aas_et%2FAKppINaPQS9LRqgqRSIfG1k67tRzlcbcc21TJflHdZAJFm3m-JvMJoyPn8bUlncdNXM5NFAXuTbeSyPTM6b272Sof2Ha7jSNeoIDnDEA7TQG03kME_HD1YbOF4ujHj4IK11ZXgJjG81AzN0LL7BKOsXqvlJjXDKcPzOShAXjPbKYj_i8B57BdM7juMq0AnrGi36_NnNwT3g7nvXsqR8OiuU%3D 11-12 08:22:31.766 3125 9410 D GmsHttpFormClient: -- Response -- 11-12 08:22:31.766 3125 9410 D GmsHttpFormClient: Auth=ya29.ItMBsAcR8qKBCE5dm-8lXCFerJ5hDcuyCQRCCN4Ui7EM3iMUOhl8yMCwf9K-0kN5peuE2RXHz-_XzwpbRZnO0SSkXYwG_dntOO82YeAuS2OlRFG9KUjykyOPBsRnkQzvmUzVJwQ3GEMAMKelZclRLGZh6CWCjNXDlYS1CXvm5FDmBamhraR5PaICo-QQ--O0f5zq32bkc0WaAMKn5fs4t7kbmN-eUdT-clLsrdV-FlbelHeq_ibsbXSr70UvOAB-7Deh1UfaOK_FdNTHwxbTgrUtfoDv2A 11-12 08:22:31.766 3125 9410 D GmsHttpFormClient: issueAdvice=auto 11-12 08:22:31.766 3125 9410 D GmsHttpFormClient: Expiry=1573550731 11-12 08:22:31.766 3125 9410 D GmsHttpFormClient: storeConsentRemotely=0 11-12 08:22:31.766 3125 9410 D GmsHttpFormClient: isTokenSnowballed=0 11-12 08:22:32.240 3125 9410 D GmsHttpFormClient: -- Request -- 11-12 08:22:32.240 3125 9410 D GmsHttpFormClient: There is a big long string then and it's okay.

So seemingly the problem is the AccountManagerService already has my account and doesn't know what do then. Is it possible to remove entries from this easily? Clearing cache and dalvik didn't make a difference.

ildar commented 4 years ago

the kinda workaround (BEWARE: you'll lose all your accounts on your device!) was published before: https://github.com/microg/android_packages_apps_GmsCore/issues/505#issuecomment-386449145 . But that's obviously overkill: you can just delete one raw from the accounts table in the DBs.

pmaccarron commented 4 years ago

Thanks ildar, that solved it for me!

Distac commented 2 years ago

I have a same problem and thanks to ildar and schmatzler from #505 (comment) I had to edit these files with SQL Editor and delete your old Google Account Row 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