Skip to content

Set External Id Not Working #589

Closed
Closed
@kwameopareasiedu

Description

@kwameopareasiedu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions