Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Segment.Analytics.Mediator - Exception when initialising Analytics on iOS #97

@IainS1986

Description

@IainS1986

Describe the bug
I've just seen a consistent exception on my device (we've been using Segment for some time in Xamarin Native, have ported over to .net8, been running for a while but this is a random edge case it seems as its a new crash i've not seen before).

Just basic init below...

var configuration = new Configuration(SegmentKey,
                flushAt: 20,
                flushInterval: 30);
_analytics = new Analytics(configuration);

Theres an exception thrown,

System.AggregateException
2024-03-13 10:28:04.755 xxx.iOS[12074:9672560] A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Object reference not set to an instance of an object.)

---- Inner Exception
System.NullReferenceException
Object reference not set to an instance of an object.
   at Segment.Analytics.Mediator.<>c__DisplayClass1_0.<<Add>b__0>d.MoveNext()

Platform (please complete the following information):

  • Library Version in use: Segment.Analytics.CSharp/2.3.1
  • Platform being tested: iOS on .net8

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions