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
PlatformException(token_failed, Concurrent operations detected: token, token, null, null) #224
Comments
I had the same error: PlatformException (PlatformException(token_failed, Concurrent operations detected: token, token, null, null)) this error doesn't happen when I run through the terminal, with the command "flutter run", but it does happen when I run through vscode |
This is Android-specific and required with the way Android works. As implied by the error, this would mean your application is making concurrent calls to the plugin where it's not waiting for an operation to finish before starting another one. You would need to check your application to track down where this is happening and address it |
It would be great if flutter_appauth could serialize access to this API on Android, to avoid this issue. Otherwise, any apps that do concurrent downloads (or other HTTP access) that involves refreshing tokens (perhaps to different OIDC providers) will need to essentially serialize this access |
This is also the case for me. Works on ios, works on android using flutter run but when launching with vscode i encounter the same issue. My launch.json:
|
Has anyone overcome this issue with this error? PlatformException(token_failed, Concurrent operations detected: token, token, null, null) How would a solution to serialize the plug-in access on token refresh looks like? Any hints someone? |
Ok... stumbled over AsyncCache. By now it seems to fix the problem. |
This is also a problem when we run background operations that start their own flutter engine. Syncing these only because of the plugin is cumbersome. |
Any solution Here ? initAction() async {
} Future init() async {
} PlatformException(token_failed, Concurrent operations detected: token, token, null, null) same error |
In our case this issue appeared on Android because we had multiple This is the interceptor, a singleton:
this is the method that prevents refreshing to happen at the same time:
and the actual method for refreshing the token:
|
When I am refreshing the token
I am getting this error only on Android:
PlatformException(token_failed, Concurrent operations detected: token, token, null, null)
The text was updated successfully, but these errors were encountered: