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]: setExternalUserId sets only one record when called twice in a row. #1515

Closed
3 tasks done
mljlynch opened this issue May 4, 2023 · 3 comments
Closed
3 tasks done

Comments

@mljlynch
Copy link

mljlynch commented May 4, 2023

What happened?

We set up SetExternalUid on the email call back. Now we are getting external uids attached to the email record, but not the push notification record. Is this expected behavior?

My expectation would be that if I call code as follows - then both the push notification player record and email notification player record would be tagged with the same external UID. It seems however that the setting it in the email handler unsets it in the push notification record.

Steps to reproduce?

OneSignal.setExternalUserId(uid);
      if (email) {
        OneSignal.setEmail(email, undefined, () => {
          // Note: we have to set the onesignal euid again in the callback so
          // the external user id is set correctly in the email record
          // see: https://documentation.onesignal.com/docs/email-sdk-methods#setemail-method
          OneSignal.setExternalUserId(uid);
        });
      }

What did you expect to happen?

I would expect both the email and push notification record to have the external UID associated.

However, when using the above code, only the EMAIL record now has the external UID

React Native OneSignal SDK version

4.4.1

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mljlynch mljlynch changed the title [Bug]: [Bug]: setExternalUserId sets only one record when called twice in a row. May 4, 2023
@emawby
Copy link
Contributor

emawby commented May 8, 2023

@mljlynch Thank you for reporting we will investigate

@mljlynch
Copy link
Author

It appears this was fixed in https://github.com/OneSignal/react-native-onesignal/releases/tag/4.0.3, but I am on 4.4.1

@nan-li
Copy link
Contributor

nan-li commented Oct 25, 2024

Hi, we have had no further reports of this. Please upgrade the OneSignal SDK if you or anyone is still having this issue. If this is still an issue, please open a new report with updated information.

@nan-li nan-li closed this as completed Oct 25, 2024
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

3 participants