OneSignal-Unity-SDK icon indicating copy to clipboard operation
OneSignal-Unity-SDK copied to clipboard

SetExternalUserId Callback Doesn't Get Called even though onExternalUserIdUpdateCompletion Gets Called

Open salihzekiokur opened this issue 4 years ago • 1 comments

Description:

Json.Deserialize at OneSignal.onExternalUserIdUpdateCompletion(string jsonString) (1179) returns delegate_id as "completion: " + DELEGATE_ID instead of returning DELEGATE_ID. Hence delegates.ContainsKey(delegateId) at (1190) always returns false. Because of that, even though onExternalUserIdUpdateCompletion is called, the callback given to SetExternalUserId never gets called. Below, under ScreenShots title are screenshots taken from Rider during a debug.

Environment

Unity: 2020.1.17f1 OneSignal: 2.14.0, 2.14.1, 2.14.3

Issue occurs in Android and not tested on iOS

Steps to Reproduce Issue:

  1. Create a method OnIdSet that takes "Dictionary<string,object>" as parameter
  2. Call OneSignal.SetExternalUserId("AnyString",OnIdSet)

ScreenShots:

Screen Shot 2021-10-05 at 15 34 34 Screen Shot 2021-10-05 at 15 37 17

salihzekiokur avatar Oct 05 '21 13:10 salihzekiokur

@salihzekiokur Thanks for reporting. Could you try out our latest 3.x.x version to see if this is still an issue for you? Most of the internals of the SDK have changed around this.

Migration guide for updating from 2.x.x to 3.x.x

jkasten2 avatar Apr 24 '22 05:04 jkasten2