Skip to content

[firebase_database]: No implementation found for method cancel #18260

@luccasclezar

Description

@luccasclezar

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Database

Which platforms are affected?

Android

Description

I know this issue was reported a few times here already, but they all were closed for lack of reproduction and I managed to write a reproduction project.

I'm not entirely sure about what triggers this, but by copying a repository class from another project that has this issue and keeping the bare minimum, I managed to reproduce this bug consistently. It can happen when both opening and closing database streams.

This bug only happens with firebase_database >=12.1.0. I tested the project with 12.0.4 and it's working properly.

Reproducing the issue

  1. Run the reproduction project
  2. Wait for it to sign in automatically
  3. Keep clicking the "initialize" button until it crashes (can take from 1 to 8 clicks, but it's pretty quick)

The error will be printed to console and displayed in the on-screen label.

rtdb_crash.zip

rtdb_crash.mp4

Firebase Core version

4.7.0

Flutter Version

3.41.4

Relevant Log Output

D/FirebaseDatabase(21522): 🔍 Kotlin: Setting up query observe for path=debug/system/node
D/FirebaseDatabase(21522): 🔍 Kotlin: Setting up query observe for path=debug/system/node
I/flutter (21522): ══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════
I/flutter (21522): The following MissingPluginException was thrown while de-activating platform stream on channel
I/flutter (21522): firebase_database_query_1778091375886_594583590:
I/flutter (21522): MissingPluginException(No implementation found for method cancel on channel
I/flutter (21522): firebase_database_query_1778091375886_594583590)
I/flutter (21522): 
I/flutter (21522): When the exception was thrown, this was the stack:
I/flutter (21522): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:364:7)
I/flutter (21522): <asynchronous suspension>
I/flutter (21522): #1      EventChannel.receiveBroadcastStream.<anonymous closure> (package:flutter/src/services/platform_channel.dart:726:11)
I/flutter (21522): <asynchronous suspension>
I/flutter (21522): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (21522): Another exception was thrown: MissingPluginException(No implementation found for method cancel on channel firebase_database_query_1778091375886_594583590)

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.11.1
Flutter SDK 3.41.4
rtdb_cancel_error 0.1.0+1

dependencies:
- firebase_auth 6.4.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 4.7.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_database 12.3.0 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]

dev dependencies:
- flutter_lints 6.0.0 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing collection meta stream_channel]

transitive dependencies:
- _flutterfire_internals 1.3.69 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.13.1 [collection meta]
- boolean_selector 2.1.2 [source_span string_scanner]
- characters 1.4.1
- clock 1.1.2
- collection 1.19.1
- fake_async 1.3.3 [clock collection]
- firebase_auth_platform_interface 8.1.9 [_flutterfire_internals collection firebase_core flutter http meta plugin_platform_interface]
- firebase_auth_web 6.1.5 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web]
- firebase_core_platform_interface 6.0.3 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 3.6.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_database_platform_interface 0.3.1+1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_database_web 0.2.7+6 [collection firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins]
- flutter_web_plugins 0.0.0 [flutter]
- http 1.6.0 [async http_parser meta web]
- http_parser 4.1.2 [collection source_span string_scanner typed_data]
- leak_tracker 11.0.2 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.10 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.2 [leak_tracker matcher meta]
- lints 6.1.0
- matcher 0.12.19 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.13.0 [collection]
- meta 1.17.0
- path 1.9.1
- plugin_platform_interface 2.1.8 [meta]
- sky_engine 0.0.0
- source_span 1.10.2 [collection path term_glyph]
- stack_trace 1.12.1 [path]
- stream_channel 2.1.4 [async]
- string_scanner 1.4.1 [source_span]
- term_glyph 1.2.2
- test_api 0.7.10 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- typed_data 1.4.0 [collection]
- vector_math 2.2.0
- vm_service 15.2.0
- web 1.1.1

Additional context and comments

No response

Metadata

Metadata

Assignees

Labels

Needs AttentionThis issue needs maintainer attention.type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions