Skip to content

🐛 [FIREBASE_MESSAGING] java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Class.isInterface()' on a null object reference #11195

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

Closed
bun-lau opened this issue Jun 26, 2023 · 1 comment
Labels
Needs Attention This issue needs maintainer attention. type: bug Something isn't working

Comments

@bun-lau
Copy link

bun-lau commented Jun 26, 2023

Bug report

When sending cloud messaging to the device and the device is running "FirebaseMessaging.onBackgroundMessage", the app will crash unexpectedly.

Device used: Pixel 6

Steps to reproduce

  1. Configure the app to use Firebase with the FlutterFire CLI: flutterfire configure
  2. install the app to a real device by running: flutter run
  3. Put app on background / switch to another app
  4. Send test message from Firebase Console
  5. send several messages to the device, will result "app has stopped"

Expected behavior

App shall not be closed/crashed

Sample project

Issue can be reproduced by using the office example

Flutter doctor

flutter doctor -v
[✓] Flutter (Channel stable, 3.7.12, on macOS 13.4.1 22F82 darwin-arm64, locale en-AU)
    • Flutter version 3.7.12 on channel stable at /Users/xxx/env/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d9e56e694 (10 weeks ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/xxx/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.79.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.66.0

[✓] VS Code (version 1.80.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.66.0

[✓] Connected device (3 available)
    • HUAWEI RIO L02 (mobile) • C4JDU16419000352 • android-arm64  • Android 5.1 (API 22)
    • macOS (desktop)         • macos            • darwin-arm64   • macOS 13.4.1 22F82 darwin-arm64
    • Chrome (web)            • chrome           • web-javascript • Google Chrome 114.0.5735.133

[✓] HTTP Host Availability
    • All required HTTP hosts are available

@bun-lau bun-lau added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jun 26, 2023
@russellwheatley
Copy link
Member

Fixed with this PR: #11163. Release should be out in the next couple of days. Thanks for your patience 🙏

@firebase firebase locked and limited conversation to collaborators Jul 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs Attention This issue needs maintainer attention. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants