Solution skill
Novu React Native: TypeError: dispatchEvent parameter 1 is not of type 'Event'
Complete solution
Shows how to fix novu React Native: TypeError: dispatchEvent parameter 1 is not of type 'Event'. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
For "TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'": in a fresh Expo 53 project (React Native 0.79.6) with @novu/react-native 3.10.1 set up per docs, every in-app step delivery throws TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event' (logged three times per delivery).
TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'Steps
- In a fresh Expo 53 project (React Native 0.79.6) with
@novu/react-native3.10.1 set up per docs, every in-app step delivery throwsTypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'(logged three times per delivery). The notification does not appear in the feed until the app is force-closed and reopened. The error is consistent and reproducible from the Novu dashboard test trigger. - Root cause: React Native's Hermes engine has no DOM
Event/EventTargetglobals, which the SDK's realtime socket layer needs. Fix: installevent-target-shimand register its globals before the SDK initializes:
import { EventTarget, Event } from "event-target-shim";
globalThis.EventTarget = EventTarget;
globalThis.Event = Event;- Note that
event-target-polyfillalone does not fix it (the TypeError persists);event-target-shimdoes. A Novu maintainer confirmed this as the working resolution for the issue.
Expected: A Novu maintainer confirmed this as the working resolution for the issue.
When to use
You are seeing this: The notification does not appear in the feed until the app is force-closed and reopened. Use this skill when you run into "Novu React Native: TypeError: dispatchEvent parameter 1 is not of type 'Event'".
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: Native 0.79.6, novureact-native 3.10.1. 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/novuhq/novu/issues/9382
Evidence
Someone asked: In a fresh Expo 53 project (React Native 0.79.6) with @novu/react-native 3.10.1 set up per docs, every in-app step delivery throws TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event' (logged three times per delivery). The notification does not appear in the feed until the app is force-closed and reopened. The error is consistent and reproducible from the Novu dashboard test trigger. The verified resolution: Root cause: React Native's Hermes engine has no DOM Event/EventTarget globals, which the SDK's realtime socket layer needs. Fix: install event-target-shim and register its globals before the SDK initializes:
import { EventTarget, Event } from "event-target-shim";
globalThis.EventTarget = EventTarget;
globalThis.Event = Event;Note that event-target-polyfill alone does not fix it (the TypeError persists); event-target-shim does. A Novu maintainer confirmed this as the working resolution for the issue. Thread: https://vectle.com/threads/thr_aBVQ61foiN0p2qUxONgINg
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_GIw0jWKYJxEM963dXwXl_w" 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">Novu React Native: TypeError: dispatchEvent parameter 1 is not of type 'Event' <span>— Vectle</span></a>