firebase / firebase-admin-node

Firebase Admin Node.js SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
1.59k stars 358 forks source link

Suddenly getting "Request contains an invalid argument" for sending notifications, it was working before #1694

Closed PaulvanMotman closed 2 years ago

PaulvanMotman commented 2 years ago

[REQUIRED] Step 2: Describe your environment

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

I’m sending push notifications to both iOS/android devices, looking at my analytics it seems that the iOS notifications are not arriving anymore. I’m getting messaging/invalid-argument, with errorMessage: Request contains an invalid argument. The notifications I’m sending look like this:



{
              notification: { 
                title: 'alarmName', 
                body: 'pushMessage',
              },
              data: {
                uid: 'user_id'
              },
              apns: {
                payload: {
                  aps: {
                    badge: 2,
                  },
                },
              },
              android: {
                priority: 'high',
                notification: {
                    sound: 'default',
                    notification_priority: 'PRIORITY_HIGH',
                    visibility: 'public'
                }
              },
              token: 'fcm_token',
}

There is an array of messages like this, I’m sending with messaging.sendAll(). I’m sending these messages on a daily basis, the issue started on the 9th of May. Anything changed in the firebase sdk, or perhaps apple side?

google-oss-bot commented 2 years ago

I found a few problems with this issue:

chong-shao commented 2 years ago

Hello @PaulvanMotman I would suggest contact Firebase support https://support.google.com/firebase/?hl=en where you can share your details including Firebase project number and the support team will help the debugging. Thanks!

PaulvanMotman commented 2 years ago

@chong-shao You linked to a FAQ, there is no form to file a bug report?

chong-shao commented 2 years ago

Hello @PaulvanMotman , apologies. https://firebase.google.com/support/troubleshooter/fcm/delivery would be the correct link.

PaulvanMotman commented 2 years ago

Great @chong-shao , thank you!