OneSignal / react-onesignal

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

processSubscriptionModel: missing onesignalId #136

Closed tragicmj closed 4 weeks ago

tragicmj commented 10 months ago

What happened?

After giving permission for Web Push, and trying to get PushSubscription.id I keep getting error instead of the id

What browsers are you seeing the problem on?

Chrome (Chromium)

What operating system are you running?

macOS Monterey v12.7

Steps to reproduce?

1. Installed React-Onesignal
2. Ask Permission for web push
3. console push id

What did you expect to happen?

I expected to get the push id

Relevant log output

SessionManager.js:70 Uncaught (in promise) n: Abort _getOneSignalAndSubscriptionIds: no subscription
    at $t.<anonymous> (https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.es6.js?v=160101:1:102170)
    at Generator.next (<anonymous>)
    at r (https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.es6.js?v=160101:1:260398)

n: processSubscriptionModel: missing onesignalId: {"subscribers":{},"modelName":"pushSubscriptions","modelId":"9boxjm6ty9u","data":{"type":"ChromePush","token":"*******","enabled":true,"notification_types":1,"sdk":"160101","device_model":"MacIntel","device_os":120,"web_auth":"*******","web_p256":"********"},"awaitOneSignalIdAvailable":{}}
igeiton commented 5 months ago

I literally just had this error. I've tried a lot of solutions and here's what I can offer reset the application cache.

https://documentation.onesignal.com/docs/clearing-cache-and-resetting-push-permissions#reset-chrome-on-desktop

jennantilla commented 4 weeks ago

Thanks for the suggestion, @igeiton! We'll go ahead and close this issue but feel free to open a new one if you encounter any other problems.