-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛] FCM - On push notification open, causing app crash ("NSInternalInconsistencyException") #4610
Comments
Hi there! Can you please post the full stack trace? Also, have you checked the issues list in firebase-ios-sdk repo (also here on github) to see if it's deeper - in the google sdk - or here (the stack trace might also help point the way...) |
Same here. I am trying to migrate to v10 from v5 to see if it helps |
@hahtml Let me know if upgrading the versions help! |
We've just started encountering this with local notifications after upgrading RN from 0.61.5 to 0.63.3 and Xcode from 11 to 12.2. We're still on react-native-firebase 5.5.6 currently (due to needing to migrate notifications to something else). Under the older versions of RN and Xcode, we didn't get the crash. Here's the stack trace: https://gist.github.com/liamjones/bc22538569cb716dc1f4d94c369aa654 |
As a quick fix I can wrap the If this is an appropriate fix does it need to be synchronous or can it be async without causing issues? |
I found out the culprit for us was coming from |
Hello, Same issue goes for me. On iOS 14.2, when the user click sur PUSH notification, app is crashing. Thanks, |
To date, no one has followed my request for info:
Additional steps that are relevant in the last 20 days that my request for info has been ignored:
Please note that I do not reproduce though. I do not think this is a react-native-firebase problem. Further comments saying "me too" without providing any details or taking any effort to advance the discussion are worse than useless, they waste all subscribers time here. Don't do that please. |
Hi @mikehardy, I posted a full stack trace in the gist above (https://gist.github.com/liamjones/bc22538569cb716dc1f4d94c369aa654). I haven't had a chance to check the firebase-ios-sdk repo yet. This is under an older SDK though, we're still on react-native-firebase 5.5.6 as mentioned above (and using the Firebase SDK versions specified in the legacy install instructions) |
You posted a stack vs v5 right? If so, I have disregarded it. Current versions only |
I am honestly shocked anyone would be attempting to deploy react-native-firebase v5.x at this point. There will be nothing but discouragement for using v5 here, no support - with apologies, but it's a real thing: it's time to upgrade |
Hi. @mikehardy , |
I am of course glad it's working for you :-) - I maintain things because I love hearing success stories and getting things fixed, but yes 🙏 please upgrade :-) |
hi, I have same issue on my project using RN Firebase 5.6 (RN 0.60.5) only for cloud messaging, to which version of RNFb I could safely painless upgrade to continue receiving push notifications in my app? thank you |
There is no "pain free" update except from one release to the next. At this point you have a large queue of breaking changes to work through to get current on react-native-firebase and react-native. That's a technical debt you simply must pay off. Get current |
@mikehardy which most recent of RNFB will work with RN 0.60.5? latest too? may be try to upgrade to v.6 for test? |
It should work with RN60, however for you to stay on RN60 means you will not be compatible with Xcode 12.5. The oldest supported version of react-native for Xcode 12.5 is 0.63.4 I believe. Just get to current, then none of this patch hackery will be needed. It's useful as far as it goes (I use patch-package) but just as a crutch to stay on old versions makes no sense to me. Update |
@Doha26 could you post the patch here please? The link above doesn't work for me. Thanks! |
@skizzo the URL was in the link, it was just malformed markdown. I fixed it. But please everyone: UPDATE 🙏 - you have no idea the amount of bugs fixed between 2 years ago and now |
Thanks @mikehardy! I can only imagine how much you improved this amazing product. Unfortunately, I was unable to properly set up any version after |
https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh clone it, read it, run it, it works? |
I use Firebase (v5) only for receiving and displaying push notifications. |
If you want to receive cloud messages, I think you need react-native-firebase for the |
if I dont wrong our backend use following: |
"fcm" === "Firebase Cloud Messages"
|
so for receiving FCM I need react-native-firebase and for displaying them as PushNotification 3-party lib? Previously I think it is one thing, now understand this not the same and there possibility to display PushNotification even when device not connected to the netw )) |
Exactly that. They are related (remote is typically used to trigger a local) but separate. |
Issue
Before the IOS 14.2 update, firebase push notifications when received and tapped on by the user would correctly open the app, whether it was in foreground or background.
However, we've been receiving issues in production mode, when the push notification is received, it no longer opens the app.
It is currently working fine in development however.
The error that is logged is
NSInternalInconsistencyException Call must be made on main thread
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:AppDelegate.m
:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:e.g. 6.2.0
6.2.0
Firebase
module(s) you're using that has the issue:e.g. Instance ID
TypeScript
?Y/N
&VERSION
N
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: