Skip to content

[Bug]: Crashes When requesting permission on Android 6.0 #910

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
2 of 3 tasks
selcuk-sahin opened this issue Sep 8, 2023 · 2 comments
Closed
2 of 3 tasks

[Bug]: Crashes When requesting permission on Android 6.0 #910

selcuk-sahin opened this issue Sep 8, 2023 · 2 comments

Comments

@selcuk-sahin
Copy link

selcuk-sahin commented Sep 8, 2023

What happened?

It seems like the latest version is incompatible with Android 6.0.0, 6.0.1
We have errors on Firebase Crashlytics for 3 users in 1 day

Steps to reproduce?

1. Install on Model:Nexus 5X
2. Trigger `OneSignal.Notifications.requestPermission();`
3. Crash
- "@capacitor/android": "^4.8.0"
- "onesignal-cordova-plugin": "^5.0.0",

    minSdkVersion = 22
    compileSdkVersion = 33
    targetSdkVersion = 33

What did you expect to happen?

Users should not crash on this version, or there should be workarounds.

OneSignal Cordova SDK version

5.0.0

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

Fatal Exception: java.lang.NoClassDefFoundError: com.onesignal.cordova.OneSignalController$$ExternalSyntheticLambda0
       at com.onesignal.cordova.OneSignalController.requestPermission(OneSignalController.java:243)
       at com.onesignal.cordova.OneSignalPush.execute(OneSignalPush.java:475)
       at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
       at org.apache.cordova.PluginManager.exec(PluginManager.java:146)
       at com.getcapacitor.MessageHandler.lambda$callCordovaPluginMethod$2$com-getcapacitor-MessageHandler(MessageHandler.java:155)
       at com.getcapacitor.MessageHandler$$ExternalSyntheticLambda2.run(D8$$SyntheticClass)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:148)
       at android.os.HandlerThread.run(HandlerThread.java:61)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@nan-li
Copy link
Contributor

nan-li commented Nov 2, 2023

Hi @selcuk-sahin,

You are able to reproduce this on Android 6 Nexus device, and this is also showing up for some users in crashlytics?

@selcuk-sahin
Copy link
Author

Hi @selcuk-sahin,

You are able to reproduce this on Android 6 Nexus device, and this is also showing up for some users in crashlytics?

Yes, I'm able to reproduce this issue with Andorid 6 Nexus Device.
In crashlytics, I saw various devices with version 5.1 & 6 has the same error.
Screenshot 2023-11-12 at 11 48 04

However, with the latest SDK version this error is fixed. By installing the latest onesignal-cordova-plugin 5.0.3, I can confirm the crash is no more happening to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants