Push Notification error server 400

Monday, November 25, 2024 5:25:55 PM
  • Posted: Tuesday, October 27, 2020 11:39 AM
  • 137
Hi everybody,

Since last week, I get The remote server returned an error: (400) Bad Request for my notification push. Is it a general problem or just me ? Thanks
0
  • Posted: Tuesday, October 27, 2020 12:47 PM
  • 953
Hello Laurent,

Below is the description of 400 error, coming from Firebase, which we use to handle push notifications:

"Potential causes include invalid registration, invalid package name, message too big, invalid data key, invalid TTL, or other invalid parameters.
Invalid registration: Check the format of the registration token you pass to the server. Make sure it matches the registration token the client app receives from registering with Firebase Notifications. Do not truncate or add additional characters.
Invalid package name: Make sure the message was addressed to a registration token whose package name matches the value passed in the request.
Message too big: Check that the total size of the payload data included in a message does not exceed FCM limits: 4096 bytes for most messages, or 2048 bytes in the case of messages to topics. This includes both the keys and the values.
Invalid data key: Check that the payload data does not contain a key (such as from, or gcm, or any value prefixed by google) that is used internally by FCM. Note that some words (such as collapse_key) are also used by FCM but are allowed in the payload, in which case the payload value will be overridden by the FCM value.
Invalid TTL: Check that the value used in ttl is an integer representing a duration in seconds between 0 and 2,419,200 (4 weeks).
Invalid parameters: Check that the provided parameters have the right name and type."

Maybe you've changed something? Maybe something has changed in your Firebase project?
Best regards,
Patryk

GrandNode Team
0
  • Posted: Tuesday, October 27, 2020 4:52 PM
  • 137
I don't understand because there are not any change since last week. I have try with other message and picture, and it's bad.
0
  • Posted: Tuesday, November 3, 2020 4:21 AM
  • 137
Hi,

I try to create a new project in Firebase and I get same error. There aren't any changes in my GrandNode. I don't understand this  error 400.
0
  • Posted: Tuesday, November 3, 2020 7:49 AM
  • 74
We have made a change to that feature at the GrandNode 4.80. Would you be able to try this same at the new version of GrandNode?
Best regards,
Tomasz
GrandNode Team
0
  • Posted: Monday, November 9, 2020 2:06 PM
  • 137
I try test it from 4.8 but I get a problem to save settings. But I saw in 4.8 AppId is necessary for settings and not in 4.7. Is there any change to Firebase and that will be the problem ?
0
  • Posted: Monday, November 9, 2020 2:18 PM
  • 953
I suppose you should get it from your Firebase Project. I think Firebase generates it by default.
Best regards,
Patryk

GrandNode Team
0
  • Posted: Tuesday, November 10, 2020 6:27 AM
  • 137
OK but in v4.70, there is not field to add AppId. I think new error 400 is since this change in Firebase API, no ?
0
  • Posted: Tuesday, November 10, 2020 7:11 AM
  • 953
To be honest, I haven't tracked the changes in Firebase, but I suppose it was added much earlier than 27th October, because the documentation page that contains the AppID description was edited in August. During the 4.80.0 development, we've noticed that this field is used by Firebase, so we've decided to update the Firebase library, and add a new field to the configuration.

In your case, you can manually add the AppID field to the push notification javascript file on your server, to check if it helped.
Best regards,
Patryk

GrandNode Team
0
  • Posted: Tuesday, November 24, 2020 2:50 PM
  • 137
Hi Patryk,

Where can I add AppId field please ?
0
back to top
Filters