What happened?
Description
After upgrading to OneSignal Android SDK 5.1.37, the app crashes in the background with a ClassNotFoundException for com.onesignal.core.services.SyncJobService. This service
is declared in the SDK's bundled AndroidManifest.xml but the class does not exist in the compiled SDK.
This crash was logged on our Firebase Crashlytics.
Stack Trace
Fatal Exception: java.lang.RuntimeException
Unable to create service com.onesignal.SyncJobService: java.lang.ClassNotFoundException: Didn't find class "com.onesignal.SyncJobService" on path: DexPathList[[zip
file "/data/app/_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjsEQ==/base.apk"],nativeLibraryDirectories=[/data/app/_WDgd2GrVaebltZvAAx5D
g==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjsEQ==/lib/arm64,
/data/app/~~_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjsEQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
Caused by java.lang.ClassNotFoundException
Didn't find class "com.onesignal.SyncJobService" on path: DexPathList[[zip file "/data/app/_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjs
EQ==/base.apk"],nativeLibraryDirectories=[/data/app/_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjsEQ==/lib/arm64,
/data/app/~~_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjsEQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
Environment
- OneSignal SDK Version: 5.1.37
- Android Compile SDK: 35
- Android Min SDK: 26
- Android Target SDK: 35
- Build Tool: Gradle
Investigation Details
build.gradle dependency:
implementation 'com.onesignal:OneSignal:5.1.37'
Manifest Merger Analysis
The Android manifest merger blame report shows the service is being added from OneSignal's core module:
Source: [com.onesignal:core:5.1.37]Path: .gradle/caches/transforms-3/.../jetified-core-5.1.37/AndroidManifest.xml:11:9-14:72
Steps to reproduce?
Steps to Reproduce
1. Add implementation 'com.onesignal:OneSignal:5.1.37' to build.gradle
2. Build and run the application
3. App crash logs show with ClassNotFoundException for SyncJobService while the app is in background (difficult to pinpoint)
What did you expect to happen?
The crash should no longer occur and get logged on our Firebase.
The SDK should not declare services in its manifest that don't exist in the compiled code, or the class should be included if the service declaration is necessary.
OneSignal Android SDK version
5.1.37
Android version
15
Specific Android models
Relevant log output
Code of Conduct
What happened?
Description
After upgrading to OneSignal Android SDK 5.1.37, the app crashes in the background with a ClassNotFoundException for com.onesignal.core.services.SyncJobService. This service
is declared in the SDK's bundled AndroidManifest.xml but the class does not exist in the compiled SDK.
This crash was logged on our Firebase Crashlytics.
Stack Trace
Fatal Exception: java.lang.RuntimeException
Unable to create service com.onesignal.SyncJobService: java.lang.ClassNotFoundException: Didn't find class "com.onesignal.SyncJobService" on path: DexPathList[[zip
file "/data/app/
_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjsEQ==/base.apk"],nativeLibraryDirectories=[/data/app/_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjsEQ==/lib/arm64,
/data/app/~~_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjsEQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
Caused by java.lang.ClassNotFoundException
Didn't find class "com.onesignal.SyncJobService" on path: DexPathList[[zip file "/data/app/
_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjs_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjsEQ==/lib/arm64,EQ==/base.apk"],nativeLibraryDirectories=[/data/app/
/data/app/~~_WDgd2GrVaebltZvAAx5Dg==/dinnerdeal.android.customer-vfraoTnkLhVvr7GYovjsEQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
Environment
Investigation Details
build.gradle dependency:
implementation 'com.onesignal:OneSignal:5.1.37'
Manifest Merger Analysis
The Android manifest merger blame report shows the service is being added from OneSignal's core module:
Source: [com.onesignal:core:5.1.37]Path: .gradle/caches/transforms-3/.../jetified-core-5.1.37/AndroidManifest.xml:11:9-14:72
Steps to reproduce?
What did you expect to happen?
The crash should no longer occur and get logged on our Firebase.
The SDK should not declare services in its manifest that don't exist in the compiled code, or the class should be included if the service declaration is necessary.
OneSignal Android SDK version
5.1.37
Android version
15
Specific Android models
Relevant log output
Code of Conduct