Open jjsebastianfuertes opened 3 years ago
@jjsebastianfuertes
I remember that I've seen sentTime
as null
few months back. Can you provide us the logs from both platforms (Android, iOS), something like which shows sentTime
entry ?
Remote message received in the foreground. RemoteMessage: {messageId:
@darshankawar ** Android - RemoteMessage received when -> onMessageOpenedApp ***
RemoteMessage : {
sentTime: 2021-11-29 14:34:09.609
......
}
** iOS - RemoteMessage received when -> onMessageOpenedApp ***
RemoteMessage : {
sentTime: 1970-01-19 18:03:34.828
......
}
Thanks for the update. I do see the same behavior upon using the latest plugin version (^11.1.0) and with official example.
RemoteMessage : {
sentTime: 1970-01-19 17:17:14.729
}
There's an open issue on the firebase-ios-sdk here aimed at addressing the iOS sentTime
that isn't being passed along upstream which is why the time is incorrect (i.e. reset to Unix epoch start).
Getting sentTime as expected in android but in case of web I am receiving sentTime as null. It will be better if fcm message response sends the sentTime for web as well. I am trying to show notification history and I am unable to show the same.
Bug report
Describe the bug sentTime in ios is returning this date 1970-01-19 17:59:04.586 which does not make sense. It only happens in iOS. Android works as expected
Steps to reproduce
Expected behavior
To get the actual date the push notification was sent to the user.
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
``` [β] Flutter (Channel stable, 2.5.3, on macOS 12.0.1 21A559 darwin-x64, locale en-US) [β] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [β] Xcode - develop for iOS and macOS [β] Chrome - develop for the web [β] Android Studio (version 2020.3) [β] IntelliJ IDEA Community Edition (version 2021.1.1) [β] VS Code (version 1.62.3) [β] Connected device (2 available) ```Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
``` Dart SDK 2.14.4 Flutter SDK 2.5.3 dependencies: - advance_pdf_viewer_fork 2.0.0 [flutter flutter_cache_manager numberpicker path_provider] - advertising_identifier 0.1.1 [flutter json_annotation] - cached_network_image 3.1.0+1 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web] - camera 0.9.4+5 [camera_platform_interface camera_web flutter pedantic quiver flutter_plugin_android_lifecycle] - carousel_slider 4.0.0 [flutter] - code_scanner 1.0.0 [flutter] - connectivity 3.0.6 [flutter meta connectivity_platform_interface connectivity_macos connectivity_for_web] - credit_card_scanner 1.0.4 [flutter] - cupertino_icons 1.0.4 - date_utils 0.2.0 [intl] - device_apps 2.1.1 [flutter] - device_info 2.0.3 [flutter device_info_platform_interface] - devicelocale 0.4.3 [flutter flutter_web_plugins] - dio 4.0.4 [http_parser path] - dotted_border 2.0.0+1 [flutter path_drawing] - envify 2.0.2 - expansion_widget 0.0.3 [flutter] - fancy_shimmer_image 2.0.0+3 [flutter cached_network_image shimmer] - firebase_core 1.10.0 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.3.0 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_dynamic_links 3.0.1 [firebase_core flutter] - firebase_messaging 11.1.0 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - fk_user_agent 2.0.1 [flutter] - fl_chart 0.40.2 [flutter equatable] - flare_splash_screen 4.0.0 [flare_loading flutter] - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_app_badger 1.3.0 [flutter] - flutter_barcode_scanner 2.0.0 [flutter flutter_plugin_android_lifecycle] - flutter_countdown_timer 4.1.0 [flutter] - flutter_facebook_auth 3.5.6 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web] - flutter_facebook_sdk 1.0.0 [flutter] - flutter_gen 3.1.2 [flutter_gen_core args] - flutter_html 2.1.5 [html csslib flutter_layout_grid video_player chewie webview_flutter chewie_audio flutter_svg flutter_math_fork collection numerus flutter] - flutter_local_notifications 9.0.0 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_localizations 0.0.0 [flutter intl characters clock collection meta path typed_data vector_math] - flutter_secure_storage 4.2.1 [meta flutter] - flutter_segment 3.4.1 [flutter flutter_web_plugins meta] - flutter_svg 0.22.0 [flutter meta path_drawing vector_math xml] - flutter_typeahead 3.2.3 [flutter flutter_keyboard_visibility] - geocode 1.0.1 [http] - google_api_availability 3.0.1 [flutter meta] - google_fonts 2.1.0 [flutter http path_provider crypto] - google_maps_flutter 2.0.8 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface] - google_maps_webservice 0.0.20-nullsafety.5 [http meta json_annotation] - google_place 0.4.3 [http] - google_sign_in 5.1.1 [flutter google_sign_in_platform_interface google_sign_in_web meta] - huawei_analytics 6.2.0+301 [flutter] - huawei_location 6.0.0+302 [flutter] - huawei_map 6.0.1+304 [flutter stream_transform flutter_plugin_android_lifecycle meta] - huawei_ml 2.0.5+301 [flutter] - huawei_push 5.3.0+304 [flutter] - huawei_scan 2.1.0+300 [flutter] - image_picker 0.8.4+4 [flutter flutter_plugin_android_lifecycle image_picker_for_web image_picker_platform_interface] - in_app_update 2.0.0 [flutter] - intl 0.17.0 [clock path] - loading_overlay 0.3.0 [flutter] - location 4.3.0 [flutter location_platform_interface location_web] - maps_toolkit 2.0.0 - new_version 0.2.3 [flutter package_info_plus http html url_launcher collection] - oktoast 3.1.5 [flutter flutter_test] - package_info_plus 1.3.0 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web] - pagination_view 2.0.0 [flutter bloc flutter_bloc] - path 1.8.0 - path_provider 2.0.7 [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] - photo_view 0.12.0 [flutter] - provider 6.0.1 [collection flutter nested] - pull_to_refresh 2.0.0 [flutter] - sendbird_sdk 3.1.6 [flutter collection uuid json_annotation encrypt shared_preferences http device_info logger mime connectivity_plus meta http_parser] - share_plus 3.0.4 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web] - shimmer 2.0.0 [flutter] - sign_in_with_apple 3.1.0 [flutter meta] - sqflite 2.0.0+4 [flutter sqflite_common path] - story_view 0.13.2 [flutter flutter_cache_manager rxdart video_player collection] - string_similarity 2.0.0 - transparent_image 2.0.0 - upgrader 3.10.0 [flutter device_info http package_info_plus shared_preferences url_launcher version xml html] - url_launcher 6.0.15 [flutter meta url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - uuid 3.0.5 [crypto] - visibility_detector 0.2.2 [flutter] - xml2json 5.3.1 [xml] dev dependencies: - build_runner 2.1.5 [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] - envify_generator 2.0.2 [analyzer build dotenv envify path source_gen] - flutter_launcher_icons 0.9.2 [args image path 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 charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data] transitive dependencies: - _fe_analyzer_shared 30.0.0 [meta] - analyzer 2.7.0 [_fe_analyzer_shared cli_util collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.1.6 [crypto path] - args 2.3.0 - asn1lib 1.0.3 - async 2.8.1 [collection meta] - bloc 7.2.1 [meta] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.1.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.0.1 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.0.5 [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.1.3 [built_collection collection fixnum meta] - cached_network_image_platform_interface 1.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.0.1 [flutter flutter_cache_manager cached_network_image_platform_interface] - camera_platform_interface 2.1.1 [cross_file flutter meta plugin_platform_interface stream_transform] - camera_web 0.2.1+1 [camera_platform_interface flutter flutter_web_plugins stream_transform] - characters 1.1.0 - charcode 1.3.1 - checked_yaml 2.0.1 [json_annotation source_span yaml] - chewie 1.1.0 [cupertino_icons flutter video_player wakelock] - chewie_audio 1.2.0 [cupertino_icons flutter video_player] - cli_util 0.3.5 [meta path] - clock 1.1.0 - code_builder 4.1.0 [built_collection built_value collection matcher meta] - collection 1.15.0 - color 3.0.0 - connectivity_for_web 0.4.0+1 [connectivity_platform_interface flutter_web_plugins flutter] - connectivity_macos 0.2.1+2 [flutter connectivity_platform_interface] - connectivity_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - connectivity_plus 1.4.0 [flutter meta connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows] - connectivity_plus_linux 1.1.0 [flutter connectivity_plus_platform_interface dbus meta nm] - connectivity_plus_macos 1.2.1 [connectivity_plus_platform_interface flutter] - connectivity_plus_platform_interface 1.1.1 [flutter meta plugin_platform_interface] - connectivity_plus_web 1.1.0+1 [connectivity_plus_platform_interface flutter_web_plugins flutter] - connectivity_plus_windows 1.2.0 [connectivity_plus_platform_interface flutter] - convert 3.0.1 [typed_data] - cross_file 0.3.2 [flutter js meta] - crypto 3.0.1 [collection typed_data] - csslib 0.17.1 [source_span] - dart_style 2.2.0 [analyzer args path pub_semver source_span] - dartx 0.8.0 [characters collection crypto meta path time] - dbus 0.5.6 [args ffi meta pedantic xml] - device_info_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - dotenv 3.0.0 [args meta] - encrypt 5.0.1 [args asn1lib clock collection crypto pointycastle] - equatable 2.0.3 [collection meta] - fake_async 1.2.0 [clock collection] - ffi 1.1.2 - file 6.1.2 [meta path] - firebase_core_platform_interface 4.1.0 [collection flutter meta plugin_platform_interface] - firebase_core_web 1.2.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.1.6 [collection firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 3.0.9 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 2.1.0 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - fixnum 1.0.0 - flare_flutter 3.0.2 [collection flutter meta] - flare_loading 3.0.0 [flare_flutter flutter] - flutter_bloc 7.3.3 [flutter bloc provider] - flutter_blurhash 0.6.0 [flutter meta pedantic] - flutter_cache_manager 3.1.3 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid] - flutter_facebook_auth_platform_interface 2.7.0 [flutter plugin_platform_interface] - flutter_facebook_auth_web 2.6.0+2 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface] - flutter_gen_core 3.1.2 [path yaml mime xml dartx color collection json_annotation dart_style analyzer args pub_semver source_span] - flutter_keyboard_visibility 5.1.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.3 [flutter collection meta quiver] - flutter_local_notifications_linux 0.3.0 [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.5 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math] - frontend_server_client 2.1.2 [async path] - glob 2.0.2 [async collection file path string_scanner] - google_maps_flutter_platform_interface 2.1.3 [collection flutter meta plugin_platform_interface stream_transform] - google_sign_in_platform_interface 2.1.0 [flutter meta quiver] - google_sign_in_web 0.10.0+3 [flutter flutter_web_plugins google_sign_in_platform_interface js meta] - graphs 2.1.0 [collection] - html 0.15.0 [csslib source_span] - http 0.13.4 [async http_parser meta path] - http_multi_server 3.0.1 [async] - http_parser 4.0.0 [charcode collection source_span string_scanner typed_data] - image 3.0.8 [archive meta xml] - image_picker_for_web 2.1.4 [flutter flutter_web_plugins image_picker_platform_interface meta] - image_picker_platform_interface 2.4.1 [flutter http meta plugin_platform_interface cross_file] - infinite_listview 1.1.0 [flutter] - io 1.0.3 [meta path string_scanner] - js 0.6.3 - json_annotation 4.3.0 [meta] - lints 1.0.1 - location_platform_interface 2.3.0 [flutter meta plugin_platform_interface] - location_web 3.1.1 [flutter flutter_web_plugins http_parser js location_platform_interface meta] - logger 1.1.0 - logging 1.0.2 - matcher 0.12.10 [stack_trace] - meta 1.7.0 - mime 1.0.1 - nested 1.0.0 [flutter] - nm 0.3.0 [dbus] - numberpicker 2.1.1 [flutter infinite_listview] - numerus 1.1.1 - octo_image 1.0.0+1 [flutter flutter_blurhash] - package_config 2.0.2 [path] - package_info_plus_linux 1.0.3 [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.4 [flutter flutter_web_plugins http meta package_info_plus_platform_interface] - package_info_plus_windows 1.0.4 [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.9 [flutter path_provider_platform_interface] - path_provider_ios 2.0.7 [flutter path_provider_platform_interface] - path_provider_linux 2.1.2 [flutter path path_provider_platform_interface xdg_directories] - path_provider_macos 2.0.3 [flutter] - path_provider_platform_interface 2.0.1 [flutter meta platform plugin_platform_interface] - path_provider_windows 2.0.4 [ffi flutter meta path path_provider_platform_interface win32] - pedantic 1.11.1 - permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface] - petitparser 4.4.0 [meta] - platform 3.0.2 - plugin_platform_interface 2.0.2 [meta] - pointycastle 3.4.0 [collection convert js] - pool 1.5.0 [async stack_trace] - process 4.2.4 [file path platform] - pub_semver 2.1.0 [collection meta] - pubspec_parse 1.1.0 [checked_yaml collection json_annotation pub_semver yaml] - quiver 3.0.1+1 [matcher] - rxdart 0.27.3 - share_plus_linux 2.0.4 [share_plus_platform_interface file flutter meta url_launcher] - share_plus_macos 2.0.2 [share_plus_platform_interface flutter] - share_plus_platform_interface 2.0.1 [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.9 [flutter meta 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.9 [flutter meta shared_preferences_platform_interface] - shared_preferences_ios 2.0.8 [flutter meta shared_preferences_platform_interface] - shared_preferences_linux 2.0.3 [file flutter meta path path_provider_linux shared_preferences_platform_interface] - shared_preferences_macos 2.0.2 [flutter shared_preferences_platform_interface] - shared_preferences_platform_interface 2.0.0 [flutter] - shared_preferences_web 2.0.2 [flutter flutter_web_plugins meta shared_preferences_platform_interface] - shared_preferences_windows 2.0.3 [file flutter meta path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.2.0 [async collection http_parser path stack_trace stream_channel] - shelf_web_socket 1.0.1 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - source_gen 1.1.1 [analyzer async build dart_style glob meta path source_span yaml] - source_span 1.8.1 [collection path term_glyph] - sqflite_common 2.0.1+1 [synchronized path meta] - stack_trace 1.10.0 [path] - stream_channel 2.1.0 [async] - stream_transform 2.0.0 - string_scanner 1.1.0 [charcode source_span] - synchronized 3.0.0 - term_glyph 1.2.0 - test_api 0.4.2 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - time 2.0.1 - timezone 0.8.0 [path] - timing 1.0.0 [json_annotation] - tuple 2.0.0 [quiver] - typed_data 1.3.0 [collection] - url_launcher_linux 2.0.2 [flutter] - url_launcher_macos 2.0.2 [flutter] - url_launcher_platform_interface 2.0.4 [flutter plugin_platform_interface] - url_launcher_web 2.0.4 [flutter flutter_web_plugins meta url_launcher_platform_interface] - url_launcher_windows 2.0.2 [flutter] - vector_math 2.1.0 - version 2.0.0 - video_player 2.2.7 [flutter meta video_player_platform_interface video_player_web html] - video_player_platform_interface 4.2.0 [flutter flutter_test meta] - video_player_web 2.0.4 [flutter flutter_web_plugins meta video_player_platform_interface] - wakelock 0.5.6 [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.1.0 [async crypto stream_channel] - webview_flutter 2.3.1 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview] - webview_flutter_android 2.3.0 [flutter webview_flutter_platform_interface] - webview_flutter_platform_interface 1.5.1 [flutter plugin_platform_interface] - webview_flutter_wkwebview 2.4.0 [flutter webview_flutter_platform_interface] - win32 2.3.1 [ffi] - xdg_directories 0.2.0 [meta path process] - xml 5.3.1 [collection meta petitparser] - yaml 3.1.0 [collection source_span string_scanner] ```