react-native-fcm icon indicating copy to clipboard operation
react-native-fcm copied to clipboard

Black screen when unlock by notification

Open eiosca opened this issue 7 years ago • 12 comments

Before openning an issue

  1. Reproduce it with the example project in this repo. Check
  2. 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

  1. What version of RN and react-native-fcm are you running? RN: 48.4 FCM: 9.7.2 to 10.0.3
  2. What device are you using? (e.g iOS9 emulator, Android 6 device)? iPhone 5s 10.3 iPhone 5s 11+ iPhone 6s 11+
  3. 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

eiosca avatar Nov 29 '17 16:11 eiosca

perhaps your code crashed in your notification callback.

evollu avatar Nov 29 '17 18:11 evollu

this is happening randomly to me too :'(

Titozzz avatar Mar 12 '18 16:03 Titozzz

yeah me too. I got this issue every time on iPhone X

zenymax avatar May 04 '18 10:05 zenymax

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

Dimon70007 avatar May 04 '18 18:05 Dimon70007

I got the same bug.No one solve this bug?

bobby4en avatar May 15 '18 13:05 bobby4en

I got the same issue, the temporary solution provided in the description is not fixing the problem.

yaswanthsvist avatar Jul 04 '18 07:07 yaswanthsvist

Do we have any update on this.

nagad814 avatar Jul 12 '18 12:07 nagad814

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 🙏

taschik avatar Aug 23 '18 04:08 taschik

Is there a way to check if react-native actually gets spin up?

evollu avatar Aug 28 '18 17:08 evollu

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)

taschik avatar Sep 04 '18 01:09 taschik

have you tried adding a timeout before navigation?

evollu avatar Sep 07 '18 14:09 evollu

I got the same problem... any hint good very much appreciated!

ptgamr avatar Mar 20 '19 07:03 ptgamr