Closed
Description
Describe the bug
If I try to use in the application onBackgroundMessage, after a few saves, and hot reload, I start to get errors like these, and it becomes simply impossible to work further. In addition, if you use onBackgroundMessage, the inappwebview stops working normaly.
(Without BGhandler, there's no items in call stack. No even one, and everything works fine)
I'll trying add initialization on top of all, trying inside initState, inside build context, the result is always the same - if BGhandler specified, then i got these errors.
To Reproduce
1 - Install plugin
2 - Add Application.java class, and specify it in AndroidManifest.xml
3 - Add background message handler to your app.
Versions
firebase_messaging: ^6.0.9
gradle:3.5.3
Flutter doctor
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.1 19B88, locale ru-RU)
• Flutter version 1.12.13+hotfix.5 at /Users/uebanchik/development/flutter
• Framework revision 27321ebbad (3 days ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/uebanchik/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.2.1, Build version 11B500
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 42.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.41.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.7.1
[✓] Connected device (1 available)
• Nexus 5 • 0567efb40047d301 • android-arm • Android 6.0.1 (API 23)
• No issues found!