Is there an existing issue for this?
Which plugins are affected?
Auth
Which platforms are affected?
Android
Description
I see from Crashlytics this crash happening sometimes:
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: [firebase_auth/no-such-provider] User was not linked to an account with the given provider.. Error thrown main.
at FirebaseAuthUserHostApi.getIdToken(messages.pigeon.dart:1605)
at MethodChannelUser.getIdTokenResult(method_channel_user.dart:58)
It happens sometimes when I call User.getIdTokenResult. The error code no-such-provider cannot be correct because only User.unlink should give that error code. I have no idea what is the actual error happening here, because I cannot reproduce the issue myself.
I think the problem is on this line:
https://github.com/firebase/flutterfire/blob/master/packages/firebase_auth/firebase_auth/android/src/main/java/io/flutter/plugins/firebase/auth/FlutterFirebaseAuthPluginException.java#L69
It makes a very unsafe assumption that any ExecutionException is always no-such-provider.
Reproducing the issue
I cannot reproduce the issue, but it happens when User.getIdTokenResult is called.
Firebase Core version
2.31.0
Flutter Version
3.22.0
Relevant Log Output
No response
Flutter dependencies
No response
Additional context and comments
No response
Is there an existing issue for this?
Which plugins are affected?
Auth
Which platforms are affected?
Android
Description
I see from Crashlytics this crash happening sometimes:
It happens sometimes when I call
User.getIdTokenResult. The error codeno-such-providercannot be correct because onlyUser.unlinkshould give that error code. I have no idea what is the actual error happening here, because I cannot reproduce the issue myself.I think the problem is on this line:
https://github.com/firebase/flutterfire/blob/master/packages/firebase_auth/firebase_auth/android/src/main/java/io/flutter/plugins/firebase/auth/FlutterFirebaseAuthPluginException.java#L69
It makes a very unsafe assumption that any
ExecutionExceptionis alwaysno-such-provider.Reproducing the issue
I cannot reproduce the issue, but it happens when
User.getIdTokenResultis called.Firebase Core version
2.31.0
Flutter Version
3.22.0
Relevant Log Output
No response
Flutter dependencies
No response
Additional context and comments
No response