NativeNotify / native-notify

6 stars 0 forks source link

Undefined responseListener Causes Crash on Notification Unsubscription #9

Open mazenashgar opened 1 week ago

mazenashgar commented 1 week ago

Environment Details:

Library Version: native-notify v4.0.4 React Native Version: 0.75.4 Platform: Android

Issue Description:

An error occurs when attempting to unsubscribe from notifications in the useEffect cleanup function. Specifically, the responseListener variable is undefined, leading to a crash when calling Notifications.removeNotificationSubscription(responseListener);. This error prevents the app from properly handling push notifications and affects Android only(as our Sentry has reported).

Screenshot 2024-11-05 at 7 29 03 PM

MAl-l3R commented 9 hours ago

I am getting the same error. App won't even start up when I npx expo start. I'm unable to use push notification from native notify.

mazenashgar commented 1 hour ago

We have switched to One Signal as it is a good replacement