[OneSignal Plugin] getting 400 bad request

Forge Component
(13)
Published on 7 May by OutSystems R&D
13 votes
Published on 7 May by OutSystems R&D

Hi

i am getting 400 bad request.i have done full configuration.i am getting below error



400 Bad Request


Environment InformationeSpaceVer: 0 (Id=498, PubId=0, CompiledWith=11.0.212.0)
RequestUrl: https://ganeshkumar-chelladurai.outsystemscloud.com/Expense_Mobile/moduleservices/log?clientTimeInMillis=1566459792902 (Method: POST)
AppDomain: /LM/W3SVC/50/ROOT/Expense_Mobile-48-132109333149922447
FilePath: C:\OutSystems\Sandboxes\DXX33Z047\Platform Server\running\Expense_Mobile\
ClientIp: 112.79.87.253
DeviceUUID: 930b4e3f4bd3e3d1
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 19564 ('w3wp', Started='8/20/2019 4:01:37 PM', Priv=606Mb, Virt=2115634Mb)
TID: 22
Thread Name:
.NET: 4.0.30319.42000
DeviceModel: Moto Z2 Play
DeviceUUID: 930b4e3f4bd3e3d1
OperatingSystem: Android 8.0.0
NativeShell: 5.1.4
AppVersionCode: 15
AppVersionName: 0.1
NetworkStatus: Online
NetworkType: LTE
Cordova: 8.0.0
Client-Side Log
Stack:
SendPushNotificationToAll
 System.Exception: 400 Bad Request
    at Object.a [as getException] (https://ganeshkumar-chelladurai.outsystemscloud.com/Expense_Mobile/scripts/OutSystems.js?ZoWmek2bBqjHrFcOfLg6Og:1:23958)
    at XMLHttpRequest.g.onload (https://ganeshkumar-chelladurai.outsystemscloud.com/Expense_Mobile/scripts/OutSystems.js?ZoWmek2bBqjHrFcOfLg6Og:3:9297)

Hi Arkyadeep,

Maybe, in your screen you have the widget OneSignal and you don't have any registration before. Please, check that.

Regards.

Hi Paulo

at the time of login i am using registerwithuser.please find the attached screenshot.


Hi Arkyadeep,

First note:

In your If condition "CheckOneSignalAvailable", in the True branch, you need to put the action "RegisterWithUser". And put this If condition after the login.

Second note:

In your layout, if you are not logged in, the system try to do a connection with onesignal and show the error "400 Bad Request". You need to check if that connection are allowed. 

Something like that:

Regards.

Paulo Cação wrote:

Hi Arkyadeep,

First note:

In your If condition "CheckOneSignalAvailable", in the True branch, you need to put the action "RegisterWithUser". And put this If condition after the login.

Second note:

In your layout, if you are not logged in, the system try to do a connection with onesignal and show the error "400 Bad Request". You need to check if that connection are allowed. 

Something like that:

Regards.

i am using registerwithuser in login pge.


i think i got the problem.let me check.

plz find the oml file

Arkyadeep Bharadwaj wrote:

no same error.can you please check

Yes, you continue with the same problems.
Login:

You also need the RegisterWithUser on your OnApplicationReady with the same logic (you can create a action to do that)

And you need to validate in your layout.

Regards.

hi

what is the wrong thing i am doing.because i am getting cordova plugin is available =true and registerd user boolean value is true.


getting subscribed user in Onesignal also.