Closed ahmedsalamay closed 2 years ago
firebase_messaging: ^8.0.0-dev.14
Channel stable, 1.22.6
You are using an older version of the plugin alongwith obsolete version of the framework. I recommend to upgrade to latest framework version and use the latest plugin version to get improved and latest features of the plugin and the issue you are facing would have already fixed in it. I am going ahead and closing this as invalid, since the issue has been reported using older versions.
hi @darshankawar, I'm sorry but is there any detail specific to what's actually the root cause? I'm currently facing similar issue and I can't find any information that specifically mentioned tackling related issue. Thanks in advance!
Bug report
Describe the bug can not get the device token on certain devices, and this is the log from firebase console crashlytics FirebaseMessaging.instance.getToken()
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: type '_InternalLinkedHashMap<dynamic, dynamic>' is not a subtype of type 'String' in type cast at .platformExceptionToFirebaseException(.java:26) at .convertPlatformException(.java:15) at MethodChannelFirebaseMessaging.getToken(MethodChannelFirebaseMessaging.java:227)
firebase_messaging: ^8.0.0-dev.14
Device Brand:samsung Model:Galaxy A52 Orientation: Portrait RAM free: 2.79 GB Disk free: 40.58 GB Operating System Version:Android 11 Orientation: Portrait Rooted:No Crash Date:Oct 31, 2021, 11:51:46 AM App version:5.1.1 (46)
Device Brand:HUAWEI Model:WKG-LX9 Orientation: Portrait RAM free: 2.06 GB Disk free: 46.77 GB Operating System Version:Android 10 Orientation: Portrait Rooted:No Crash Date:Oct 31, 2021, 5:29:35 PM App version:
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
a device token returned
Additional context
Add any other context about the problem here.
Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
``` [√] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.18363.1256], locale en-US) • Flutter version 1.22.6 at C:\Users\ahmed\fvm\versions\1.22.6 • Framework revision 9b2d32b605 (9 months ago), 2021-01-22 14:36:39 -0800 • Engine revision 2f0af37152 • Dart version 2.10.5 [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at C:\Users\ahmed\AppData\Local\Android\sdk • Platform android-31, build-tools 29.0.2 • Java binary at: C:\Program Files\Java\jdk1.8.0_191\bin\java • Java version Java(TM) SE Runtime Environment (build 1.8.0_191-b12) • All Android licenses accepted. [!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions). [√] VS Code (version 1.61.2) • VS Code at C:\Users\ahmed\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.23.0 [√] Connected device (1 available) • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator) ```Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
``` Dart SDK 2.10.5 Flutter SDK 1.22.6 ishop 5.1.1+46 dependencies: - auto_animated 2.1.0 [flutter visibility_detector] - avatar_glow 1.2.0 [flutter] - bluetoothadapter 1.1.3 [flutter] - connectivity 2.0.2 [flutter meta connectivity_platform_interface connectivity_macos connectivity_for_web] - cupertino_icons 1.0.0 - decimal 0.3.5 [rational] - delayed_display 1.1.0 [flutter] - dio 3.0.10 [http_parser path] - firebase_analytics 7.0.1 [meta flutter firebase_core firebase_analytics_web firebase_analytics_platform_interface] - firebase_core 0.7.0 [firebase_core_platform_interface flutter quiver meta firebase_core_web] - firebase_crashlytics 0.4.0+1 [flutter stack_trace firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface] - firebase_messaging 8.0.0-dev.15 [meta flutter firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web] - flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine] - flutter_barcode_scanner 1.0.2 [flutter flutter_plugin_android_lifecycle] - flutter_bounce 1.0.8 [flutter] - flutter_downloader 1.5.2 [flutter] - flutter_keyboard_visibility 4.0.3 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_web flutter] - flutter_local_notifications 4.0.1+2 [flutter flutter_local_notifications_platform_interface platform timezone] - flutter_localizations 0.0.0 [flutter intl characters collection meta path typed_data vector_math] - flutter_typeahead 2.0.0 [flutter flutter_keyboard_visibility] - geolocator 6.2.1 [flutter geolocator_platform_interface geolocator_web] - get 3.26.0 [flutter] - hive 1.4.4+1 [meta crypto] - hive_flutter 0.3.1 [flutter hive path_provider path] - image_picker 0.6.7+22 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - intl 0.16.1 [path] - intl_translation 0.17.10+1 [analyzer args dart_style intl path petitparser] - location 3.2.4 [flutter location_platform_interface location_web meta] - logger 0.9.4 - package_info 0.4.3+2 [flutter] - path_provider 1.6.27 [flutter path_provider_platform_interface path_provider_macos path_provider_linux path_provider_windows] - permission_handler 5.0.1+1 [flutter meta permission_handler_platform_interface] - pretty_dio_logger 1.1.1 [dio] - provider 4.3.3 [collection flutter nested] - share 0.6.5+4 [meta mime flutter] - system_shortcuts 1.0.0 [flutter] dev dependencies: - flutter_launcher_icons 0.8.1 [image args yaml path] - 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] - hive_generator 0.8.2 [build source_gen hive analyzer dartx] transitive dependencies: - _fe_analyzer_shared 7.0.0 [meta] - analyzer 0.39.17 [_fe_analyzer_shared args charcode cli_util collection convert crypto glob html meta package_config path pub_semver source_span watcher yaml] - archive 2.0.13 [crypto args path] - args 1.6.0 - async 2.5.0-nullsafety.1 [collection] - boolean_selector 2.1.0-nullsafety.1 [source_span string_scanner] - build 1.6.1 [analyzer async convert crypto glob logging meta path] - characters 1.1.0-nullsafety.3 - charcode 1.2.0-nullsafety.1 - cli_util 0.2.0 [path] - clock 1.1.0-nullsafety.1 - collection 1.15.0-nullsafety.3 - connectivity_for_web 0.3.1+4 [connectivity_platform_interface flutter_web_plugins flutter] - connectivity_macos 0.1.0+7 [flutter] - connectivity_platform_interface 1.0.6 [flutter meta plugin_platform_interface] - convert 2.1.1 [charcode typed_data] - crypto 2.1.5 [collection convert typed_data] - csslib 0.16.2 [source_span] - dart_style 1.3.6 [analyzer args path source_span] - dartx 0.5.0 [collection path crypto characters time meta] - fake_async 1.2.0-nullsafety.1 [clock collection] - ffi 0.1.3 - file 5.2.1 [intl meta path] - firebase 7.3.3 [http http_parser js] - firebase_analytics_platform_interface 1.0.3 [flutter meta] - firebase_analytics_web 0.1.1 [flutter flutter_web_plugins firebase firebase_analytics_platform_interface meta] - firebase_core_platform_interface 3.0.1 [flutter meta plugin_platform_interface quiver] - firebase_core_web 0.2.1+3 [firebase_core_platform_interface flutter flutter_web_plugins meta js] - firebase_crashlytics_platform_interface 1.1.6 [flutter meta collection firebase_core plugin_platform_interface] - firebase_messaging_platform_interface 1.0.0-dev.10 [flutter meta firebase_core plugin_platform_interface] - firebase_messaging_web 0.1.0-dev.6 [flutter flutter_web_plugins meta firebase_core firebase_core_web firebase_messaging_platform_interface js service_worker] - flutter_keyboard_visibility_platform_interface 1.0.1 [flutter meta plugin_platform_interface] - flutter_keyboard_visibility_web 1.0.1 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter] - flutter_local_notifications_platform_interface 2.0.0+1 [flutter plugin_platform_interface] - flutter_plugin_android_lifecycle 1.0.11 [flutter] - flutter_web_plugins 0.0.0 [flutter characters collection meta typed_data vector_math] - geolocator_platform_interface 1.0.9 [flutter meta plugin_platform_interface vector_math] - geolocator_web 1.0.1 [flutter flutter_web_plugins geolocator_platform_interface] - glob 1.2.0 [async collection node_io path pedantic string_scanner] - html 0.14.0+4 [csslib source_span] - http 0.12.2 [http_parser path pedantic] - http_parser 3.1.4 [charcode collection source_span string_scanner typed_data] - image 2.1.19 [archive xml meta] - image_picker_platform_interface 1.1.6 [flutter meta http plugin_platform_interface] - js 0.6.2 - location_platform_interface 1.1.0 [flutter meta plugin_platform_interface] - location_web 1.0.1 [flutter flutter_web_plugins http_parser js location_platform_interface meta] - logging 0.11.4 - matcher 0.12.10-nullsafety.1 [stack_trace] - meta 1.3.0-nullsafety.3 - mime 0.9.7 - nested 0.0.4 [flutter] - node_interop 1.2.1 [js] - node_io 1.2.0 [file node_interop path] - package_config 1.9.3 [path charcode] - path 1.8.0-nullsafety.1 - path_provider_linux 0.0.1+2 [path xdg_directories path_provider_platform_interface flutter] - path_provider_macos 0.0.4+8 [flutter] - path_provider_platform_interface 1.0.4 [flutter meta platform plugin_platform_interface] - path_provider_windows 0.0.4+3 [path_provider_platform_interface meta path flutter ffi win32] - pedantic 1.9.2 [meta] - permission_handler_platform_interface 2.0.1 [flutter meta plugin_platform_interface] - petitparser 3.1.0 [meta] - platform 2.2.1 - plugin_platform_interface 1.0.3 [meta] - process 3.0.13 [file intl meta path platform] - pub_semver 1.4.4 [collection] - quiver 2.1.5 [matcher meta] - rational 0.3.8 - service_worker 0.2.4 [js] - sky_engine 0.0.99 - source_gen 0.9.10+1 [analyzer async build dart_style glob meta path pedantic source_span] - source_span 1.8.0-nullsafety.2 [charcode collection path term_glyph] - stack_trace 1.10.0-nullsafety.1 [path] - stream_channel 2.1.0-nullsafety.1 [async] - string_scanner 1.1.0-nullsafety.1 [charcode source_span] - term_glyph 1.2.0-nullsafety.1 - test_api 0.2.19-nullsafety.2 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher] - time 1.4.0 - timezone 0.6.1 [path] - typed_data 1.3.0-nullsafety.3 [collection] - vector_math 2.1.0-nullsafety.3 - visibility_detector 0.1.5 [flutter] - watcher 0.9.7+15 [async path pedantic] - win32 1.7.4 [ffi] - xdg_directories 0.1.2 [meta path process] - xml 4.5.1 [collection convert meta petitparser] - yaml 2.2.1 [charcode collection string_scanner source_span] ```