Open jt274 opened 1 year ago
same issue
@jt274 Thank you for reporting we are investigating both issues. For the login issue how many devices have used the User1 external_id. There is a subscription limit of 20 subscriptions that you might be hitting when testing and the error message might misleading
@emawby There has only been one (maybe two at most) device using that account. However it has run both debug and production versions of the app. So maybe it would cause an issue if the app is reinstalled more than once and it sees it as a new device each time?
@jt274 Yes a uninstall/reinstall counts as a new subscription (new push token) so that may be the issue, but the error message should indicate that subscription limit was hit in that case. It looks like the 409 is expected, but the SDK should be handling it for you. The 500 error in the log is likely the root cause of the problem. Are you able to share the request of the POST apps/APP_ID/users
call that got the 500 error?
@emawby So you are saying the SDK should handle it by, for example, deleting old subscriptions and properly updating the user?
Are you wanting the app ID and user's onesignal ID (the parts I redacted)?
@emawby
If I search the external ID in the onesignal dashboard, it pulls up 6 subscriptions matching the external ID, all associated with one onesignal ID.
I believe this is the 500 error you're referring to:
[DefaultDispatcher-worker-3] HttpClient: POST apps/APP_ID/users - {"identity":{"external_id":"USER_ID"},"subscriptions":[{"id":"ONESIGNAL_ID","token":"PUSH_TOKEN","enabled":true,"notification_types":1},{"type":"Email","token":"me@email.com","enabled":true,"notification_types":1,"sdk":"050000","device_model":"SM-G981V","device_os":"12","rooted":false,"net_type":0,"carrier":"US Mobile","app_version":"44"}]}
@emawby
The app is trying to use the PATCH
command to update the user alias using the onesignal_id
alias label like so:
PATCH apps/APP_ID/users/by/onesignal_id/ONESIGNAL_USER_ID/identity
However, it returns the 409 error because the external id is already taken by another onesignal user. I believe it is supposed to update the already existing onesignal user by issuing the PATCH
command using the external_id
alias label like this instead:
PATCH apps/APP_ID/users/by/external_id/USER_ID/identity
This is according to the docs here: https://documentation.onesignal.com/reference/create-alias
The logged in user should then be linked to the onesignal_id
associated with the provided external_id
. Is that correct?
Although I have not done extensive testing, this issue appears to be resolved on the back end. @emawby can you confirm?
any updates here?
any updates on this?
@emawby any updates?
Hi @jt274 sorry for the delayed response.
There have been numerous backend fixes since August, so it may have been fixed. Are you still seeing this 500 response anymore?
I'll explain more about how the SDK handles the 409 response:
Hi @RogerBrusamarello @ChoyCheeWei @vasilich6107, please tell me more about what you are running into and what version of the SDK you are using.
Having the same issue.
errors = ( { code = "user-2"; meta = { "external_id" = "..."; }; title = "One or more Aliases claimed by another User"; } ); httpStatusCode = 409;
facing the same issue... any updates?
Same issue(( (v16)
I do also have issue where same user signs in from another device. It throws the error. Tried to remove the subscriptions (all of them) and getting this error now: "One or more Aliases claimed by another User", even tho subscriptions are empty.
Same here, tryed to delete the aliase with postman but get
{ "errors": [ { "title": "No subscription with alias
(alias: my_alias)found" } ] }
Same error
The same issue
What happened?
v5.0.0 throws the error after following the migration guide and using an existing user. App uninstall/reinstall does not fix the issue. Issue did not occur on Android emulator using
User1
account, but did occur on physical device usingUser2
account.The docs specifically state that if the user already exists when logging in, the user will be updated. If the user does not exist, they will be created.
After throwing the error, it repeatedly retries in an infinite loop.
Additionally, the following error is thrown:
MissingPluginException(No implementation found for method OneSignal#optIn on channel OneSignal#pushsubscription)
Steps to reproduce?
What did you expect to happen?
User should be updated according to
external_id
. Any anonymous user should be merged with existing user according toexternal_id
.OneSignal Flutter SDK version
5.0.0
Which platform(s) are affected?
Relevant log output
Code of Conduct