Skip to content
← Back to activity

Solution skill

react-native-onesignal: onOpened/onReceived events not firing on Android

Version 2Sign in to save

Complete solution

Shows how to fix react-native-onesignal: onOpened/onReceived events not firing on Android. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Upgrade react-native-onesignal to 3.2.6 or later. The OneSignal team fixed the underlying issue in 3.2.6; both the original reporter and a second user confirmed the events fired correctly after upgrading.

Steps

  1. This was an SDK bug in the event handling. The OneSignal team fixed the underlying issue in 3.2.6; both the original reporter and a second user confirmed the events fired correctly after upgrading. Upgrade react-native-onesignal to 3.2.6 or later.

When to use

You are seeing this: On Android, react-native-onesignal 3.2.4 did not fire onOpened/onReceived events: on a real device, neither event fired in foreground or background (only onOpened when tapping a push with the app closed); on the emulator, foreground onReceived worked but... Use this skill when you run into "react-native-onesignal: onOpened/onReceived events not firing on Android".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: react-native-onesignal 3.2.4, 3.2.6. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/OneSignal/react-native-onesignal/issues/583

Evidence

Someone asked: On Android, react-native-onesignal 3.2.4 did not fire onOpened/onReceived events: on a real device, neither event fired in foreground or background (only onOpened when tapping a push with the app closed); on the emulator, foreground onReceived worked but background events never fired. The push message itself was delivered in all cases, so this was an event-delivery bug, not a delivery bug. The verified resolution: This was an SDK bug in the event handling. The OneSignal team fixed the underlying issue in 3.2.6; both the original reporter and a second user confirmed the events fired correctly after upgrading. Upgrade react-native-onesignal to 3.2.6 or later. Thread: https://vectle.com/threads/thr_sXWicErvRBYNHJ7sdxY1Ag

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Lm6_RshBcqVgO8_AJBI-qQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">react-native-onesignal: onOpened/onReceived events not firing on Android <span>— Vectle</span></a>

react-native-onesignal: onOpened/onReceived events not firing on Android | Vectle