Skip to content

[com.google.android.gms] Infinite loading when switching to work account in Google Apps #2847

Description

@Caquin1950

Name: Google Apps, in this case Google Drive
Package id: [com.google.android.gms]

Trying to load into any app using a Google Workspace account results in either infinite loading or "check your connection" error. Gmail, Drive, Docs all behave the same. Normal Google accounts work fine, the error only happens when trying to use my university Google account.

Steps to reproduce the behavior:

  1. Add Workspace Account into MicroG settings
  2. Open any Google App (e.g. gmail, drive, docs, etc.)
  3. No content will be loaded (no mails for gmail, files for drive, etc.)
  4. App will continue to try to load unsuccessfully.

Image
Image

Android Version: HarmonyOS 4.2.0.189
microG Services: v0.3.6.244735-hw
microG Self-Check results: All ticked

I'm not familiar with creating logs with ADB, but with the help of ChatGPT in setting up and hiding sensitive data I came up with the following log, that I found that it repeats itself endlessly:

04-03 02:55:04.817 W/GmsAuthenticator( 5541): java.io.IOException: {
04-03 02:55:04.817 W/GmsAuthenticator( 5541):   "error": {
04-03 02:55:04.817 W/GmsAuthenticator( 5541):     "code": 429,
04-03 02:55:04.817 W/GmsAuthenticator( 5541):     "message": "Resource has been exhausted (e.g. check quota).",
04-03 02:55:04.817 W/GmsAuthenticator( 5541):     "status": "RESOURCE_EXHAUSTED"
04-03 02:55:04.817 W/GmsAuthenticator( 5541):   }
04-03 02:55:04.817 W/GmsAuthenticator( 5541): }
04-03 02:55:04.817 W/GmsAuthenticator( 5541): 
04-03 02:55:04.817 W/GmsAuthenticator( 5541): 	at org.microg.gms.cryptauth.CryptAuthRequestsKt$cryptAuthQuery$2.invokeSuspend(CryptAuthRequests.kt:124)
04-03 02:55:04.817 W/GmsAuthenticator( 5541): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
04-03 02:55:04.817 W/GmsAuthenticator( 5541): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
04-03 02:55:04.817 W/GmsAuthenticator( 5541): 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
04-03 02:55:04.817 W/GmsAuthenticator( 5541): 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
04-03 02:55:04.817 W/GmsAuthenticator( 5541): 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
04-03 02:55:04.817 W/GmsAuthenticator( 5541): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
04-03 02:55:04.817 W/GmsAuthenticator( 5541): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
04-03 02:55:04.817 W/GmsAuthenticator( 5541): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

04-03 02:55:08.302 I/ActivityManager( 1761): power push bindservice callingPkg:com.google.android.apps.docs, pkg:com.google.android.gms, callerApp pid:XXXXX, pid:XXXXX
04-03 02:55:08.303 I/PG_ash  ( 2848): pkg com.google.android.apps.docs calling: com.google.android.gms, pid: XXXXX ,type: bindservice

04-03 02:55:09.373 D/GmsAuthenticator( 5541): getAuthToken: Account {name=**********, type=com.google}, oauth2:**********, Bundle[{androidPackageName=com.google.android.apps.docs, callerPid=XXXXX, callerUid=XXXXX}]
04-03 02:55:09.374 D/GmsAuthManager( 5541): token present, but expired

04-03 02:55:09.377 D/GmsHttpFormClient( 5541): -- Request --
04-03 02:55:09.377 D/GmsHttpFormClient( 5541): androidId=null&app=com.google.android.apps.docs&client_sig=**********&callerPkg=com.google.android.gms&callerSig=**********&device_country=XX&Email=**********%40**********&google_play_services_version=**********&is_called_from_account_manager=1&_opt_is_called_from_account_manager=1&lang=XX_XX&operatorCountry=XX&sdk_version=XX&service=oauth2%3A**********&source=android&Token=**********
04-03 02:55:09.398 D/GmsAccountErrorResolve( 5541): Error was: DeviceManagementScreenlockRequired. Diagnosis: CryptAuthSyncKeys.
04-03 02:55:09.398 D/GmsAccountErrorResolve( 5541): Resolving account error by performing cryptauth sync keys call.
04-03 02:55:09.408 D/GmsAuthManagerSvc( 5541): onTransact [unknown]: XXXXX, android.os.Parcel@XXXXXXXX, XX
04-03 02:55:09.409 D/GmsAuthManagerSvc( 5541): getToken: account:**********@********** scope:oauth2:https://www.googleapis.com/auth/supportcontent extras:Bundle[{androidPackageName=com.google.android.apps.docs, clientPackageName=com.google.android.apps.docs, service_connection_start_time_millis=XXXXXXXX}], notify: false

04-03 02:55:09.411 D/GmsAuthManager( 5541): token present, but expired
04-03 02:55:09.413 D/GmsHttpFormClient( 5541): -- Request --
04-03 02:55:09.413 D/GmsHttpFormClient( 5541): androidId=null&app=com.google.android.apps.docs&client_sig=**********&callerPkg=com.google.android.apps.docs&callerSig=**********&device_country=XX&Email=**********%40**********&google_play_services_version=**********&lang=XX_XX&oauth2_foreground=1&operatorCountry=XX&sdk_version=XX&service=oauth2%3Ahttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fsupportcontent&source=android&Token=**********

04-03 02:55:09.417 D/GmsAuthManagerSvc( 5541): getToken: account:**********@********** scope:oauth2:https://www.googleapis.com/auth/peopleapi.readonly extras:Bundle[{androidPackageName=com.google.android.apps.docs, clientPackageName=com.google.android.apps.docs, service_connection_start_time_millis=XXXXXXXX}], notify: false

04-03 02:55:09.419 D/GmsAuthManager( 5541): token present, but expired
04-03 02:55:09.421 D/GmsHttpFormClient( 5541): -- Request --
04-03 02:55:09.421 D/GmsHttpFormClient( 5541): androidId=null&app=com.google.android.apps.docs&client_sig=38918a453d07199354f8b19af05ec6562ced5788&callerPkg=com.google.android.apps.docs&callerSig=38918a453d07199354f8b19af05ec6562ced5788&device_country=cl&Email=<MASKED>&google_play_services_version=244735000&lang=en_CL&oauth2_foreground=1&operatorCountry=cl&sdk_version=31&service=oauth2%3Ahttps%3A%2F%2Fwww.googleapis.com%2Fauth%2Fpeopleapi.readonly&source=android&Token=<MASKED>
04-03 02:55:09.438 D/GmsAccountErrorResolve( 5541): Error was: DeviceManagementScreenlockRequired. Diagnosis: CryptAuthSyncKeys.
04-03 02:55:09.438 D/GmsAccountErrorResolve( 5541): Resolving account error by performing cryptauth sync keys call.
04-03 02:55:09.474 D/GmsAccountErrorResolve( 5541): Error was: DeviceManagementScreenlockRequired. Diagnosis: CryptAuthSyncKeys.
04-03 02:55:09.474 D/GmsAccountErrorResolve( 5541): Resolving account error by performing cryptauth sync keys call.
04-03 02:55:09.553 D/GmsHttpFormClient( 5541): -- Request --
04-03 02:55:09.553 D/GmsHttpFormClient( 5541): device=<MASKED>&app=com.google.android.gms&cert=<MASKED>&app_ver=244735012&X-subscription=<MASKED>&X-X-subscription=<MASKED>&X-subtype=<MASKED>&X-X-subtype=<MASKED>&X-app_ver=244735012&X-osv=29&X-cliv=<MASKED>&X-gmsv=244735012&X-appid=<MASKED>&X-scope=GCM&X-app_ver_name=24.47.35%20(190800-%7B%7Bcl%7D%7D)&info=<MASKED>&target_ver=29&sender=<MASKED>
04-03 02:55:09.556 D/GmsHttpFormClient( 5541): -- Request --
04-03 02:55:09.556 D/GmsHttpFormClient( 5541): device=<MASKED>&app=com.google.android.gms&cert=<MASKED>&app_ver=244735012&X-subscription=<MASKED>&X-X-subscription=<MASKED>&X-subtype=<MASKED>&X-X-subtype=<MASKED>&X-app_ver=244735012&X-osv=29&X-cliv=<MASKED>&X-gmsv=244735012&X-appid=<MASKED>&X-scope=GCM&X-app_ver_name=24.47.35%20(190800-%7B%7Bcl%7D%7D)&info=<MASKED>&target_ver=29&sender=<MASKED>
04-03 02:55:09.722 D/GmsHttpFormClient( 5541): -- Request --
04-03 02:55:09.722 D/GmsHttpFormClient( 5541): device=<MASKED>&app=com.google.android.gms&cert=<MASKED>&app_ver=244735012&X-subscription=<MASKED>&X-X-subscription=<MASKED>&X-subtype=<MASKED>&X-X-subtype=<MASKED>&X-app_ver=244735012&X-osv=29&X-cliv=<MASKED>&X-gmsv=244735012&X-appid=<MASKED>&X-scope=GCM&X-app_ver_name=24.47.35%20(190800-%7B%7Bcl%7D%7D)&info=<MASKED>&target_ver=29&sender=<MASKED>
04-03 02:55:09.926 D/GmsDummySvc( 5541): bound by: GetServiceRequest[IN_APP_REACH, packageName="com.google.android.apps.docs", gmsVersion=251225000, scopes=[], extras=Bundle[{}], defaultFeatures=[], apiFeatures=[Feature[account_health_alerts,1], Feature[account_messages,1]], supportsConnectionInfo=true]
04-03 02:55:10.515 D/GmsHttpFormClient( 5541): -- Response --
04-03 02:55:10.515 D/GmsHttpFormClient( 5541): token=<MASKED>
04-03 02:55:10.516 D/GmsHttpFormClient( 5541): -- Response --
04-03 02:55:10.516 D/GmsHttpFormClient( 5541): token=<MASKED>
04-03 02:55:10.523 D/GmsAuthManager( 5541): peekAuthToken: com.google.android.gms:<MASKED>
04-03 02:55:10.527 D/GmsAuthManager( 5541): peekAuthToken: com.google.android.gms:<MASKED>
04-03 02:55:10.562 D/CryptAuthRequests( 5541): {"applicationName":"com.google.android.gms","clientVersion":"1.0.0","syncSingleKeyRequests":[{"keyName":"PublicKey","keyHandles":"<MASKED>"}],"clientMetadata":{"invocationReason":"NEW_ACCOUNT"},"clientAppMetadata":"<MASKED>"}
04-03 02:55:10.562 D/CryptAuthRequests( 5541): {"applicationName":"com.google.android.gms","clientVersion":"1.0.0","syncSingleKeyRequests":[{"keyName":"PublicKey","keyHandles":"<MASKED>"}],"clientMetadata":{"invocationReason":"NEW_ACCOUNT"},"clientAppMetadata":"<MASKED>"}
04-03 02:55:10.654 D/GmsHttpFormClient( 5541): -- Response --
04-03 02:55:10.654 D/GmsHttpFormClient( 5541): token=<MASKED>
04-03 02:55:10.658 D/GmsAuthManager( 5541): peekAuthToken: com.google.android.gms:<MASKED>:oauth2:https://www.googleapis.com/auth/cryptauth
04-03 02:55:10.689 D/CryptAuthRequests( 5541): {"applicationName":"com.google.android.gms","clientVersion":"1.0.0","syncSingleKeyRequests":[{"keyName":"PublicKey","keyHandles":"<MASKED>"}],"clientMetadata":{"invocationReason":"NEW_ACCOUNT"},"clientAppMetadata":"<MASKED>"}

Although I'm note very familiar with Android Development, I'm willing to cooperate with anything as needed! As I mentioned in other comments, this issue has been making me use some tiresome workarounds, so it would be greatly appreciated if it could be fixed! Thanks!

Activity

  1. fynngodau commented on Apr 3, 2025

    @fynngodau
    Member

    Error was: DeviceManagementScreenlockRequired. Diagnosis: CryptAuthSyncKeys.

    Looks like microG believes it can resolve this issue, and furthermore believes that the prerequisites are met.

    Specifically, one of the prerequisites is that Device Registration is enabled. But your androidId is unset. Please try disabling and enabling to trigger a new checkin. You should then see your Android ID in the Device Registration settings.

  2. Caquin1950 commented on Apr 3, 2025

    @Caquin1950
    Author

    I tried disabling and re-enabling Device Registration and also played around with device profiles but I get the same issue, I'll re-check the logs later when I get home.

    I forgot to mention I used ChatGPT to replace any "sensitive information" before uploading (hence some parts of the logs have been replaced with either XXXXXX, ***** and ), but if any of the replaced things is relevant to the issue I can upload them as needed.

    (Possibly irrelevant information: I'm not sure if re-enabling device registration changed my device's ID from the one in the logs, but it does not match the logs now. Also this ID now has letters aswell and the other consists of only numbers)

  3. Caquin1950 commented on Apr 5, 2025

    @Caquin1950
    Author

    So I finally fixed it after more than a year of facing this issue daily. The answer wasn't in "Google Device Registration" on the MicroG settings, but rather it was deeper into the settings in "Google Accounts", specifically the toggle that says "Authenticate with device registration". After enabling it, everything works fine (except for no icon images on any of my accounts).
    Gonna leave this here in case someone needs it in the future.

  4. ale5000-git commented on Apr 5, 2025

    @ale5000-git
    Member

    @fynngodau
    @mar-v-in

    Maybe we should detect this error and show a notification to the user.

  5. fynngodau commented on Apr 5, 2025

    @fynngodau
    Member

    That explains why your androidId wasn't sent. :)

    @ale5000-git I'd rather not add specific behaviour to this feature, but I would be in favour of adding warnings to Self Check that inform the user they configured settings that are (per description) declared to have "unforseen consequences" (like it happened in this case, where none of us thought of this option).

  6. ale5000-git commented on Apr 5, 2025

    @ale5000-git
    Member

    That explains why your androidId wasn't sent. :)

    @ale5000-git I'd rather not add specific behaviour to this feature, but I would be in favour of adding warnings to Self Check that inform the user they configured settings that are (per description) declared to have "unforseen consequences" (like it happened in this case, where none of us thought of this option).

    I also think these 2 settings should be separated a bit more from the others.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions