OneSignal / react-onesignal

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

[Bug]: Login: No identity model found #126

Closed arianshirepublik closed 10 months ago

arianshirepublik commented 11 months ago

What happened?

"react-onesignal": "^3.0.1",

When I am using import OneSignal from 'react-onesignal'

OneSignal.login(id, token.oneSignalUserIdToken)

new user login show error:

LoginManager.js:95 n: Login: No identity model found at Cn. (https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.es6.js?v=160002:1:262495) at Generator.next () at r (https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.es6.js?v=160002:1:325606)

image

What browsers are you seeing the problem on?

Chrome (Chromium)

What operating system are you running?

macOS Ventura 13.0

Steps to reproduce?

OneSignal.login(id, token.oneSignalUserIdToken)

new user login show error:

LoginManager.js:95 n: Login: No identity model found
    at Cn.<anonymous> (https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.es6.js?v=160002:1:262495)
    at Generator.next (<anonymous>)
    at r (https://cdn.onesignal.com/sdks/web/v16/OneSignalSDK.page.es6.js?v=160002:1:325606)

What did you expect to happen?

we can log in correctly and then perform personalized push

Relevant log output

No response

emiltsang-flow commented 6 months ago

@arianshirepublik How did you fix the issue?

arianshirepublik commented 6 months ago

@arianshirepublik How did you fix the issue?

Hi @emiltsang-flow

The V3 version has user identification problems will occur. Use the V2 version. "react-onesignal": "2.0.3",

https://github.com/OneSignal/react-onesignal/blob/user-model/v1/MigrationGuide.md

emiltsang-flow commented 6 months ago

Thanks @arianshirepublik , lets see whether i can find the corresponding release in the vue version.