react-native-fcm
react-native-fcm copied to clipboard
Black screen when unlock by notification
Before openning an issue
- Reproduce it with the example project in this repo. Check
- If you can't receive iOS notification, make sure you can receive notification using quickstart-ios project provided by Firebase team
When openning an issue, please include following information for better support
- What version of RN and react-native-fcm are you running? RN: 48.4 FCM: 9.7.2 to 10.0.3
- What device are you using? (e.g iOS9 emulator, Android 6 device)? iPhone 5s 10.3 iPhone 5s 11+ iPhone 6s 11+
- Is your app running in foreground, background or not running? background
When receive a notification, and the screen is locked. When you slide the notification and you unlock, we've got a black screen.
I dont' know why, but we found a temporary solution like that:
ios/RNFIRMessaging.m (Remove this param)
, @"completionHandler": completionHandler
(link to commit: https://github.com/eiosca/react-native-fcm/commit/aca3123f216bedac62507039ce7ea7b7284e3c1f)
Thk's
perhaps your code crashed in your notification callback.
this is happening randomly to me too :'(
yeah me too. I got this issue every time on iPhone X
same bug. i get black screen even when specify FCM.on(FCMEvent.Notification, (notif) => { code from example }
. although the first time tapping notification is successfull but all next times are hanging with black screen.
P.S. tested on react-native 0.42 - iphone 5s
I got the same bug.No one solve this bug?
I got the same issue, the temporary solution provided in the description is not fixing the problem.
Do we have any update on this.
Hi,
we are running into the same issue. Opening a notification, when the app is not running, from the lock screen or from the notificatio ncenter works like expected. However, if the app is running in the background but the screen is locked, and you tap a notification to open the app, it opens it and displays a black screen.
Here are our used versions:
RN: 0.55.4 react-native-fcm: "^14.1.2",
- Firebase/CoreOnly (5.6.0):
- FirebaseCore (= 5.1.1)
- Firebase/Messaging (5.6.0):
- Firebase/CoreOnly
- FirebaseMessaging (= 3.1.0)
- FirebaseCore (5.1.1):
- GoogleUtilities/Logger (~> 5.2)
- FirebaseInstanceID (3.2.1):
- FirebaseCore (~> 5.1)
- GoogleUtilities/Environment (~> 5.2)
- FirebaseMessaging (3.1.0):
- FirebaseCore (~> 5.0)
- FirebaseInstanceID (~> 3.0)
- GoogleUtilities/Reachability (~> 5.2)
- Protobuf (~> 3.1)
Tested on iPhone X, 6S and 7
Any hint is appreciated 🙏
Is there a way to check if react-native actually gets spin up?
Yes it is, sometimes you see the screen real quick before it turns black and if you close the app and reopen it from the background, the correct screen is being displayed (in our case, based on the push notification action)
have you tried adding a timeout before navigation?
I got the same problem... any hint good very much appreciated!