Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [firebase_messaging] getInitialMessage() returns RemoteMessage.notification only first time #9813

Closed
Shriyanshx opened this issue Oct 28, 2022 · 5 comments · Fixed by #9997
Assignees
Labels
platform: android Issues / PRs which are specifically for Android. plugin: messaging resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working

Comments

@Shriyanshx
Copy link

Bug report

Describe the bug

Steps to reproduce

Confirm app is terminated state.
Send two messages from Firebase Console.
Open app from a notification.
getInitialMessage()
RemoteMessage.notification exists this time.
Exit the app.
Open app from another notification.
getInitialMessage().
RemoteMessage exists, but RemoteMessage.notification not exists this time.
In addition, it seems that "From", "Sent Time", and "Android Properties" cannot be obtained.

Expected behavior

getInitialMessage() should return complete notification payload, it should have "notification" key value object.

Additional context

similar issue
#9438


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
[✓] Flutter (Channel stable, 3.3.0, on macOS 12.5 21G72 darwin-arm, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.72.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability


Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
- alice 0.2.5 [flutter http dio flutter_local_notifications rxdart path_provider permission_handler package_info_plus open_file sensors share chopper better_player collection]
- cached_network_image 3.2.2 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web]
- camera 0.9.8+1 [camera_android camera_avfoundation camera_platform_interface camera_web flutter flutter_plugin_android_lifecycle quiver]
- carousel_slider 4.1.1 [flutter]
- cashfree_pg 2.0.8+28 [flutter flutter_web_plugins]
- chewie 1.3.5 [cupertino_icons flutter provider video_player wakelock]
- connectivity_plus 2.3.7 [flutter connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows]
- cupertino_icons 1.0.5
- device_info 2.0.3 [flutter device_info_platform_interface]
- dio 4.0.6 [http_parser path]
- dio_firebase_performance 0.3.1-dev.3 [flutter dio firebase_performance]
- dotted_border 2.0.0+1 [flutter path_drawing]
- encrypt 5.0.1 [args asn1lib clock collection crypto pointycastle]
- equatable 2.0.5 [collection meta]
- file_picker 4.6.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32]
- firebase_analytics 8.3.4 [firebase_analytics_platform_interface firebase_analytics_web firebase_core flutter meta]
- firebase_core 1.23.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_core_web 1.7.3 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics 2.8.11 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_dynamic_links 4.3.11 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface]
- firebase_messaging 10.0.9 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- firebase_messaging_web 2.4.4 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- firebase_performance 0.7.1+5 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter]
- firebase_performance_web 0.0.3+1 [firebase firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins]
- firebase_remote_config 2.0.18 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_custom_tabs 1.0.4 [flutter flutter_custom_tabs_platform_interface flutter_custom_tabs_web meta]
- flutter_flavor 3.1.1 [flutter]
- flutter_html 2.2.1 [html csslib flutter_layout_grid video_player chewie webview_flutter chewie_audio flutter_svg flutter_math_fork collection numerus flutter]
- flutter_image_compress 1.1.3 [flutter]
- flutter_inappwebview 5.4.3+7 [flutter]
- flutter_launcher_icons 0.9.3 [args image path yaml]
- flutter_local_notifications 9.9.1 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone]
- flutter_screenutil 5.5.4 [flutter]
- flutter_staggered_grid_view 0.5.1 [flutter]
- flutter_svg 0.22.0 [flutter meta path_drawing vector_math xml]
- fluttertoast 8.0.9 [flutter flutter_web_plugins]
- font_awesome_flutter 9.2.0 [flutter]
- freshchat_sdk 0.9.8 [flutter]
- geolocator 8.2.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows]
- get 4.6.5 [flutter]
- google_fonts 2.3.3 [flutter http path_provider crypto]
- hive 2.2.3 [meta crypto]
- hive_flutter 1.1.0 [flutter hive path_provider path]
- html_editor_enhanced 2.4.0+1 [flutter flutter_inappwebview visibility_detector flutter_keyboard_visibility flex_color_picker file_picker numberpicker pointer_interceptor pedantic meta]
- image_gallery_saver 1.7.1 [flutter]
- image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface]
- intl 0.17.0 [clock path]
- json_annotation 4.1.0 [meta]
- logger 1.1.0
- lottie 1.4.3 [archive flutter path vector_math]
- mime_type 1.0.0
- mixpanel_flutter 1.6.0 [flutter flutter_web_plugins js]
- modal_progress_hud_nsn 0.1.0-nullsafety-1 [flutter]
- moengage_flutter 4.2.0 [flutter]
- native_pdf_renderer 5.0.0+1 [flutter pdfx]
- open_file 3.2.1 [flutter ffi]
- package_info_plus 1.4.2 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web]
- path 1.8.2
- path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- permission_handler 8.3.0 [flutter meta permission_handler_platform_interface]
- pie_chart 5.3.2 [flutter]
- pretty_dio_logger 1.2.0-beta-1 [dio]
- retrofit 2.2.0 [dio meta]
- share_plus 2.2.0 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web]
- shimmer 2.0.0 [flutter]
- signature 4.1.1 [flutter image]
- sms_autofill 2.2.0 [pin_input_text_field flutter]
- ss_analytics 0.0.1 [flutter]
- ss_deeplink 0.0.1 [flutter]
- ss_network 1.0.0 [http mime flutter alice logger]
- sticky_headers 0.2.0 [flutter]
- table_calendar 3.0.7 [flutter intl simple_gesture_detector]
- uni_links 0.5.1 [flutter uni_links_platform_interface uni_links_web]
- upgrader 4.6.1 [flutter device_info_plus http os_detect package_info_plus shared_preferences url_launcher version xml html]
- url_launcher 6.1.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- video_player 2.4.7 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web]
- visibility_detector 0.2.2 [flutter]
- youtube_player_iframe 2.3.0 [flutter flutter_inappwebview url_launcher]

dev dependencies:
- build_runner 2.1.11 [args async analyzer build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
- flutter_lints 1.0.4 [lints]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
- hive_generator 1.1.3 [build source_gen hive analyzer source_helper]
- json_serializable 4.1.4 [analyzer build build_config collection json_annotation meta path source_gen]
- lints 1.0.1
- retrofit_generator 2.0.1 [dio source_gen built_collection code_builder tuple retrofit analyzer dart_style build]

dependency overrides:
- photo_view 0.14.0 [flutter]

transitive dependencies:
- _fe_analyzer_shared 22.0.0 [meta]
- _flutterfire_internals 1.0.2 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- analyzer 1.7.2 [_fe_analyzer_shared cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml pedantic]
- archive 3.3.1 [crypto path]
- args 2.3.1
- asn1lib 1.1.1
- async 2.9.0 [collection meta]
- better_player 0.0.82 [flutter cupertino_icons wakelock meta flutter_widget_from_html_core visibility_detector path_provider collection xml]
- boolean_selector 2.1.0 [source_span string_scanner]
- build 2.3.1 [analyzer async convert crypto glob logging meta path]
- build_config 1.0.0 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 3.1.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.0.4 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml]
- build_runner_core 7.2.2 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.4.1 [built_collection collection fixnum meta]
- cached_network_image_platform_interface 2.0.0 [flutter flutter_cache_manager]
- cached_network_image_web 1.0.2 [flutter flutter_cache_manager cached_network_image_platform_interface]
- camera_android 0.9.8+3 [camera_platform_interface flutter flutter_plugin_android_lifecycle stream_transform]
- camera_avfoundation 0.9.8+5 [camera_platform_interface flutter stream_transform]
- camera_platform_interface 2.2.0 [cross_file flutter plugin_platform_interface stream_transform]
- camera_web 0.2.1+6 [camera_platform_interface flutter flutter_web_plugins stream_transform]
- characters 1.2.1
- checked_yaml 2.0.1 [json_annotation source_span yaml]
- chewie_audio 1.3.0 [cupertino_icons flutter video_player]
- chopper 4.0.6 [http meta logging]
- cli_util 0.3.5 [meta path]
- clock 1.1.1
- cloud_firestore_platform_interface 5.7.7 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 2.8.10 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- code_builder 4.3.0 [built_collection built_value collection matcher meta]
- collection 1.16.0
- connectivity_plus_linux 1.3.1 [flutter connectivity_plus_platform_interface meta nm]
- connectivity_plus_macos 1.2.4 [connectivity_plus_platform_interface flutter]
- connectivity_plus_platform_interface 1.2.1 [flutter meta plugin_platform_interface]
- connectivity_plus_web 1.2.3 [connectivity_plus_platform_interface flutter_web_plugins flutter]
- connectivity_plus_windows 1.2.2 [connectivity_plus_platform_interface flutter]
- convert 3.0.2 [typed_data]
- cross_file 0.3.3+2 [js meta]
- crypto 3.0.2 [typed_data]
- csslib 0.17.2 [source_span]
- dart_style 2.1.1 [analyzer args path pub_semver source_span]
- dbus 0.7.3 [args ffi meta xml]
- device_info_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- device_info_plus 3.2.4 [flutter device_info_plus_platform_interface device_info_plus_macos device_info_plus_linux device_info_plus_web device_info_plus_windows]
- device_info_plus_linux 2.1.1 [device_info_plus_platform_interface file flutter meta]
- device_info_plus_macos 2.2.3 [device_info_plus_platform_interface flutter]
- device_info_plus_platform_interface 2.6.1 [flutter meta plugin_platform_interface]
- device_info_plus_web 2.1.0 [device_info_plus_platform_interface flutter_web_plugins flutter]
- device_info_plus_windows 2.1.1 [device_info_plus_platform_interface ffi flutter win32]
- extension 0.2.0
- fake_async 1.3.1 [clock collection]
- ffi 1.2.1
- file 6.1.4 [meta path]
- firebase 9.0.3 [http http_parser js]
- firebase_analytics_platform_interface 2.0.1 [flutter meta]
- firebase_analytics_web 0.3.0+1 [firebase firebase_analytics_platform_interface flutter flutter_web_plugins meta]
- firebase_core_platform_interface 4.5.1 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_crashlytics_platform_interface 3.2.17 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_dynamic_links_platform_interface 0.2.3+15 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_platform_interface 3.5.4 [firebase_core flutter meta plugin_platform_interface]
- firebase_performance_platform_interface 0.0.1+8 [firebase_core flutter plugin_platform_interface]
- firebase_remote_config_platform_interface 1.1.17 [firebase_core flutter meta plugin_platform_interface]
- firebase_remote_config_web 1.1.6 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js]
- fixnum 1.0.1
- flex_color_picker 2.6.1 [flex_seed_scheme flutter]
- flex_seed_scheme 1.0.1 [flutter material_color_utilities meta]
- flutter_blurhash 0.7.0 [flutter]
- flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid]
- flutter_custom_tabs_platform_interface 1.0.1 [flutter plugin_platform_interface meta]
- flutter_custom_tabs_web 1.0.0 [flutter flutter_web_plugins flutter_custom_tabs_platform_interface meta url_launcher_web url_launcher_platform_interface]
- flutter_keyboard_visibility 5.3.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_web flutter]
- flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface]
- flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter]
- flutter_layout_grid 1.0.6 [flutter collection meta quiver]
- flutter_local_notifications_linux 0.5.1 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories]
- flutter_local_notifications_platform_interface 5.0.0 [flutter plugin_platform_interface]
- flutter_math_fork 0.4.2+2 [flutter flutter_svg provider meta collection tuple]
- flutter_plugin_android_lifecycle 2.0.7 [flutter]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- flutter_widget_from_html_core 0.8.5+3 [csslib flutter fwfh_text_style html]
- frontend_server_client 2.1.3 [async path]
- fwfh_text_style 2.22.08+1 [flutter]
- geolocator_android 3.2.1 [flutter geolocator_platform_interface]
- geolocator_apple 2.2.2 [flutter geolocator_platform_interface]
- geolocator_platform_interface 4.0.6 [flutter plugin_platform_interface vector_math meta]
- geolocator_web 2.1.6 [flutter flutter_web_plugins geolocator_platform_interface]
- geolocator_windows 0.1.1 [flutter geolocator_platform_interface]
- glob 2.1.0 [async collection file path string_scanner]
- graphs 2.1.0 [collection]
- html 0.15.0 [csslib source_span]
- http 0.13.5 [async http_parser meta path]
- http_multi_server 3.2.1 [async]
- http_parser 4.0.1 [collection source_span string_scanner typed_data]
- image 3.1.3 [archive meta xml]
- image_picker_android 0.8.5+3 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface]
- image_picker_ios 0.8.6+1 [flutter image_picker_platform_interface]
- image_picker_platform_interface 2.6.1 [cross_file flutter http plugin_platform_interface]
- infinite_listview 1.1.0 [flutter]
- io 1.0.3 [meta path string_scanner]
- js 0.6.4
- logging 1.0.2
- matcher 0.12.12 [stack_trace]
- material_color_utilities 0.1.5
- meta 1.8.0
- mime 1.0.2
- nested 1.0.0 [flutter]
- nm 0.5.0 [dbus]
- numberpicker 2.1.1 [flutter infinite_listview]
- numerus 1.1.1
- octo_image 1.0.2 [flutter flutter_blurhash]
- os_detect 2.0.1
- package_config 2.1.0 [path]
- package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path]
- package_info_plus_macos 1.3.0 [flutter]
- package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface]
- package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface]
- package_info_plus_windows 1.0.5 [package_info_plus_platform_interface ffi flutter win32]
- path_drawing 0.5.1+1 [vector_math meta path_parsing flutter]
- path_parsing 0.2.1 [vector_math meta]
- path_provider_android 2.0.20 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.11 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface]
- path_provider_windows 2.0.7 [ffi flutter path path_provider_platform_interface win32]
- pdfx 1.0.1+1 [flutter flutter_web_plugins plugin_platform_interface js device_info_plus uuid meta extension synchronized universal_platform photo_view vector_math]
- pedantic 1.11.1
- permission_handler_platform_interface 3.7.1 [flutter meta plugin_platform_interface]
- petitparser 5.0.0 [meta]
- pin_input_text_field 4.2.0 [flutter]
- platform 3.1.0
- plugin_platform_interface 2.1.3 [meta]
- pointer_interceptor 0.9.3+3 [flutter]
- pointycastle 3.6.2 [collection convert js]
- pool 1.5.1 [async stack_trace]
- process 4.2.4 [file path platform]
- provider 6.0.3 [collection flutter nested]
- pub_semver 2.1.1 [collection meta]
- pubspec_parse 1.1.0 [checked_yaml collection json_annotation pub_semver yaml]
- quiver 3.1.0 [matcher]
- rxdart 0.27.5
- sensors 2.0.3 [flutter]
- share 2.0.4 [meta mime flutter]
- share_plus_linux 2.0.4 [share_plus_platform_interface file flutter meta url_launcher]
- share_plus_macos 2.1.0 [share_plus_platform_interface flutter]
- share_plus_platform_interface 2.1.0 [flutter meta mime plugin_platform_interface]
- share_plus_web 2.0.4 [share_plus_platform_interface url_launcher flutter flutter_web_plugins meta]
- share_plus_windows 2.0.3 [share_plus_platform_interface flutter meta url_launcher]
- shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- shared_preferences_android 2.0.13 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.1.0 [flutter plugin_platform_interface]
- shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- shelf 1.4.0 [async collection http_parser path stack_trace stream_channel]
- shelf_web_socket 1.0.2 [shelf stream_channel web_socket_channel]
- simple_gesture_detector 0.2.0 [flutter]
- sky_engine 0.0.99
- source_gen 1.0.3 [analyzer async build dart_style glob meta path pedantic source_span yaml]
- source_helper 1.3.0 [analyzer collection source_gen]
- source_span 1.9.0 [collection path term_glyph]
- sqflite 2.1.0 [flutter sqflite_common path]
- sqflite_common 2.3.0 [synchronized path meta]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.0
- string_scanner 1.1.1 [source_span]
- synchronized 3.0.0+3
- term_glyph 1.2.1
- test_api 0.4.12 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timezone 0.8.0 [path]
- timing 1.0.0 [json_annotation]
- tuple 2.0.0 [quiver]
- typed_data 1.3.1 [collection]
- uni_links_platform_interface 1.0.0 [flutter plugin_platform_interface]
- uni_links_web 0.1.0 [flutter flutter_web_plugins uni_links_platform_interface]
- universal_platform 1.0.0+1
- url_launcher_android 6.0.19 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.1.0 [flutter plugin_platform_interface]
- url_launcher_web 2.0.13 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface]
- uuid 3.0.6 [crypto]
- vector_math 2.1.2
- version 3.0.2
- video_player_android 2.3.9 [flutter video_player_platform_interface]
- video_player_avfoundation 2.3.5 [flutter video_player_platform_interface]
- video_player_platform_interface 5.1.4 [flutter plugin_platform_interface]
- video_player_web 2.0.12 [flutter flutter_web_plugins video_player_platform_interface]
- wakelock 0.6.2 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web wakelock_windows]
- wakelock_macos 0.4.0 [flutter flutter_web_plugins wakelock_platform_interface]
- wakelock_platform_interface 0.3.0 [flutter meta]
- wakelock_web 0.4.0 [flutter flutter_web_plugins js wakelock_platform_interface]
- wakelock_windows 0.2.0 [flutter wakelock_platform_interface win32]
- watcher 1.0.1 [async path]
- web_socket_channel 2.2.0 [async crypto stream_channel]
- webview_flutter 2.8.0 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]
- webview_flutter_android 2.10.2 [flutter webview_flutter_platform_interface]
- webview_flutter_platform_interface 1.9.3 [flutter meta plugin_platform_interface]
- webview_flutter_wkwebview 2.9.4 [flutter path webview_flutter_platform_interface]
- win32 2.6.1 [ffi]
- xdg_directories 0.2.0+2 [meta path process]
- xml 5.4.1 [collection meta petitparser]
- yaml 3.1.1 [collection source_span string_scanner]


@Shriyanshx Shriyanshx added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Oct 28, 2022
@darshankawar darshankawar added the triage Issue is currently being triaged. label Oct 31, 2022
@darshankawar
Copy link

@shriyansh-ss
Can you provide a complete minimal code sample without any third party plugins that shows this behavior ?
Is this happening on Android or iOS ?

In addition, it seems that "From", "Sent Time", and "Android Properties" cannot be obtained.

How are you sending the notification ? Can you provide logs for this behavior ? and What should be the expected response ?

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Oct 31, 2022
@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Nov 9, 2022
@google-oss-bot
Copy link

Hey @shriyansh-ss. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@Shriyanshx
Copy link
Author

Shriyanshx commented Nov 9, 2022

@darshankawar

void _receiveAndroidMessages() async{
      //Terminated State
      RemoteMessage? initialMessage =
          await FirebaseMessaging.instance.getInitialMessage();
      if (initialMessage != null) {
        _handleNotificationClick(initialMessage.data, initialMessage.notification);

      }

      //Background state
      //! Not working on iOS due to MoEngage plugin
      _firebaseOnMessageOpenedAppStream =
          FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
            debugPrint(
                "FirebaseMessaging.onMessageOpenedApp : " +
                    message.data.toString());
            _handleNotificationClick(message.data, message.notification);
          });

      //Foreground state
      //Todo: Restrict listening moEngage notification
      _firebaseOnMessageStream =
          FirebaseMessaging.onMessage.listen((RemoteMessage message) {
            debugPrint(
                "FirebaseMessaging.onMessage : " + message.data.toString());
            //Show foreground notification on android
            _showLocalNotificationOnAndroid(message);
          });

      //On Foreground notification opened
      _localOnMessageStream =
          SSLocalNotification.onMessageOpenedApp.listen((String payload) {
            debugPrint("SSLocalNotification.onMessageOpenedApp : $payload");
            Map<String, dynamic> decodedPayload = jsonDecode(payload);
            RemoteMessage message = RemoteMessage.fromMap(decodedPayload);
            _handleNotificationClick(message.data, message.notification);
          });
  }

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. Stale Issue with no recent activity labels Nov 9, 2022
@darshankawar
Copy link

Thanks for the update. Keeping this issue open for further insights and expected behavior.

@darshankawar darshankawar added plugin: messaging platform: android Issues / PRs which are specifically for Android. and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Nov 10, 2022
@Lyokone Lyokone self-assigned this Nov 24, 2022
@Lyokone
Copy link
Contributor

Lyokone commented Nov 24, 2022

Hello @shriyansh-ss, I can reproduce this, it's really weird I'm going to have a look into this

@darshankawar darshankawar added the resolution: fixed A fix has been merged or is pending merge from a PR. label Dec 2, 2022
@firebase firebase locked and limited conversation to collaborators Jan 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: android Issues / PRs which are specifically for Android. plugin: messaging resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working
Projects
None yet
4 participants