Skip to content

[Bug]: Push notifications not displayed with R8/minify enabled (Android, SDK 5.6.1, AGP 9) #2582

Closed

Description

@StringMeUp

What happened?

Hi,

On Android, push notifications are received (I see "NotificationWorkManager enqueueing notification work" in logcat) but never shown when the app is built with minifyEnabled = true (R8). With minify and shrinkResources disabled, everything works and I see "NotificationWorker running doWork", "Fire remoteNotificationReceived", and "Worker result SUCCESS" for NotificationGenerationWorkManager$NotificationGenerationWorker.

OneSignal SDK: 5.6.1 (current); I also tried 5.7.2 – same behaviour with minify ON.
Android Gradle Plugin: 9.0.1
Build: prodRelease with minify + shrinkResources enabled
Device: Pixel 8, Android 16 (API 36)

Is there a known issue or recommended ProGuard/R8 configuration for SDK 5.x (5.6.1 / 5.7.2) with AGP 9 so that notifications are displayed with minify enabled? If you need full ProGuard rules or a logcat snippet, I can provide them.

Thanks.

Steps to reproduce?

1. Install app
2. Request permission
3. Grant permissions
4. Trigger push
5. See push ONLY in logs (push not shown on device)

What did you expect to happen?

I expected to receive push notification.

OneSignal Android SDK version

Release 5.7.2

Android version

15

Specific Android models

Pixel 8 Android 16

Relevant log output

OneSignal  [package]  D  [main] ApplicationService.handleLostFocus: application is now out of focus
OneSignal  [package]  D  [main] NotificationWorkManager enqueueing notification work with notificationId: [redacted] and jsonPayload: {"google.delivered_priority":"high",...,"alert":"...","title":"...",...}
OneSignal  [package]  D  [main] ApplicationService.onActivityStarted(0,APP_CLOSE): [package].MainActivity@...
OneSignal  [package]  D  [main] ApplicationService.handleFocus: application is now in focus

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. StringMeUp commented on Mar 19, 2026

    @StringMeUp
    Author

    Yeah baby!

  2. reopened this on Mar 20, 2026
  3. reopened this on Mar 20, 2026
  4. sherwinski commented on Mar 20, 2026

    @sherwinski
    Contributor

    The fix for this was published in v5.7.4 🚀

  5. StringMeUp commented on Mar 23, 2026

    @StringMeUp
    Author

    Version 5.7.4 -> To make it work still had to add:
    -keep class androidx.work.OverwritingInputMerger {
    public ();

    Image

    }

  6. abdulraqeeb33 commented on Mar 23, 2026

    @abdulraqeeb33
    Contributor

    @StringMeUp - could you please share the steps to reproduce this error?

  7. StringMeUp commented on Mar 23, 2026

    @StringMeUp
    Author

    Description

    I'm still seeing push notifications fail in minified Android builds with com.onesignal:OneSignal:5.7.4, even after the fix from PR #2585.

    The push reaches the app and OneSignal enqueues notification work, but the notification is never displayed in a minified build unless I add extra app-level ProGuard rules.

    Environment

    • OneSignal Android SDK: 5.7.4
    • AGP: 9.0.1
    • Gradle: 9.1.0
    • AndroidX WorkManager resolved by dependency graph: 2.8.1
    • Minification: isMinifyEnabled = true
    • Resource shrinking: isShrinkResources = true

    What fails

    WorkManager then fails to instantiate androidx.work.OverwritingInputMerger in the minified build:

    java.lang.NoSuchMethodException: androidx.work.OverwritingInputMerger. []
    at java.lang.Class.getConstructor0(Class.java:3379)
    at java.lang.Class.getDeclaredConstructor(Class.java:3061)
    at androidx.work.InputMerger.fromClassName(InputMerger.java:65)
    at androidx.work.InputMergerFactory.createInputMergerWithDefaultFallback(InputMergerFactory.java:61)
    at androidx.work.impl.WorkerWrapper.runWorker(WorkerWrapper.java:215)
    at androidx.work.impl.WorkerWrapper.run(WorkerWrapper.java:145)

    WM-WorkerWrapper E Could not create Input Merger androidx.work.OverwritingInputMerger

    What works

    • OneSignal initializes correctly
    • Device registers successfully
    • FCM token is obtained
    • OneSignal API calls succeed
    • Incoming push reaches the app
    • Log shows notification work being enqueued

    Example log:

    OneSignal D NotificationWorkManager enqueueing notification work with notificationId: ...

  8. reopened this on Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions