microg / GmsCore

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

Google Keep sync, Getting Auth Token fails in Keep #50

Open lambdaupb opened 9 years ago

lambdaupb commented 9 years ago

I noticed that Keep does not sync.

Sadly I know very little about Googles auth system.

Logcat shows a related infos (I removed some sensitive bits):

10-29 14:49:33.097  2278  3233 W AppOps  : Bad call: specified package com.google.android.gms under uid 10107 but it is really 10081
10-29 14:49:33.099  2278  2996 I Xposed  : FakeGApps: faked signature
10-29 14:49:33.106  2278  2295 I Xposed  : FakeGApps: faked signature
10-29 14:49:33.115  3668  3668 D GmsSignInSvc: onBind: Intent { act=com.google.android.gms.signin.service.START pkg=com.google.android.gms }
10-29 14:49:33.125  3668  3668 D GmsPeopleSvc: onBind: Intent { act=com.google.android.gms.people.service.START pkg=com.google.android.gms }
10-29 14:49:33.129  3668  3668 D GmsDriveApiSvc: onBind: Intent { act=com.google.android.gms.drive.ApiService.START pkg=com.google.android.gms }
10-29 14:49:33.140  3668  3686 D GmsSignInSvc: bound by: GetServiceRequest{serviceId=SIGN_IN, gmsVersion=8083000, packageName='com.google.android.keep', scopes=[https://www.googleapis.com/auth/drive, https://www.googleapis.com/auth/drive.appdata], extras=Bundle[{com.google.android.gms.signin.internal.serverClientId=null, com.google.android.gms.signin.internal.usePromptModeForAuthCode=false, com.google.android.gms.signin.internal.offlineAccessRequested=false, com.google.android.gms.common.internal.ClientSettings.sessionId=71052304, com.google.android.gms.signin.internal.idTokenRequested=false, com.google.android.gms.signin.internal.forceCodeForRefreshToken=false}], account=Account {name=my_google_account@gmail.com, type=com.google}}
10-29 14:49:33.140  3668  3686 D GmsSignInSvc: unimplemented Method: handleServiceRequest

10-29 14:49:38.198  2278  2956 I Xposed  : FakeGApps: faked signature
10-29 14:49:38.200  2278  2983 I Xposed  : FakeGApps: faked signature
10-29 14:49:38.207  3668  3685 D GmsAuthManagerSvc: getToken: account:my_google_account@gmail.com scope:oauth2:https://www.googleapis.com/auth/memento https://www.googleapis.com/auth/drive extras:Bundle[{sync_extras=Bundle[EMPTY_PARCEL], androidPackageName=com.google.android.keep, clientPackageName=com.google.android.keep, service_connection_start_time_millis=275809474, authority=com.google.android.keep, handle_notification=true}], notify: true
10-29 14:49:38.216  3668  3685 D GmsAuthManagerSvc: getToken: <<<<<129 chars of base64 token >>>>>
10-29 14:49:38.218 10454 12984 E KeepSync: IOException
10-29 14:49:38.218 10454 12984 E KeepSync: com.google.android.apiary.AuthenticationException: Could not get an auth token
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.apiary.GoogleRequestInitializer.getAuthToken(SourceFile:152)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.apiary.GoogleRequestInitializer.intercept(SourceFile:89)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.keep.util.KeepApiaryClient$KeepRequestInitializer.intercept(SourceFile:238)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.api.client.http.HttpRequest.execute(SourceFile:858)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(SourceFile:410)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(SourceFile:343)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(SourceFile:460)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.keep.util.KeepApiaryClient.syncChanges(SourceFile:212)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.keep.syncadapter.KeepSyncAdapter.syncOnceToServer(SourceFile:317)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.keep.syncadapter.KeepSyncAdapter.onPerformSync(SourceFile:197)
10-29 14:49:38.218 10454 12984 E KeepSync:  at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)
10-29 14:49:38.218 10454 12984 E KeepSync: Caused by: com.google.android.gms.auth.GoogleAuthException: OK
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.gms.auth.GoogleAuthUtil.zza(Unknown)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.gms.auth.GoogleAuthUtil.zzc(Unknown)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.gms.auth.GoogleAuthUtil.getTokenWithNotification(Unknown)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.gms.auth.GoogleAuthUtil.getTokenWithNotification(Unknown)
10-29 14:49:38.218 10454 12984 E KeepSync:  at com.google.android.apiary.GoogleRequestInitializer.getAuthToken(SourceFile:140)
10-29 14:49:38.218 10454 12984 E KeepSync:  ... 10 more
10-29 14:49:38.218 10454 12984 W KeepSync: Sync result 2
10-29 14:49:38.275  2278  2299 D SyncManager: failed sync operation my_google_account@gmail.com u0 (com.google), com.google.android.keep, SERVER, currentRunTime 275804147, reason: AutoSync, SyncResult: stats [ numIoExceptions: 1]

mar-v-in commented 9 years ago

Sadly I know very little about Googles auth system.

Probably not much less than the average Google employee. There is no public documentation of this part of the authentication API.

Seems like Google Keep requires the "Sign In API", which is a successor of the classic Android Auth API and not yet implemented in microG GmsCore. But as this API is rather new, you might be able to find an older version of Google Keep that does not make use of it yet.

Lanchon commented 7 years ago

latest Keep works fine for me. only trouble is i can't use the mike to take voice notes.