Is there an existing issue for this?
Which plugins are affected?
Messaging
Which platforms are affected?
Android
Description
In the past, I could subscribe to a topic with an encoded apostrophe. For example, a topic named "o%27neal" (no quotes).
Now, when I try to do so, it always hangs, and sometimes prints "Failed to sync topics. Won't retry sync. Topic subscribe failed with status: 400". After this happens, Firebase Messaging is in a bad state; I can no longer subscribe or unsubscribe to any topic unless I uninstall/reinstall the app.
This seems to be Android-specific; I could not repro it on iOS. It is happening for other characters than the apostrophe as well, but I haven't narrowed down the exact character set.
If I revert to the previous version I was using, firebase_messaging 16.2.2, it resolves this issue. So it showed up somewhere between 16.2.2 and 16.5.0.
Reproducing the issue
(set up firebase normally)
await firebaseMessaging.subscribeToTopic("o%27neal");
Firebase Core version
4.13.0
Flutter Version
3.44.0
Relevant Log Output
Flutter dependencies
Expand Flutter dependencies snippet
Dart SDK 3.12.0
Flutter SDK 3.44.0
alerts_for_reddit 3.6.1+35
dependencies:
- age_range_signals 0.8.0 [flutter plugin_platform_interface]
- connectivity_plus 7.3.1 [flutter flutter_web_plugins connectivity_plus_platform_interface web meta nm collection]
- crypto 3.0.7 [typed_data]
- cupertino_icons 1.0.9
- device_info_plus 13.2.0 [device_info_plus_platform_interface ffi file flutter flutter_web_plugins meta web win32 win32_registry]
- file 7.0.1 [meta path]
- firebase_analytics 12.4.6 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_app_installations 0.4.2+7 [firebase_app_installations_platform_interface firebase_app_installations_web firebase_core firebase_core_platform_interface flutter]
- firebase_core 4.13.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_messaging 16.5.0 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_local_notifications 22.3.0 [clock flutter flutter_local_notifications_linux flutter_local_notifications_windows flutter_local_notifications_web flutter_local_notifications_platform_interface timezone]
- flutter_timezone 4.1.1 [flutter flutter_web_plugins]
- html_unescape 2.0.0
- http 1.6.0 [async http_parser meta web]
- in_app_review 2.0.12 [flutter in_app_review_platform_interface]
- intl 0.20.3 [clock meta path]
- oauth2 2.0.5 [collection crypto http http_parser]
- purchases_flutter 10.8.0 [flutter flutter_web_plugins web equatable meta]
- share_plus 13.3.0 [cross_file meta mime flutter flutter_web_plugins share_plus_platform_interface file url_launcher_web url_launcher_windows url_launcher_linux url_launcher_platform_interface ffi web win32]
- shared_preferences 2.5.5 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- url_launcher 6.3.2 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
dev dependencies:
- 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.76 [collection firebase_core firebase_core_platform_interface flutter meta]
- args 2.7.0
- async 2.13.1 [collection meta]
- boolean_selector 2.1.2 [source_span string_scanner]
- characters 1.4.1
- clock 1.1.2
- code_assets 1.2.0 [collection hooks]
- collection 1.19.1
- connectivity_plus_platform_interface 2.1.0 [flutter meta plugin_platform_interface]
- cross_file 0.3.5+2 [meta web]
- dbus 0.7.12 [args ffi meta xml]
- device_info_plus_platform_interface 8.1.0 [flutter meta plugin_platform_interface]
- equatable 2.0.8 [collection meta]
- fake_async 1.3.3 [clock collection]
- ffi 2.2.0
- ffi_leak_tracker 0.1.2 [ffi]
- firebase_analytics_platform_interface 6.0.6 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_analytics_web 0.6.1+12 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins]
- firebase_app_installations_platform_interface 0.1.4+75 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_app_installations_web 0.1.7+12 [_flutterfire_internals firebase_app_installations_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins]
- firebase_core_platform_interface 8.1.1 [collection flutter meta plugin_platform_interface]
- firebase_core_web 3.11.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- firebase_messaging_platform_interface 4.9.3 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 4.2.4 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins meta web]
- fixnum 1.1.1
- flutter_local_notifications_linux 8.0.1 [dbus ffi flutter flutter_local_notifications_platform_interface path xdg_directories]
- flutter_local_notifications_platform_interface 12.2.0 [plugin_platform_interface timezone]
- flutter_local_notifications_web 1.0.0 [collection flutter flutter_local_notifications_platform_interface timezone web]
- flutter_local_notifications_windows 3.1.1 [flutter ffi flutter_local_notifications_platform_interface meta timezone xml]
- flutter_web_plugins 0.0.0 [flutter]
- hooks 2.0.0 [collection crypto logging meta pub_semver record_use yaml]
- http_parser 4.1.2 [collection source_span string_scanner typed_data]
- in_app_review_platform_interface 2.0.5 [flutter url_launcher plugin_platform_interface platform]
- jni 1.0.0 [args collection ffi meta package_config path plugin_platform_interface]
- jni_flutter 1.0.1 [flutter jni]
- 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]
- logging 1.3.0
- matcher 0.12.19 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.13.0 [collection]
- meta 1.18.0
- mime 2.0.0
- nm 0.5.0 [dbus]
- objective_c 9.4.1 [code_assets collection ffi hooks logging meta pub_semver]
- package_config 2.2.0 [path]
- path 1.9.1
- path_provider 2.1.5 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- path_provider_android 2.3.1 [flutter jni jni_flutter path_provider_platform_interface]
- path_provider_foundation 2.6.0 [ffi flutter objective_c path_provider_platform_interface]
- path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_platform_interface 2.1.2 [flutter platform plugin_platform_interface]
- path_provider_windows 2.3.0 [ffi flutter path path_provider_platform_interface]
- petitparser 7.0.2 [meta collection]
- platform 3.1.6
- plugin_platform_interface 2.1.8 [meta]
- pub_semver 2.2.0 [collection]
- record_use 0.6.0 [collection meta pub_semver]
- share_plus_platform_interface 7.2.0 [cross_file flutter meta mime plugin_platform_interface path_provider uuid]
- shared_preferences_android 2.4.23 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.5.6 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.4.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.4.2 [flutter plugin_platform_interface]
- shared_preferences_web 2.4.3 [flutter flutter_web_plugins shared_preferences_platform_interface web]
- shared_preferences_windows 2.4.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- 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.11 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- timezone 0.11.1 [http path]
- typed_data 1.4.0 [collection]
- url_launcher_android 6.3.29 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.4.1 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.2.2 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.2.5 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.3.2 [flutter plugin_platform_interface]
- url_launcher_web 2.4.2 [flutter flutter_web_plugins url_launcher_platform_interface web]
- url_launcher_windows 3.1.5 [flutter url_launcher_platform_interface]
- uuid 4.5.3 [crypto fixnum]
- vector_math 2.2.0
- vm_service 15.1.0
- web 1.1.1
- win32 6.4.0 [ffi ffi_leak_tracker meta]
- win32_registry 3.0.3 [collection ffi ffi_leak_tracker meta win32]
- xdg_directories 1.1.0 [meta path]
- xml 6.6.1 [collection meta petitparser]
- yaml 3.1.3 [collection source_span string_scanner]
Additional context and comments
No response
Is there an existing issue for this?
Which plugins are affected?
Messaging
Which platforms are affected?
Android
Description
In the past, I could subscribe to a topic with an encoded apostrophe. For example, a topic named "o%27neal" (no quotes).
Now, when I try to do so, it always hangs, and sometimes prints "Failed to sync topics. Won't retry sync. Topic subscribe failed with status: 400". After this happens, Firebase Messaging is in a bad state; I can no longer subscribe or unsubscribe to any topic unless I uninstall/reinstall the app.
This seems to be Android-specific; I could not repro it on iOS. It is happening for other characters than the apostrophe as well, but I haven't narrowed down the exact character set.
If I revert to the previous version I was using, firebase_messaging 16.2.2, it resolves this issue. So it showed up somewhere between 16.2.2 and 16.5.0.
Reproducing the issue
(set up firebase normally)
await firebaseMessaging.subscribeToTopic("o%27neal");
Firebase Core version
4.13.0
Flutter Version
3.44.0
Relevant Log Output
Flutter dependencies
Expand
Flutter dependenciessnippetAdditional context and comments
No response