Open timmkuehle opened 3 months ago
@timmkuehle thanks for reporting, this looks similar to issue https://github.com/OneSignal/react-native-onesignal/issues/1677 but is different than https://github.com/OneSignal/OneSignal-Android-SDK/issues/1998.
Since updating from an older onesignal-cordova-plugin version to the current 5.2.3
push notifications are no longer displayed on android devices
Does the crash happen every time? What versions of Android and devices did you reproduce the crash on? Any devices work correctly that you tested?
Does the issue happen with development builds or if you disable minification?
What version of the Android work-runtime
and work-runtime-ktx
is being built into your app?
./gradlew app:dependencies
or ./gradlew build --scan
from the android folder of your project. (where your build.gradle
or gradlew
files are located)Can you share a project reproducing the issue?
Can you list the other libraries and SDKs used in your project? (If you can't provide a sample project)
The crash is coming from within Google's work-runtime
library used by OneSignal. It is an internal error to Google's library so unfortunately it's hard to know what the root cause is. But if I had to guess it might be that the versions of work-runtime-ktx
and work-runtime
might be different enough versions to cause this issue. These should always match, but if Gradle may decide to update one and not the other if other libraries use only work-runtime
.
I am able to reproduce the issue if work-runtime-ktx:2.8.1
is used with androidx.work:work-runtime:2.7.0
in a forceful way, such as:
implementation('androidx.work:work-runtime-ktx:2.8.1')
api('androidx.work:work-runtime') {
version {
strictly '2.7.0'
}
}
However it isn't clear what's downgrading the version in your scenario, but finding that is the key to solving this.
Can you run ./gradlew app:dependencies
or ./gradlew build --scan
from the android folder of your project. (where your build.gradle
or gradlew
files are located) and share the output? This should point to what library is defining a force downgrade.
Another way to find the breaking library is if you remove libraries from your project, or make a new project and build them up and share the project reproducing the issue.
@jkasten2 Thanks for your reply and a big sorry for my very late answer. Due to a few other issues in our project, I lost track on this issue. These other issues also caused us to rework our push notification setup altogether, so we won't use OneSignal any longer.
I think in our case, we had to force androidx.work:work-runtime:2.7.0
for some other plugin we used, so we actually did this manually. Sadly I can't really reproduce this in the current state of our project.
As far as we are concerned, this issue could be closed, if it's not relevant for any of your other users. Thanks again for your effort and sorry, I couldn't shed more light on the problem.
What happened?
Since updating from an older onesignal-cordova-plugin version to the current 5.2.3, push notifications are no longer displayed on android devices. Instead Logcat shows the following error:
Sadly, I'm barely deep enough into native Android coding in Java, to tell that there seems to be an issue with a missing method.
Similar issues were reported in #1677 and #1998 in the OneSignal React Native repo, but I couldn't find any resolution.
The release notes of Release 5.2.3 even mention a fix for a "could not be instantiated" exception, but I couldn't figure out if this was related to the error I'm seeing. However Release 5.2.3 doesn't fix the exception that I ran into.
Steps to reproduce?
What did you expect to happen?
A push notification should have been displayed.
OneSignal Cordova SDK version
Release 5.2.3
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct