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

Comments

3 comments
  • 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?

    0
    Comment actions Permalink
  • 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:

    0
    Comment actions Permalink
  • Which .net version are you targeting? Could you maybe send a sample project that causes this problem?

    0
    Comment actions Permalink

Please sign in to leave a comment.