Improve Google Sign In error logging#25446
Conversation
Errors that didn't have specific handling weren't being logged properly. Update logging and print all status codes so we can also see errors we aren't specifically handling.
|
@shawnborton @0xmiroslav One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Julesssss
left a comment
There was a problem hiding this comment.
Changes are fine, can't test until tomorrow morning though
|
@lindboe we had a temporary issue with our AdHoc builds. Would you mind pulling main and merging it into your PR? Thanks |
|
Merged main 👍 |
|
Run adhoc build again, the new QR codes will be available soon |
|
🧪🧪 Use the links below to test this build in android and iOS. Happy testing! 🧪🧪 |
Might be related to sha key mismatch |
|
Perhaps we just need to add the AdHoc signing key to Google Cloud for the AdHoc app. Though I'm not sure if that even exists :/ |
|
@Julesssss A signing key of some kind definitely exists, but it may not work the same way as prod. Debug mode builds are given a generated key (https://developer.android.com/studio/publish/app-signing#debug-mode), so if adhoc builds are in debug mode, (which I would be surprised by, but it's not impossible), then the debug cert might be different per machine and I suppose that could cause problems? At the same time, I don't think that's likely, as that would cause issues testing debug development builds locally, which we've been able to do just fine with Google Sign In on Android. But otherwise, a key of some kind does need to be provided for release builds. When I looked last, the SHA-1 of the ad-hoc build I had was Are you able to access the Google cloud console to change the SHA-1 value for the adhoc app's OAuth config? Can't really do any harm to test new values if the current one isn't working. |
|
Thanks for explaining. Yeah, I'll create an issue for trying that AdHoc key. |
|
I fixed the AdHoc SSO issue in the Google Console, but I think this improvement could still be merged to simplify debugging of future issues |
|
I'm going to merge this. The PR checklist has changed since it was added, so I'm going to ignore that check. |
|
@Julesssss looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.3.84-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.84-10 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.84-10 🚀
|
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 1.3.85-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.3.85-4 🚀
|
Details
@Julesssss reported that Google Sign-In was not working on ad hoc builds: https://expensify.slack.com/archives/C01GTK53T8Q/p1692302447001879
Errors that didn't have specific handling weren't being logged properly. Update logging and print all status codes so we can also see errors we aren't specifically handling.
Fixed Issues
$ #7079
PROPOSAL: #7079 (comment)
Tests
ifbranch for the google sign-in error insrc/components/SignInButtons/GoogleSignIn/index.native.jsso that all errors use theLog.alertstatement insteadOffline tests
n/a, not affected by offline status.
QA Steps
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
n/a, no user-facing changes