Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: **external_id not registerd** #841

Closed
3 tasks done
salahturkmen opened this issue Feb 22, 2024 · 12 comments
Closed
3 tasks done

[Bug]: **external_id not registerd** #841

salahturkmen opened this issue Feb 22, 2024 · 12 comments

Comments

@salahturkmen
Copy link

salahturkmen commented Feb 22, 2024

What happened?

User Subscribed in dashboard but external_id not registerd

Steps to reproduce?

Tested in real devices
And two mothed
    OneSignal.login('Odun1');
    OneSignal.loginWithJwt('Odun1','******');

What did you expect to happen?

User Subscribed With external_id

OneSignal Flutter SDK version

Release 5.1.0

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

D/OneSignal(17426): [OpRepo] LoginUserOperationExecutor(operation: [{"name":"login-user","appId":"**-**-**-**-**","onesignalId":"**-**-**-**-**","externalId":"Odun2","existingOnesignalId":"**-**-**-**-**","id":"**-**-**-**-**"}, {"name":"transfer-subscription","appId":"**-**-**-**-**","subscriptionId":"**-**-**-**-**","onesignalId":"**-**-**-**-**","id":"**-**-**-**-**"}])
D/OneSignal(17426): [OpRepo] IdentityOperationExecutor(operations: [{"name":"set-alias","appId":"**-**-**-**-**","onesignalId":"**-**-**-**-**","label":"external_id","value":"Odun2"}])
D/OneSignal(17426): [DefaultDispatcher-worker-5] HttpClient: PATCH apps/**-**-**-**-**/users/by/onesignal_id/**-**-**-**-**/identity - {"identity":{"external_id":"Odun2"}}
D/OneSignal(17426): [DefaultDispatcher-worker-5] HttpClient: PATCH apps/**-**-**-**-**/users/by/onesignal_id/**-**-**-**-**/identity - FAILED STATUS: 401
W/OneSignal(17426): [DefaultDispatcher-worker-5] HttpClient: PATCH RECEIVED JSON: {"errors":[{"code":"auth-1","title":"This operation requires 'Authorization' in the HTTP header"}]}
D/OneSignal(17426): [OpRepo] OperationRepo: execute response = FAIL_UNAUTHORIZED
E/OneSignal(17426): Operation execution failed without retry: [{"name":"login-user","appId":"**-**-**-**-**","onesignalId":"**-**-**-**-**","externalId":"Odun2","existingOnesignalId":"**-**-**-**-**","id":"**-**-**-**-**"}, {"name":"transfer-subscription","appId":"**-**-**-**-**","subscriptionId":"**-**-**-**-**","onesignalId":"**-**-**-**-**","id":"**-**-**-**-**"}]
E/OneSignal(17426): Could not login user

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gitananun
Copy link

Having the same issue. Login with any external_id is not working.
After allowing the notifications, a new subscription is there with an empty external_id.

@vydyas
Copy link

vydyas commented Feb 23, 2024

@salahturkmen Do you have any other solution?

@salahturkmen
Copy link
Author

salahturkmen commented Feb 23, 2024

not yet trying to update external id by rest api but nothing

@nan-li
Copy link
Contributor

nan-li commented Feb 23, 2024

Hi @salahturkmen do you have Identity Verification turned on for your app?

The v5 SDKs currently do not support that feature yet so Identity Verification should be off.

@salahturkmen
Copy link
Author

@nan-li Identity Verification?

@vydyas
Copy link

vydyas commented Feb 23, 2024

@nan-li Its already off for my app still login function is not setting the external id.
Screenshot 2024-02-23 at 9 50 54 PM

@nan-li
Copy link
Contributor

nan-li commented Feb 23, 2024

Hi @salahturkmen,

If you go into the OneSignal Dashboard, go to Settings > Keys & IDs > Identity Verification for email + external_id is a toggle.

Screenshot 2024-02-23 at 10 10 23 AM

Can you confirm it is set to "off"?

@nan-li
Copy link
Contributor

nan-li commented Feb 23, 2024

Hi @vydyas,
I would not expect the error {"errors":[{"code":"auth-1","title":"This operation requires 'Authorization' in the HTTP header"}]} if you have Identity Verification turned off.

Is everyone else reporting also seeing this with Identity Verification turned to "off"?

@salahturkmen
Copy link
Author

salahturkmen commented Feb 23, 2024

Hi @salahturkmen,

If you go into the OneSignal Dashboard, go to Settings > Keys & IDs > Identity Verification for email + external_id is a toggle.
Screenshot 2024-02-23 at 10 10 23 AM

Can you confirm it is set to "off"?

thank now it run

@gitananun
Copy link

Still having issues with external_id. For one user only, it works fine. But I'm testing with other user's phones, and it doesn't register the external_id for the users.

@tamiratdereje
Copy link

Still having issues with external_id. For one user only, it works fine. But I'm testing with other user's phones, and it doesn't register the external_id for the users.

I think you have to reinstall the app, and it will work perfectly.

@FullstackWEB-developer
Copy link

FullstackWEB-developer commented Aug 19, 2024

I got same issue with iOS.
Strangely, all functions work smoothly with the same code on Android and iOS, but only on iOS, external_id registration does not work when logging in.
await OneSignal.login('test_id');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants