Countly.Instance.SessionBegin() throwing object reference exception


#1

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();

#2

Hello,
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?


#3

Hi,
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:

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=Countly
  StackTrace:
   at CountlySDK.CountlyCommon.Entities.EntityBase.CountlyUserDetailsBase.set__custom(Dictionary`2 value)

Snapshot:


#4

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