getting crash in crashlytics "Fatal Exception: java.lang.IllegalStateException No authorization configuration available for refresh request net.openid.appauth.AuthState.createTokenRefreshRequest"
See original GitHub issueFatal Exception: java.lang.IllegalStateException: **No authorization configuration available for refresh request**
at net.openid.appauth.AuthState.createTokenRefreshRequest(AuthState.java:615)
at net.openid.appauth.AuthState.createTokenRefreshRequest(AuthState.java:601)
at com.repository.LoginRepository$performRefreshTokenRequest$1.invokeSuspend(LoginRepository.java:66)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.java:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.java:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.java:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.java:665)
I am updating AuthorizationResponse also once receiving response, but getting this crash on refreshing token. Thing is it is not happening on all devices.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Firebase Crashlytics crashes not being reported to the ...
When you open the Firebase Crashlytics page, it defaults to applying the 'Event type = "Crashes"' filter. Unhandled exceptions in Flutter ...
Read more >How to solve java.lang.illegalstateexception in firebase ...
on clicking on the login button the app crashes and shows the following error message in the logcat java.lang.IllegalStateException: Not ...
Read more >java.lang.Error" firebase crashlityic Log - Unity Forum
When I check the error logs on crashlytic,Bug some logs always like this: Caused by java.lang.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just stumbled upon this thread and was about to ask for help because I had the same exception, looking once more over my own code I realized that I did not update my authState with the AuthorizationResponse.
for me it works now like that:
after logging in the intent provides me with an AuthorizationResponse or AuthorizationException
val authorizationResponse = AuthorizationResponse.fromIntent(data)
val authorizationException = AuthorizationException.fromIntent(data)
update authState with response and exception
authState?.update(authorizationResponse, authorizationException)
then I exchange the authcode for the actual tokens:
authService.performTokenRequest(authorizationResponse.createTokenExchangeRequest()) { tokenResponse, exception ->
authState.update(tokenResponse, exception)
//do something with tokens or persist them, e.g.: authState.accessToken
then when I come back to try to cal createTokenRefreshRequest the lastAuthorizationResponse is not null anymore and the refresh works perfectly.
val tokenRefreshRequest = authState.createTokenRefreshRequest()
authService.performTokenRequest(tokenRefreshRequest) { response, exception ->
//again dont forget to update authstate
authState.update(response, exception)
//do something with tokens or persist them, e.g.: authState.accessToken
maybe that helps you as well
We ran into this issue too. The challenge and from my opinion wrong behaviour is that you get this error only once per app session. We get this error from
AuthState
hereThrowing this error should also clear
mPendingActions
as the last action was canceled due to error. BecauseAuthState
did not clear it each further request end here silently inperformActionWithFreshTokens()
:We actually solved our issue by a workaround. Our implementation uses a non-standard one-time-password for a seamless login after a user registers a new account. So we feed the
AuthStateManager
with a fakeAuthorizationResponse