[OneSignal Plugin] Onesignal Failed to register: Missing oneSignal UserId or PushToken

Forge Component
(13)
Published on 2019-10-18 by OutSystems R&D
13 votes
Published on 2019-10-18 by OutSystems R&D

Hi

I believe that version 3.1.1 is no longer working. If I try to register a device using the "Register" client action, an error is returned that no UserID or PushToken was provided.

Also, the device is never registered.

I followed the tutorials provided for the plugin. 

Other users are reporting the same problem on forge.


Hi Pieter, 

Yep we cant register with android, I also face this problem, we should wait for them to update this component i think.


Regards,

Abdiel Alvin

I am using it and It is working fine on my side, may you please send a simple oml, replicating your flow. so that I might see where the problem might be.


Regards

Segonto

Hi Segonto

This app has two buttons. One for registering and one for un-registering. 

The AsyncRegistration property on the Register action is set to False. 

Hi Pieter

According to your Example, the flow is okay, but you are getting the error because the users are not linked with the device they will use to receive notifications. (The user Id and device Id are used in the registration process)

when a user is registered their Userid is linked to the device id that they will use the app on, to receive notifications.

my suggestion is, 

1 you move your action to the login See here on how to do it.

2 The users who will be using the app, must install the app on their devices and you give them the credentials to log in, and when they do that they will be registered.  if they are using one device, every time a user logs in, it will register that device with their UserId, canceling the previous user.


I hope this will help, let me know if this helped.

Regards 

Segonto


Hi. 

I followed the section for registering a device without a user (since that is the use case I have to work with). 

Also, I tried to use the RigisterWithUser on the login screen, but it generates the same error message.

What happens when you set the AsyncRegistration to False - Does it still work? Can you confirm on the OneSignal dashboard that the phone is registered?

Also, what version of MABS are you using to compile?

What happens when you set the AsyncRegistration to False - Does it still work?  Yes it is working

if you see the picture below, the sm-G532F  was registered today, the app version is 19 because I changed AsyncRegistration to False and published it.



I am using MAB 5.0


I hope that this helps


Regards 

Segonto

Hi

I don't completely follow what you mean. The application is run from a device on my side. The app also requires me to log in. Furthermore, the "register" client side action is executed as described by the documentation. I then output the error messages from the "register" client side action if the Success status property is False. The error I reported at the top is what the "register" client side action reports back.


Using the "RegisterWithUser" client side action in the Login (and ensuring that I'm presented with a login screen), I still get the same error message.


MABS v 5.0 is deprecated. I'm using 6.0 on my side (but I get the same error with 5.0). Are you using an older version of the plugin? Also, why are you using MABS 5.0? Is it an old application that you are using to test?

Thanks





Hi Segonto

I installed an old version 2.1.0 plugin and compiled it against MABS 5.0. The test application works with this old version, but not with version 3.1.1 on MABS 6.0. I'm assuming that you did not test it against  3.1.1 and MABS 6.0

Kind regards

Hi Pieter

Yes, I am using version 3.1.1 on MABS 5.0.

but I will also do a test on version  3.1.1 on MABS 6.0, and I Will give you feedback, latest by Monday.


Regards 

Segonto

Hi Segonto

This is 3.1.1 on MABS 6.0:


This is 3.0.0 on MABS 5.0:

And the OneSignal Console for the working older plugin version:


I tested on Enterprise and personal platforms. If I may make a suggestion, don't use an old app when testing. Create a new one with a newly generated apk. 

Kind regards

Hello guys.

I'm also facing some issues while trying to use OneSignal.

Has anyone opened a support case about this?

Hi Ricardo. I've just opened a support ticked. 

I got a problem with this one too. I've generated with MABS version 5.2 (which is the only one in 5 version that hasn't been deprecated yet), also got this message when I try the debug:

Hey guys,


I got the exact same problem, I am still working on the subject, but let me share my discoveries.


The error message will always come up I think, check image (they are assigning that error always at the end of the flow.)


I really think that "data.to.userId" and "data.to.pushToken" it is not filled. And the RegisterUser action is never called. I am still testing this part, I will give you feedback tomorrow.


My plan is to revert and call the GetId action and put those parameters as Input for the javascript and replace the code.


Hi, i'm having the same problem using the 3.1.1 version. 

Meanwhile i tried using 3.1.0 but it isn't working either. The flow seems to stop at the GetId Client Action after the getIdsJSAction without any error (at least that i could see debugging/ checking the logs). 

Has anyone found a solution for this problem?


Best Regards

Hi

Some feedback. 

OutSystems asked me to revert to 3.1.0 after they discontinued 3.1.1, however, I could also not get it to work. I could however get 3.0.0 to work, but it required MABS 5.2. I notified them that 3.1.0 was also not working since the support ticked that I logged was still open. Will see what their feedback is.

Hello,

We are already working on a correction for this. In the meantime, as a workaround, use the version 3.0.0, MABS 5.2.

Hello, 


We already identified the root cause of the issue. The fix will be on MABS and not on the OneSignal. Expect to have it fixed for MABS 6.1 on March 25th.

Thanks. 

Vitor Oliveira wrote:

Hello, 


We already identified the root cause of the issue. The fix will be on MABS and not on the OneSignal. Expect to have it fixed for MABS 6.1 on March 25th.

Thanks. 

Hi Vitor,


Is March 25, 2020 is the exact date? or still tentative? We have 3 Mobiles affected by this issue. 


Thank You.


Hi Paul, 


Actually, we will release it 1 day earlier, the exact will be March 24th, and on that day you can check in the MABS release notes the changes applied to fix the issue.


Best regards,

Vitor 

Same issue here, version 3.1.0 of the OneSignalPlugin not working, not registering the devices running my app with OneSignal. OneSignal dashboard does not show a PlayerID for the devices. 

Vitor Oliveira wrote:

Hi Paul, 


Actually, we will release it 1 day earlier, the exact will be March 24th, and on that day you can check in the MABS release notes the changes applied to fix the issue.


Best regards,

Vitor 


Hi Vitor,


Can you confirm if OneSignal can be fixed today (March 24, 2020 (GMT+8))? 


Thank You

Hello Paul, 


It was already released. A new build with MABS 6.1 will fix the issue. 


Thanks. 

Hi Vitor,


I regenerated my app with "newest MABS available". I reinstalled the app. Unfortunately, still the same problem. The flow stops at the "getIdsJSAction" javascript in the OneSignalPlugin. No response, nothing coming back from the OneSignal registration, no OneSignalUserId, no OneSignalPushToken, nothing.


Please let us know next steps? Thanks, Denis.

Let me clarify the persistent error mentioned in my post above: the issue happens when the device used was never registered for the app on OneSignal before. Hopefully that helps to replicate the issue.

Vitor Oliveira wrote:

Hello Paul, 


It was already released. A new build with MABS 6.1 will fix the issue. 


Thanks. 


HI Vitor,

We encountering error:

We don't see any updated version of MABS (or comment that there's an patch) or OneSignal with regards this concern. What is the indicator that there's an update yesterday?

Thank You!

Paul John Cezar wrote:

Vitor Oliveira wrote:

Hello Paul, 


It was already released. A new build with MABS 6.1 will fix the issue. 


Thanks. 


HI Vitor,

We encountering error:

We don't see any updated version of MABS (or comment that there's an patch) or OneSignal with regards this concern. What is the indicator that there's an update yesterday?

Thank You!

Hi Paul,


I've resolved this issue by changing plugin version on OneSignal Plugin Extensibility Configuration from 2.4.5-OS2 to 2.6.0-OS1


Hope this helps


In my case, I see the right version 2.6.0-OS1. But even with that newer version, the registration of a new device does not work, as I reported above. I have submitted a new support request to report the continuing issue.

Hi Support,

Any updates here? It seems MABS 6.1 does not fix the issue with OneSignal 3.1.0 on registering the devices using iOS

Also, no release notes from 6.1 of March 25th 2020: https://success.outsystems.com/Support/Release_Notes/Mobile_Apps_Build_Service#MABS_Version_6.1

The OneSignal registration issue has been resolved for me. The issue was that some security software (e.g. Fyde) running on mobile devices may prevent the app to register the device with OneSignal. The problem is that it halts the entire login process (assuming that is where registration takes place). I believe Outsystems support would look into that issue.