Countly.Instance.SessionBegin() throwing object reference exception


Hi, I am using countly for Windows application. While calling Countly.Instance.SessionBegin(), I am getting object reference exception.

                CountlyConfig countlyConfig = new CountlyConfig();
                countlyConfig.serverUrl = serviceUri;
                countlyConfig.appKey = appKey;
                countlyConfig.appVersion = appVersion;

                await Countly.Instance.Init(countlyConfig);
                await Countly.Instance.SessionBegin();


What kind of project type are you targeting and which SDK version are you using?

Could you enable SDK logging with this before initiating the SDK:
"Countly.IsLoggingEnabled = true;"

And then copy paste what you see in the console output.

Could you maybe take a screenshot of that exception? Usually there are additional messages attached to them.

If I'm not wrong then "object reference exception" would mean a null pointer exception, are you sure that one of those provided values is not null?


We are targeting WPF project with Nuget package version 18.10.0.

I have checked all the parameters for null values. All of them are correct.

Here is the details for the exception:

  Message=Object reference not set to an instance of an object.
   at CountlySDK.CountlyCommon.Entities.EntityBase.CountlyUserDetailsBase.set__custom(Dictionary`2 value)



Which .net version are you targeting? Could you maybe send a sample project that causes this problem?