-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segment.Analytics.Mediator - Exception when initialising Analytics on iOS #97
Comments
It appears like everything still works fine, but the exception is being uncaught in a Task I believe inside Segement, which means I can't catch it and it fires off into our global error/exception handling for uncaught exceptions which is a pain |
It also seems to trigger as an uncaught exception twice |
hi @IainS1986 thanks for reporting this issue. could you first try the following to help us better understand the problem:
|
@wenxi-zeng I can confirm having the same issue on 2.3.3 Sentry logs it as iOS ::: Assembly: Will update to 2.3.4 and report back. |
@nmaricmoberg thanks for confirming this issue and providing the logs. the android log is very helpful. I do believe we have a potential null pointer exception in this line. we'll get it fixed asap. |
From a bit of investigation, I thought we were already checking the settings and I wouldn't expect any other references to be null at that point. I'll keep looking. @nmaricmoberg, could you provide more of the Segment logs? |
@wenxi-zeng @MichaelGHSeg Hey there. Thanks for taking a look into this. I am using .NET Native for Android and iOS, i.e. my mobile projects are targeting net8.0-android and net8.0-ios respectively. System.TypeLoadException Also unrelated but, AOT compilation is not possible and throws an error regarding Segment.
|
I have managed to mitigate the System.TypeLoadException error by creating an extra project XYZ.Common that targets netstandard2.1. The .NET 8 target causes that issue. I only reference Segment Analytics CSharp 2.3.4 in that project and I hold a static Analytics instance there that both projects (iOS and Android) use. I believe you need to directly add support for .NET 5-6-7-8 in the package. The build warnings are still there, and the original issue that Sentry reported is still there:
Also, you could try adding Xamarin.Native sample apps that target .NET 8. That could give you some further insight. |
@nmaricmoberg thanks for this detailed logs and diagnosing info. it's super. we'll take a look. in the meanwhile, please keep using the workaround you proposed. sorry for the inconvenience it may cause. |
Getting a similar error as this, however in Unity, limited stacktrace captured from sentry. I used the UnitySample patterns in our code to configure and Segment.
Using the following version of Segment |
Just an FYI in case people weren't aware. I'm getting this on Android too. |
@wenxi-zeng we are also seeing this issue and trying the fix from #98 fixes it, but we are not comfortable deploying without you taking a look and approving it. |
sorry for the delayed response. the fix from #98 looks promising. we will do some tests on our end to make sure everything works. will ship a release soon. |
hi all, the latest version |
Thank you @wenxi-zeng @dimitri-dev |
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...
Theres an exception thrown,
Platform (please complete the following information):
The text was updated successfully, but these errors were encountered: