[firebase_database] No implementation found for method cancel #13513
Labels
Needs Attention
This issue needs maintainer attention.
platform: android
Issues / PRs which are specifically for Android.
plugin: messaging
type: bug
Something isn't working
Is there an existing issue for this?
Which plugins are affected?
Messaging
Which platforms are affected?
Android
Description
This issue is similar to #7795, but the issue is closed.
The crashlog in Firebase and Sentry is
We're using the Firebase database on a single screen with StreamBuilder, without much complex logic like
Currently, we can not reproduce the issue in development, but it's still happens to thousands users everyday.
The issue mainly happens on Samsung device and Android 14
I have checked the
FirebaseDatabasePlugin.java
, Android create the channel and Flutter receive the channel from Androidhttps://github.com/firebase/flutterfire/blob/main/packages/firebase_database/firebase_database/android/src/main/java/io/flutter/plugins/firebase/database/FirebaseDatabasePlugin.java#L359
Android only remove in cleanUp
https://github.com/firebase/flutterfire/blob/main/packages/firebase_database/firebase_database/android/src/main/java/io/flutter/plugins/firebase/database/FirebaseDatabasePlugin.java#L601
And clean cleanUp is only get called when
onDetachedFromEngine
ordidReinitializeFirebaseCore
.I think the above issue can only happens if
onDetachedFromEngine
ordidReinitializeFirebaseCore
get called before Stream get cancel but I don't know if it's possible or not.If you need more detailed information about the issue, I can add more data to the Sentry log and send it after the next release.
Reproducing the issue
We are unable to reproduce this issue; it happens randomly for users.
Firebase Core version
2.32.0
Flutter Version
3.24.0
Relevant Log Output
No response
Flutter dependencies
firebase_auth: ^4.20.0
firebase_core: ^2.32.0
firebase_messaging: ^14.9.4
firebase_database: ^10.5.7
firebase_crashlytics: ^3.5.7
firebase_remote_config: ^4.4.7
android targetSDK:34
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: