325
Views
5
Comments
[OneSignal Plugin] 400 Bad Request
Question
onesignal-plugin
Mobile icon
Forge asset by OutSystems

Hi,

I'm with a "Bad Request Error" when i try to set a tag on app login. In the first try the error appear, sometimes in the next i can do the login, othewise i try several times until login. Someone know how to fix that?

UserImage.jpg
Michael Segbers

Hi Cynthia,

I am not sure how to fix your problem, but I might be able to help locate it better. I know from personal experience, that the "400 Bad Request" often happens, when one of the REST calls within the "OneSignalAPI"-Module fails (e.g. because you try to send a pushnotification to a userid that's not signed up for it). In your case most likely the "Editdevice" REST call, since that's the one used in the "SetTag"-action.

To pinpoint the problem, you should be able to open the "SetTag"-action in the OneSignalAPI-eSpace (top option in the right-click-menu of the "SetTag"-action in the "OneSignalAPI/Tags" Folder in the Logic tab of your mobile app). Add a breakpoint to the Start-node of the action and in the Debugger-Tab, choose your mobile app as "entry module" and start debugging. Monitor the input variables for the REST call and see if they are being set properly.

I hope this helps you locate the problem.

Best regards,
Michael

UserImage.jpg
Adam Esterle

I had this issue when sending to a user ID that was not registered. I added the check for "No player id?" to "SendPushNotificationToUserId" in "OneSignalAPI"

2020-03-26 16-08-29
Marcos Paulo Souza Miranda

Good Afternoon,


I also have this problem.


You have a provision for correction in the plugin?

UserImage.jpg
Domingo Del Rosario

Hi, 

I'm getting the same error after I deployed my first mobile application to the testing environment. I tried Adam Esterle solution with no luck.

It still not sending the playerId in the request even it is founded by the userId.

Am I missing any configuration or permission in order to make it work?

Note: in development environment everything works fine.

Regards,

Domingo 

2021-02-17 18-31-05
Alexandre Jacinto
Staff

Hi there!

There is a new version of the OneSignal plugin for O11 (3.7.8) which has a fix for this logic where the EditDevice API from OneSignal is called, and the error shouldn't be thrown anymore.

Best regards.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.