OneSignal / react-onesignal

React OneSignal Module: Make it easy to integrate OneSignal with your React App!
Other
74 stars 23 forks source link

[Bug]: My player id is unsubscribe when refresh (F5) my app #93

Closed agustinramos closed 10 months ago

agustinramos commented 1 year ago

What happened?

28

The problem exist in the new version!!

Steps to reproduce?

Hi, I have a problem, maybe my implementation is wrong, but I want your feedback, I've tried to implement onesignal on my reactjs web app (it's not react native).

I tried 3 differents aproachs:
1.- Following the oficial onesignal web push sdk documentation.
2.- This aproach.
3.- Using this aproach https://dev.to/devpato/push-notifications-in-reactjs-with-onesignal-5bon

All of them I've completed successfully, but all have a strange behavior on my reactjs web app.

When my app get the notifications permissions for first time and I accept it, it doesn't show the welcome notification and if I send a notification from my onesignal dashboard it doesn't show.

If I refresh (F5) my app two times and send another notification, it works and show correctly. But if for any reason I refresh again my app, the notifications don't work anymore and in my onesignal dashboard shows that my player id is unsubscribe.

Somebody has the same issue? or what could be wrong in my app? Thanks.

What did you expect to happen?

I expected to dont lose the connection when the user refresh the app

Relevant log output

No response

rgomezp commented 1 year ago

Howdy, Do you have an app that you could share with us to review?

Cheers

jkasten2 commented 10 months ago

Closing due to no response.