Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.12k stars 2.61k forks source link

[HybridApp] Google re-authentication is failing #44709

Open AndrewGable opened 5 days ago

AndrewGable commented 5 days ago

Problem

@tgolen is reporting that Google re-authentication is not working:

Every time my authtoken expires, I am shown the NewDot sign in screen. If I press the Google sign-in button (It’s the only workaround I’ve found), the app crashes, and when I reopen the app I am signed back into NewDot properly.

Solution

Fix it!

trjExpensify commented 4 days ago

The app is crashing for me as well when I click the google sign-in button. I just sent crash logs when prompted in OldApp if it's helpful.

AndrewGable commented 4 days ago

It's crashing on OldApp's Google Sign In page, right?

trjExpensify commented 4 days ago

Yeah, for me.

AndrewGable commented 3 days ago

I see the crash but I cannot figure out the stacktrace. Going to try to reproduce locally

AndrewGable commented 3 days ago

Can't get it to crash via iOS simulator or physical, but it does look like it's only happening on versions 9+, so wondering what changed with HybridApp to break this

AndrewGable commented 3 days ago

cc @staszekscp if you can reproduce. I see the crash in Apple dashboard but I cannot symbolize it. I think it's when the user clicks Google Sign in first time.

staszekscp commented 3 days ago

Sure, I'll have a go with that!

trjExpensify commented 2 days ago

Any luck @staszekscp?

staszekscp commented 2 days ago

I think I can share my current findings:

I noticed that switching to Expensify Classic, signing out, and pressing Continue with Google I am getting a crash. It is caused by going to the background, which retriggers the ReconnectApp method. Unfortunately it fails, because SQLite OnyxDB was deleted by signing out. What is strange for me, is that if I logout within ND, OnyxDB persists, but when I logout within OD OnyxDB gets deleted.

It may be a side effect triggered by the backend, however I will continue investigation on Monday. I have a workaround, but I'll try understand the issue better to find a better solution 😄