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

Set External Id Not Working #589

Closed
kwameopareasiedu opened this issue Aug 17, 2022 · 7 comments
Closed

Set External Id Not Working #589

kwameopareasiedu opened this issue Aug 17, 2022 · 7 comments

Comments

@kwameopareasiedu
Copy link

Description:

In the v3.4.1 version of the SDK, calling the OneSignal.shared.setExternalUserId(id) does not seem to work. It logs successfully in the emulator console but when I checked my user in the dashboard, the external id field is still blank. As such API calls to send a notification return the following error:

{
  id: '',
  recipients: 0,
  errors: [ 'All included players are not subscribed' ]
}

Environment

  1. Onesignal_Flutter 3.4.1
  2. Installed using flutter pub add

Steps to Reproduce Issue:

  1. Use flutter create to create a new project
  2. Install the latest version of onesignal_flutter: 3.4.1
  3. Make a call to OneSignal.shared.setExternalUserId(id)
  4. Check value of external user id in dashboard

Anything else:
Below are the logs when the setExternalUserId(id) is called:

D/OneSignal(10812): UserStateSynchronizer internalSyncUserState from session call: false jsonBody: {"external_user_id":"<ID here>","app_id":"<ID here>"}
D/OneSignal(10812): OneSignalRestClient: Making request to: https://api.onesignal.com/players/<ID here>
D/OneSignal(10812): OneSignalRestClient: PUT SEND JSON: {"external_user_id":"<ID here>","app_id":"<ID here>"}
V/OneSignal(10812): OneSignalRestClient: After con.getResponseCode to: https://api.onesignal.com/players/<ID here>
D/OneSignal(10812): OneSignalRestClient: Successfully finished request to: https://api.onesignal.com/players/<ID here>
D/OneSignal(10812): OneSignalRestClient: PUT RECEIVED JSON: {"success":true}
V/OneSignal(10812): Completed request to update external user id for channel: push and success: true
V/OneSignal(10812): External user id handlers are still being processed for channel: push , wait until finished before proceeding
V/OneSignal(10812): Completed request to update external user id for channel: push and success: true
@nan-li
Copy link
Contributor

nan-li commented Aug 26, 2022

Hi @kwameopareasiedu,

Thank you for reporting. Can you answer some clarifying questions:

  1. Does the external ID eventually show up in the dashboard after waiting some time and checking again?
  2. Does this also happen on iOS?
  3. Does this consistently happen or does it work sometimes?

@kwameopareasiedu
Copy link
Author

Hello @nan-li ,

  1. Yes, it did appear on the dashboard after a while
  2. I haven't tested on iOS yet
  3. Well, this is the first time I'm experiencing it. After the external id appeared that time, I haven't encountered this issue on subsequent fresh installs

@nan-li
Copy link
Contributor

nan-li commented Sep 23, 2022

Hi @kwameopareasiedu,

You mentioned in your last response that you haven't encountered this issue after that time.

I am checking in if that is still true, or is this still an issue for you?

@kwameopareasiedu
Copy link
Author

Safe to say, this is no longer an issue...

@Princewil
Copy link

@nan-li can you pls tell me what you did because I currently facing this issue.

the external UID reflects on the onesignal console, but when I send notifications using the uid it say “players not subscribed”, however sending with the default uid go successfully.

Thank you

@RogerBrusamarello
Copy link

Any updates here?

@nan-li
Copy link
Contributor

nan-li commented Dec 19, 2023

Hi @Princewil and @RogerBrusamarello, since so long has passed, please open a new issue with the details of your report.

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

4 participants