OneSignal / onesignal-vue

Vue OneSignal Plugin: Make it easy to integrate OneSignal with your Vue App!
Other
13 stars 2 forks source link

[Bug]: login doesn't work #39

Closed bmulholland closed 1 year ago

bmulholland commented 1 year ago

What happened?

I'm calling login with correct credentials, but this happens:

[SessionManager.js:122:12](webpack://onesignal-web-sdk/home/runner/work/OneSignal-Website-SDK/OneSignal-Website-SDK/build/ts-to-es6/src/shared/managers/sessionManager/SessionManager.js)
Error handling focus: n: Abort _getOneSignalAndSubscriptionIds: no identity

What browsers are you seeing the problem on?

Firefox

What operating system are you running?

latest macos

Steps to reproduce?

This is all correct, using the vue sdk, everything is set correctly

            nuxtApp.$OneSignal.login(
              $auth.user.external_id,
              $auth.user.service_signatures.one_signal
            )

What did you expect to happen?

user logged in

Relevant log output

No response

bmulholland commented 1 year ago

Repro'd in Chrome, too

bmulholland commented 1 year ago

https://github.com/OneSignal/OneSignal-Website-SDK/issues/1095

jkasten2 commented 1 year ago

@bmulholland Thanks for reporting.

Can you share where you are initializing OneSignal in relation to calling OneSignal.login in your code?

It's possible OneSignal.login could be getting called before initialization is completing. Can you try awaiting on the Promise returned by OneSignal.init?

bmulholland commented 1 year ago

This was https://github.com/OneSignal/OneSignal-Website-SDK/issues/1095#issuecomment-1684242078

combined with other misleading errors