Skip to content

Prevent Native/Cocoa SDKs from capturing errors that also get captured by .NET #3954

Closed

Description

@jamescrosswell

This would be the "long term solution" described in #3902 and the permanent resolution to the errors described in there:

However it likely requires support from the Native team and we don't currently have capacity to work on this (see #3861 (comment)).

Activity

  1. jurganson commented on Mar 26, 2025

    @jurganson

    I'm facing an issue with duplicate logs in our Sentry implementation. While I've disabled native reports using options available in Sentry 5.3.0, my app still experiences significant native crashes that contain valuable information.

    As a temporary workaround, I attempted to filter out unhelpful crashes by checking stack frames in BeforeSend, specifically targeting signalhandler mechanism crashes with no functions. However, during testing, I noticed that none of these native crashes went through my BeforeSend function.

    Is this expected behavior for native crashes to bypass BeforeSend? I was testing on Sentry version 5.1.0, which may be relevant.

  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Mar 26, 2025
  3. jamescrosswell commented on Mar 26, 2025

    @jamescrosswell
    CollaboratorAuthor

    Is this expected behavior for native crashes to bypass BeforeSend? I was testing on Sentry version 5.1.0, which may be relevant.

    Support for native BeforeSend was introduced for iOS (#3958) in Version 5.3.0.

    This has been available on Android since well before version 5.0.0 but is guarded by a flag in the options:

    public bool EnableBeforeSend { get; set; } = false;

    There's another option for Android that you can use to suppress SIGSEGV native errors (options.Android.SuppressSegfaults). Enabling that though will suppress native exceptions that are otherwise/already reported as a managed NullRefrenceException, however it can also suppress SIGSEGV errors unrelated to managed code (in which case you wouldn't know about quite serious bugs that were crashing your app).

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Mar 26, 2025
  5. arek-corp commented on Apr 16, 2025

    @arek-corp

    Does the feature implemented in 5.5.0 for IScopeObserver help in this?

    PR:
    #4026

  6. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Apr 16, 2025
  7. jamescrosswell commented on Apr 16, 2025

    @jamescrosswell
    CollaboratorAuthor

    Does the feature implemented in 5.5.0 for IScopeObserver help in this?

    It doesn't no. That PR is dealing with something unrelated.

  8. 92 remaining items

  9. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Apr 17, 2026
  10. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Apr 17, 2026
  11. espenrl commented on Apr 17, 2026

    @espenrl

    Awesome work @jpnurmi - I've been curiously reading many of the PR that went into this across repositories in Sentry dotnet/java/cocoa/native and dotnet android/macios/runtime for my own learning. There's alot of effort put into these so thanks for taking the time to solve a complicated problem.

  12. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Apr 17, 2026
  13. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Apr 17, 2026
  14. jamescrosswell commented on Apr 20, 2026

    @jamescrosswell
    CollaboratorAuthor

    @jpnurmi can we finally close this issue or are we waiting for community feedback/confirmation?

  15. jpnurmi commented on Apr 21, 2026

    @jpnurmi
    Collaborator

    Yes, this can now be closed. The last part of the fix for Android/CoreCLR shipped in 6.4.1. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

.NETPull requests that update .net codeImprovement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions