Skip to content
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

🐛 [firebase_messaging ] Unreliable notification delivery on iOS #3630

Closed
praharshbhatt opened this issue Sep 23, 2020 · 5 comments · Fixed by #4012
Closed

🐛 [firebase_messaging ] Unreliable notification delivery on iOS #3630

praharshbhatt opened this issue Sep 23, 2020 · 5 comments · Fixed by #4012
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. closed-by-bot Stale Issue with no recent activity type: bug Something isn't working

Comments

@praharshbhatt
Copy link

praharshbhatt commented Sep 23, 2020

Bug report

Describe the bug
Notifications are not getting received on iOS reliably. Sometimes users receive the notifications, sometimes they don't. For the notifications with images, images never load.

I'm using:
firebase_messaging: ^7.0.0

I've double checked the Code. This same code works well on Android:

  //Register Firebase messaging
  _registerFCM() {
    //Register Firebase messaging
    _fcm.getToken().then((token) {
      strFCMToken = token;
      print("Firebase Token: " + strFCMToken);
    });

    if (Platform.isIOS) {
      iosSubscription = _fcm.onIosSettingsRegistered.listen((data) {
        // save the token  OR subscribe to a topic here
      });
      _fcm.requestNotificationPermissions(const IosNotificationSettings(sound: true, badge: true, alert: true));
    }

    _fcm.configure(
      onMessage: (Map<String, dynamic> message) async {
        print("onMessage: $message");
        showInAppNotificationDialog(message);
      },
      onLaunch: (Map<String, dynamic> message) async {
        print("onLaunch: $message");
        showInAppNotificationDialog(message);
      },
      onResume: (Map<String, dynamic> message) async {
        print("onResume: $message");
        final token = Preference.getString(PreferenceKey.TOKEN_KEY);
        if (token != null) {
          navigatorKey.currentState.popUntil((Route<dynamic> route) => route is PageRoute);
          navigatorKey.currentState.pushReplacementNamed("/home");

          showInAppNotificationDialog(message);
        }
      },
    );
}

We are also sure the notification permissions on iOS are requested for the users, and the same are accepted by all the non-receiving users.

Here are the screenshots of the campaign that failed the delivery:
1
2
3
4
5


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
PASTE OUTPUT INSIDE HERE

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
  ╔════════════════════════════════════════════════════════════════════════════╗
  ║ A new version of Flutter is available!                                     ║
  ║                                                                            ║
  ║ To update to the latest version, run "flutter upgrade".                    ║
  ╚════════════════════════════════════════════════════════════════════════════╝


Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.3, on Mac OS X 10.14.6 18G103, locale en-SG)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.46.1)
[✓] Connected device (2 available)

• No issues found!


@praharshbhatt praharshbhatt added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Sep 23, 2020
@darshankawar
Copy link

Hi @praharshbhatt,
Can you provide the iOS version on which you are seeing this behavior ?
Also check this issue for more reference.
Thanks.

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Sep 23, 2020
@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Oct 2, 2020
@google-oss-bot
Copy link

Hey @praharshbhatt. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@ganeshAudetemi
Copy link

iOS 13 and 14 some notifications are delay

@google-oss-bot google-oss-bot removed the Stale Issue with no recent activity label Oct 8, 2020
@google-oss-bot
Copy link

Hey @praharshbhatt. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Oct 19, 2020
@google-oss-bot
Copy link

Since there haven't been any recent updates here, I am going to close this issue.

@praharshbhatt if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@firebase firebase locked and limited conversation to collaborators Nov 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. closed-by-bot Stale Issue with no recent activity type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants