Skip to content

fix(database,android): fix a regression where rapidly opening and closing query streams on the same path could throw#18262

Merged
russellwheatley merged 1 commit into
mainfrom
fix/18260
May 11, 2026
Merged

fix(database,android): fix a regression where rapidly opening and closing query streams on the same path could throw#18262
russellwheatley merged 1 commit into
mainfrom
fix/18260

Conversation

@Lyokone
Copy link
Copy Markdown
Contributor

@Lyokone Lyokone commented May 7, 2026

Description

Fixes an Android firebase_database regression where rapidly opening and closing query streams on the same path could throw MissingPluginException(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.dart
  • Android E2E verification was attempted, but the local emulator/ADB session became unresponsive during install and started hanging on adb/flutter devices.

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

…sing query streams on the same path could throw
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

@robindijkhof
Copy link
Copy Markdown

Having this solved would be amazing. I think it was introduced years ago in version 9.x.x. #7795

@russellwheatley
Copy link
Copy Markdown
Member

A couple of unrelated tests are failing in auth and storage on android CI.

@russellwheatley russellwheatley merged commit e23347b into main May 11, 2026
48 of 61 checks passed
@russellwheatley russellwheatley deleted the fix/18260 branch May 11, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[firebase_database]: No implementation found for method cancel

4 participants