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

iOS app crashing on notifications permissions dialog

Open skasanibanyan opened this issue 8 years ago • 8 comments

We have an app with FCM integration working fine on android. But for iOS, it works in debug mode but when the ipa is built and tested through testflight, app crashes immediately after notification permissions pop up.

If we click on allow in the permissions popup few times before while the app is crashing, it works fine from the next time.

App crash log is attached below.

screen shot 2017-12-13 at 12 12 18

skasanibanyan avatar Dec 13 '17 06:12 skasanibanyan

Tried testing with AdHoc provision profile as well and we are still facing the same issue

skasanibanyan avatar Dec 13 '17 08:12 skasanibanyan

I tried removing the permissions for push notifications from info.plist and removed the corresponding JS code like the react-native-fcm pushnotif related component and it doesn't crash anymore.

The other permissions popup's like location request, camera and gallery access are not causing any crashes.

skasanibanyan avatar Dec 13 '17 11:12 skasanibanyan

from your crash log, some react or your JS crashed. check the logic of handling FCM request permission handler?

evollu avatar Dec 13 '17 14:12 evollu

Same issue, app crashes when tried with relese build, Evry thing works fine with the debug build

priyankverma avatar Dec 14 '17 16:12 priyankverma

I am having the same issue , RCTFatal 400 .

though it only happens on the release build and to some ios devices , other is working fine . and some of these devices will work again after couple reinstall .

Can you please tell me how you manged to fix it ?

aalkhulaifi605 avatar Mar 13 '18 10:03 aalkhulaifi605

Any update on this how to resolve? facing the same issue.

smkamranqadri avatar Sep 20 '18 05:09 smkamranqadri

Any update? happening for me too. only for push notification allow access popup.

mounikakella avatar Jan 23 '19 08:01 mounikakella

Just Changed

componentDidMount() {
    var _this = this;
    FCM.requestPermissions();

to

async componentDidMount() {
    var _this = this;

    try{
      let result = await FCM.requestPermissions({badge: false, sound: true, alert: true});
    } catch(e){
      console.error(e);
    }

as per the example code and it worked for me

skasanibanyan avatar Jan 23 '19 08:01 skasanibanyan