OneSignal / OneSignal-Xamarin-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Xamarin app with OneSignal. https://onesignal.com
Other
104 stars 50 forks source link

OneSignal.Default.SetExternalUserId value cannot be null - Parameter name hashtoken #314

Closed developer9969 closed 1 year ago

developer9969 commented 2 years ago

Description:

When calling "OneSignal.Default.SetExternalUserId("3483843204") we get below error image

Can you please advise, the error only gives us this

System.ArgumentNullException Message=Value cannot be null. Parameter name: hashToken

I am using OneSignal 4.00 Xamarin forms :5.0.0.2337

We are pretty much stuck here, any advise.

Many thanks for your prompt reply

Dipannita20 commented 2 years ago

@tanaynigam @jkasten2 any update on this, I am also stuck here after migrating to 4.0.0. Please respond

tanaynigam commented 1 year ago

@developer9969 @Dipannita20 Thanks for reporting the issue. We're currently investigating it and should have a fix for it soon.

ChrisMonson commented 1 year ago

It looks like this has been reported as fixed in v4.1.1, but it appears that this is still happening after updating. The only SetExternalUserId method that is available is the one with the optional authHash parameter, and calling OneSignal.Default.SetExternalUserId("12345") still results in the same error that was previously reported.

I've included a decompiled copy of the OneSignalSDKInternal class in v4.1.1 showing no overload of SetExternalUserId without the optional authHash parameter that was included in the fix for this. Not sure what happened here, but unfortunately it still seems to be broken for me.

OneSignal.Xamarin.Core.OneSignalSDKInternal.txt

jkasten2 commented 1 year ago

The fixed ended up not making it into the 4.1.1 release, this is now included in the 4.1.2 release.