invertase / react-native-firebase

πŸ”₯ A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.54k stars 2.19k forks source link

[iOS] notification action does nothing if app is killed #1791

Closed blankg closed 5 years ago

blankg commented 5 years ago

Issue


In iOS if you kill the app and then click on a notification action the notification action is not delivered to the JS side since JS bridge is not ready yet. Enabling the commented PRE-BRIDGE-EVENTS code in RNFirebaseNotifications seems to resolve the issue. Can this code be enabled to resolve this issue? if risky perhaps put it behind a flag that can be configured.

Project Files

iOS

ios/Podfile:

# N/A

RNFirebaseNotifications.m:

// N/A


Environment


Think react-native-firebase is great? Please consider supporting the project with any of the below:

stale[bot] commented 5 years ago

Hello πŸ‘‹, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

phonganhhung9xtb commented 5 years ago

same me, when app killed, if i click to open app from notification, app crashed. how to debug remote notification if app killed with real device?

gregtap commented 5 years ago

Even with commented out // PRE-BRIDGE-EVENTS the app still opens and crashes on a notification click.

vpontis commented 5 years ago

I have reproduced this issue on iOS but I am not experiencing it with Android.

Does anyone have any tips on tools to debug this? I'm not sure how to get the stack trace on iOS...

gregtap commented 5 years ago

In my case it was expokit SDK32 related, fix is here -> https://github.com/expo/expo/pull/3431/files

vpontis commented 5 years ago

@coulix that looks like my issue! Were you able to upgrade Expokit and fix it? What version of Expokit are you on?

vpontis commented 5 years ago

Fixed it!

https://github.com/expo/expo/pull/3431#issuecomment-462086795

stale[bot] commented 5 years ago

Hello πŸ‘‹, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.

zarvedan commented 4 years ago

Hi @blankg , I have the exact same issue as you. I applied the same workaround you described with no success. I use react-native-firebase 4.2.0.

Did you made another changes to resolve this issue ? Thank you in advance.

blankg commented 4 years ago

@zarvedan , I used it with 5.1.1 so that could be the issue. You can checkout the version we use from our fork https://github.com/capriza/react-native-firebase

zarvedan commented 4 years ago

@blankg I did a fresh install with react-native-firebase: 5.2.1 and your workaround and I confirm that it works. Many thanks for your help, it was hard to find a solution to my issue.

@salakar In my case, it was an iOS issue, not Expo.