fix(database,android): fix a regression where rapidly opening and closing query streams on the same path could throw#18262
Conversation
…sing query streams on the same path could throw
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
|
Having this solved would be amazing. I think it was introduced years ago in version 9.x.x. #7795 |
|
A couple of unrelated tests are failing in auth and storage on android CI. |
Description
Fixes an Android
firebase_databaseregression where rapidly opening and closing query streams on the same path could throwMissingPluginException(No implementation found for method cancel ...).The Pigeon query observer generated event channel names from the current timestamp and query path hash, which could collide for same-path listeners created close together. Android now uses the plugin's monotonic listener counter for query event channel names and removes disposed stream handlers from the plugin cache.
An Android-only E2E regression test was added to cover cancelling overlapping query streams.
Related Issues
Local Verification
dart analyze tests/integration_test/firebase_database/query_e2e.dart packages/firebase_database/firebase_database_platform_interface/lib/src/method_channel/method_channel_query.dartadb/flutter devices.Checklist
///).melos run analyze) does not report any problems on my PR.Breaking Change