You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SDK docs clearly say that login will create or find a user by that ID. Trying it the first time works, but after that the identify endpoint always returns an error "One or more Aliases claimed by another User"
Thanks for reporting. I was able to reproduce the error showing in the JS console, but it does get handled correctly. The push subscription is transferred to the logged in User and future operations work correctly.
Here is the logging set to trace with OneSignal.Debug.setLogLevel('trace'); with the full log.
OneSignalSDK.page.es6.js?v=160001:10533 PATCH https://onesignal.com/api/v1/apps/a3268fe7-cc94-4f25-ab09-867b957d7fe2/users/by/onesignal_id/9a2a831c-96b5-490f-b328-94118f56888b/identity 409
OneSignalSDK.page.es6.js?v=160001:6880 identifyUser failed: externalId already exists. Attempting to transfer push subscription...
OneSignalSDK.page.es6.js?v=160001:6886 transfer Subscription succeeded
We definitely shouldn't be showing that as an error though, as it is very misleading, so we will get that cleaned up in a future release.
It seems a non-successful HTTP response is printed to the JS console on browsers' directly, and there isn't a way it can be suppressed from JS. https://stackoverflow.com/a/42986081
I believe the best we can do here is to use console.error to point out the above HTTP 409 is expected and the error can be ignored safely.
What happened?
The SDK docs clearly say that login will create or find a user by that ID. Trying it the first time works, but after that the identify endpoint always returns an error "One or more Aliases claimed by another User"
What browsers are you seeing the problem on?
Firefox, Chrome (Chromium)
What operating system are you running?
latest macos
Steps to reproduce?
What did you expect to happen?
No error
Relevant log output
No response
The text was updated successfully, but these errors were encountered: