Skip to content
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

🐛 [firebase_messaging] java.lang.NoSuchMethodError #9068

Closed
deepak786 opened this issue Jul 9, 2022 · 16 comments
Closed

🐛 [firebase_messaging] java.lang.NoSuchMethodError #9068

deepak786 opened this issue Jul 9, 2022 · 16 comments
Assignees
Labels
impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) platform: android Issues / PRs which are specifically for Android. plugin: messaging resolution: fixed A fix has been merged or is pending merge from a PR. Stale Issue with no recent activity type: bug Something isn't working type: crash A compile error or crash

Comments

@deepak786
Copy link
Contributor

deepak786 commented Jul 9, 2022

Google play pre-launch report shows the crash

Fatal Exception: java.lang.NoSuchMethodError
No static method e(Landroid/content/Context;)Landroidx/core/app/m; in class Landroidx/core/app/m; or its super classes (declaration of 'androidx.core.app.m' appears in /data/app/~~zSBI571S4gcklQL3ghMARg==/androidx.test.tools.crawler-IwmUDuv1Kr6qxSitmTMoHA==/base.apk)

Fatal Exception: java.lang.NoSuchMethodError: No static method e(Landroid/content/Context;)Landroidx/core/app/m; in class Landroidx/core/app/m; or its super classes (declaration of 'androidx.core.app.m' appears in /data/app/~~zSBI571S4gcklQL3ghMARg==/androidx.test.tools.crawler-IwmUDuv1Kr6qxSitmTMoHA==/base.apk)
       at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin.lambda$getPermissions$7(FlutterFirebaseMessagingPlugin.java:7)
       at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin.$r8$lambda$i7HRNVfhZqH8xDENZ4xslv5_Mbw(FlutterFirebaseMessagingPlugin.java)
       at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin$$InternalSyntheticLambda$2$56a3d8ee9feac151e953e1b880f1d66d05f9012c11ef2a3c30b8890394ed27f9$0.run(FlutterFirebaseMessagingPlugin.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:920)
  firebase_core: 1.19.1
  firebase_auth: 3.4.1
  firebase_analytics: 9.1.12
  firebase_crashlytics: 2.8.4
  firebase_database: 9.0.18
  firebase_storage: 10.3.1
  firebase_dynamic_links: 4.3.1
  firebase_messaging: 11.4.4
  firebase_in_app_messaging: 0.6.0+18
  firebase_remote_config: 2.0.11
  cloud_firestore: 3.2.1
  cloud_functions: 3.3.1

Screen Shot 2022-07-09 at 9 33 11 PM

flutter doctor -v
[✓] Flutter (Channel stable, 3.0.2, on macOS 12.3.1 21E258 darwin-x64, locale
    en-US)
    • Flutter version 3.0.2 at /Library/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cd41fdd495 (4 weeks ago), 2022-06-08 09:52:13 -0700
    • Engine revision f15f824b57
    • Dart version 2.17.3
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/appleapple/Library/Android/sdk
    • Platform android-33, build-tools 30.0.3
    • ANDROID_HOME = /Users/appleapple/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.1)
    • 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.11+0-b60-7590822)

[✓] IntelliJ IDEA Community Edition (version 2019.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • 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

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.3.1 21E258 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 103.0.5060.114

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

• No issues found!
@deepak786 deepak786 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jul 9, 2022
@deepak786 deepak786 changed the title 🐛 [firebase_messaging] 🐛 [firebase_messaging] java.lang.NoSuchMethodError Jul 9, 2022
@TrueNight
Copy link

TrueNight commented Jul 10, 2022

Same error here.

  firebase_core: 1.19.1
  firebase_analytics: 9.1.12
  firebase_crashlytics: 2.5.3
  firebase_messaging: 11.4.4
  firebase_dynamic_links: 4.3.1
Fatal Exception: java.lang.NoSuchMethodError: No static method b(Landroid/content/Context;)Landroidx/core/app/l; in class Landroidx/core/app/l; or its super classes (declaration of 'androidx.core.app.l' appears in /data/app/androidx.test.tools.crawler-Gyy_AJyYiAxEEDb7Q4Jptg==/base.apk)
       at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin.lambda$getPermissions$7(FlutterFirebaseMessagingPlugin.java:7)
       at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin.lambda$getPermissions$7$FlutterFirebaseMessagingPlugin(FlutterFirebaseMessagingPlugin.java)
       at io.flutter.plugins.firebase.messaging.-$$Lambda$FlutterFirebaseMessagingPlugin$i7HRNVfhZqH8xDENZ4xslv5_Mbw.run(-.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
       at java.lang.Thread.run(Thread.java:764)

@MarcinusX
Copy link
Contributor

Does anyone know if it's safe to publish the app with that error?

@darshankawar darshankawar added triage Issue is currently being triaged. plugin: messaging platform: android Issues / PRs which are specifically for Android. type: crash A compile error or crash and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Jul 11, 2022
@darshankawar
Copy link

/cc @russellwheatley

@cselti
Copy link

cselti commented Jul 11, 2022

I got the same error on the Crashlytics too.

firebase_auth: ^3.4.1
firebase_core: ^1.19.1
firebase_crashlytics: ^2.8.4
firebase_analytics: ^9.1.12
firebase_storage: ^10.3.1
firebase_messaging: ^11.4.4
Fatal Exception: java.lang.NoSuchMethodError: No static method e(Landroid/content/Context;)Landroidx/core/app/m; in class Landroidx/core/app/m; or its super classes (declaration of 'androidx.core.app.m' appears in /data/app/androidx.test.tools.crawler-2Uif_1xbCTCyobEs4qwq4g==/base.apk)
       at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin.lambda$getPermissions$7(FlutterFirebaseMessagingPlugin.java:322)
       at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin.$r8$lambda$i7HRNVfhZqH8xDENZ4xslv5_Mbw(FlutterFirebaseMessagingPlugin.java)
       at io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin$$InternalSyntheticLambda$0$56a3d8ee9feac151e953e1b880f1d66d05f9012c11ef2a3c30b8890394ed27f9$0.run(FlutterFirebaseMessagingPlugin.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:919)
flutter doctor -v [✓] Flutter (Channel stable, 3.0.4, on macOS 12.4 21F79 darwin-arm, locale hu-HU) • Flutter version 3.0.4 at /Users/totha/Programs/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 85684f9300 (11 days ago), 2022-06-30 13:22:47 -0700 • Engine revision 6ba2af10bb • Dart version 2.17.5 • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/totha/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• ANDROID_HOME = /Users/totha/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/totha/Library/Android/sdk
• Java binary at: /Users/totha/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8609683/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.2)
• Android Studio at /Users/totha/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/212.5712.43.2112.8609683/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.12+0-b1504.28-7817840)

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

[✓] Connected device (4 available)
• 2201123G (mobile) • 83bb32f6 • android-arm64 • Android 12 (API 31)
• Android SDK built for arm64 (mobile) • emulator-5554 • android-arm64 • Android 8.0.0 (API 26) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.53

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

• No issues found!

@russellwheatley
Copy link
Member

Hey @deepak786, is there anymore context to this error? I've created a fresh app and it worked fine. A reproducible sample would be great, but even seeing where it is called would be somewhat helpful. Thanks.

@russellwheatley russellwheatley added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Jul 11, 2022
@MarcinusX
Copy link
Contributor

@russellwheatley I don't how about the rest, but I got it during Google Play review and there is nothing else besides this log.

@deepak786
Copy link
Contributor Author

@russellwheatley Google Play pre-launch shows this error and also the Crashlytics.
I'm not able to reproduce this issue locally.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Jul 11, 2022
@deepak786
Copy link
Contributor Author

Here is the whole log report from Google Play Store. Maybe this will help

log.txt

@vanitu
Copy link

vanitu commented Jul 12, 2022

+1 got same error upon Google Play review.

@darshankawar darshankawar added impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) and removed Needs Attention This issue needs maintainer attention. labels Jul 12, 2022
@Mahmoud-Skafi
Copy link

Mahmoud-Skafi commented Jul 12, 2022

Same issue, but I don't use firebase 👀

java.lang.NoSuchMethodError: No static method e(Landroid/content/Context;)Landroidx/core/app/h; in class Landroidx/core/app/h; or its super classes (declaration of 'androidx.core.app.h' appears in base.apk)
	at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.getNotificationManager(Unknown Source:0)
	at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.cancelAllNotifications(Unknown Source:2)
	at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.onMethodCall(Unknown Source:323)
	at i.a.c.a.k$a.a(Unknown Source:17)
	at io.flutter.embedding.engine.f.e.k(Unknown Source:18)
	at io.flutter.embedding.engine.f.e.l(Unknown Source:20)
	at io.flutter.embedding.engine.f.e.m(Unknown Source:0)
	at io.flutter.embedding.engine.f.c.run(Unknown Source:12)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at androidx.test.espresso.base.Interrogator.loopAndInterrogate(Interrogator.java:10)
	at androidx.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:7)
	at androidx.test.espresso.base.UiControllerImpl.loopMainThreadUntilIdle(UiControllerImpl.java:16)
	at androidx.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:3)
	at androidx.test.espresso.ViewInteraction.-$$Nest$mdoPerform(Unknown Source:0)
	at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:6)
	at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:1)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6669)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

I try to duplicate it locally on the same device, but no luck
Device details:
image

@HidiH
Copy link

HidiH commented Jul 12, 2022

I'm also seeing this, also on Pixel 2. So i installed a virtual device with android 9/sdk 28/pixel 2 and my app runs fine. but it seems, that the specific version of my app that failed in the Google play pre-launch report is blocked on that device. It is isntallable, but the specific version of my app (rocks.hidi.poc is blocked, only an older version is installable through the play store, which is bad, because i have a reason to replace the old one.
Maybe its a fault in googles testing system?

@russellwheatley
Copy link
Member

Hey @deepak786, I was browsing the android Firebase Messaging documentation to see if there is a dependency that needs including/updating, and I stumbled across this new aspect to requesting permission on android 13+. I wonder whether the Google pre-launch report might be testing the app against android 13 (in beta currently). Not sure why this would effect getPermissions() API without digging a bit deeper but will investigate.

@russellwheatley russellwheatley self-assigned this Jul 14, 2022
@MarcinusX
Copy link
Contributor

MarcinusX commented Jul 15, 2022

For reference, there is a requesting permission issue opened already: #8720
But the issue happens on all operating systems (8 to 13)

@russellwheatley
Copy link
Member

Hey all, thought I'd check in and see if this is still an issue on Google play pre-launch reports?

@EArminjon
Copy link

could be important : flutter/flutter#110658 (comment)

@russellwheatley russellwheatley added the Stale Issue with no recent activity label Nov 9, 2022
@russellwheatley
Copy link
Member

I presume this error has gone away with the recent updates to permissions for android 13 given how quiet this thread has gone.

@darshankawar darshankawar added the resolution: fixed A fix has been merged or is pending merge from a PR. label Nov 10, 2022
@firebase firebase locked and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) platform: android Issues / PRs which are specifically for Android. plugin: messaging resolution: fixed A fix has been merged or is pending merge from a PR. Stale Issue with no recent activity type: bug Something isn't working type: crash A compile error or crash
Projects
None yet
Development

No branches or pull requests