-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalStateException in onTokenRequestCompleted() #88
Comments
Downstream OBA issue - OneBusAway/onebusaway-android#870 |
I gather from the stack trace that the call to getFragment().getString() (line 129 in /auth/GoogleAppAuthAuthenticator.java) generates an exception because the SignIn fragment which contains this object is not attached to an activity (https://stackoverflow.com/a/36745804). I get a similar stack trace by removing the SignIn fragment's mHost in a debugger. However, I'm unable to come up with a repro without using the debugger to modify data at runtime. I'm trying to kill the app at various points in the execution but have yet to come up with anything. @barbeau |
I've avoided this issue in other async callbacks related to fragments by checking for If you're simply getting string resources here, another option would be to use the Application context (which should still exist if your code is running) via
That would be great, but how are you going to log this? AFAIK all you get via Android Developer Console is a stack trace, so you'd need to catch the exception and then log via Google Analytics or something similar. But let me know if you have other ideas.
AFAIK as long as your code is running the application context should still exist |
We finally got an unobfuscated stack trace, from a Samsung Galaxy Note8 (greatqlteue), 6144MB RAM, Android 8.0, although this is an NPE and not an
|
From a quick look at the code, it looks like this new NPE and the IllegalStateException are separate issues. |
I opened a new issue for the above NPE at #94. |
Nice I guess |
From the OneBusAway Android rollout via the Android Developer Console - affecting 3 users (3 crashes):
I'm assuming this happens when someone tries to log into Embedded Social in the OBA app and then closes it, likely under poor wireless conditions that cause a significant delay in onTokenRequestCompleted() returning.
Devices affected:
Note that the Note 8 and Pixel 2 are affected, so this does affect flagship devices
The text was updated successfully, but these errors were encountered: