firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.67k stars 3.97k forks source link

🐛 [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: Dart_LookupLibrary: library 'packagename/utils/fcm.dart' not found. #9568

Closed Zeinab-Kouhkan closed 2 years ago

Zeinab-Kouhkan commented 2 years ago

Bug report

Describe the bug Those error happen on start up application and when received the notification from background in release mode. Foreground notification work well.


Additional context

FirebaseMessaging is called in fcm class


Flutter doctor

Click To Expand ``` Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.3.0, on Microsoft Windows [Version 10.0.19044.2006], locale en-US) Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [√] Chrome - develop for the web [!] Visual Studio - develop for Windows (Visual Studio Enterprise 2022 17.2.6) X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components: MSVC v142 - VS 2019 C++ x64/x86 build tools - If there are multiple build tool versions available, install the latest C++ CMake tools for Windows Windows 10 SDK [√] Android Studio (version 2021.2) [√] Connected device (4 available) [√] HTTP Host Availability ! Doctor found issues in 1 category. ```

Flutter dependencies

Click To Expand ``` environment: sdk: ">=2.17.6 <3.3.0" dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter flutter_svg: ^0.22.0 fl_chart: ^0.55.0 intl: ^0.17.0 rxdart: ^0.27.3 shared_preferences: ^2.0.15 fluttertoast: ^8.0.9 retrofit: ^3.0.1+1 logger: ^1.1.0 json_annotation: ^4.5.0 package_info_plus: ^1.4.2 device_info_plus: ^3.2.3 firebase_core: ^1.17.0 firebase_crashlytics: ^2.8.0 firebase_analytics: ^9.1.8 firebase_messaging: ^12.0.0 awesome_notifications: ^0.6.21 android_intent: ^2.0.2 device_apps: ^2.2.0 syncfusion_flutter_gauges: ^20.1.61 connectivity_plus: ^2.3.0 need_resume: ^1.0.6 cached_network_image: ^3.1.0 shamsi_date: ^0.15.0 liquid_progress_indicator: ^0.4.0 persian_number_utility: ^1.1.1 flutter_custom_tabs: ^1.0.4 substring_highlight: ^1.0.33 app_settings: ^4.1.6 open_store: ^0.2.4 marquee: ^2.2.0 flutter_html: ^2.0.0 url_launcher: ^6.1.5 image_picker: ^0.8.5+3 path_provider: ^2.0.10 file_picker: ^4.5.1 filesize: ^2.0.1 open_filex: ^3.4.0 share_plus: ^4.0.4 google_sign_in: ^5.3.1 devicelocale: ^0.5.2 tapsell_plus: ^2.1.7 google_mobile_ads: ^2.0.1 chewie: ^1.3.3 video_player: ^2.4.2 carousel_slider: ^4.1.1 flutter_web_frame: ^0.0.3 universal_io: ^2.0.4 flutter_linkify: ^5.0.2 uuid: ^3.0.6 progress_indicators: ^1.0.0 url_strategy: ^0.2.0 flutter_math_fork: ^0.4.2+2 sms_autofill: ^2.2.0 visibility_detector: ^0.3.3 steps_indicator: ^1.3.0 flutter_staggered_grid_view: ^0.6.1 audioplayers: ^0.20.1 wakelock: ^0.6.1+2 permission_handler: ^9.2.0 idb_sqflite: ^1.1.0 sqflite_common_ffi: ^2.1.1 sqflite: ^2.0.2+1 universal_html: ^2.0.8 metrix_plugin: ^1.4.2 just_audio: ^0.9.27 flick_video_player: ^0.5.0 dotted_border: ^2.0.0 dependency_overrides: provider: ^6.0.3 dev_dependencies: flutter_lints: ^1.0.4 json_serializable: ^6.2.0 retrofit_generator: ^4.0.1 build_runner: ^2.1.11 device_preview: ^1.1.0 flutter_test: sdk: flutter ```

SarahGhorbani commented 2 years ago

Same as me!

darshankawar commented 2 years ago

@Zeinab-Kouhkan @SarahGhorbani

Can you try the solution as mentioned https://github.com/firebase/flutterfire/issues/9446#issuecomment-1240554285.

Use the solution mentioned which should resolve the issue. Closing for now as this is already fixed. If it doesn't resolve the error, write in comments and I'll reopen it.