If you need help solving issues with your Sentry's Xamarin SDK, you can read the edge cases documented here. If you need additional help, you can view our forums, and customers on a paid plan may also contact support.

Offline Caching Information

For users on Xamarin iOS, offline caching may cause this issue.

Event/Transaction Capture

Failed to send cached envelope: System.MissingMethodException: Method not found: System.Text.Json.JsonDocument

If this message displays in your debug window when capturing an event or transaction, manually edit your platform csproj:

  1. Close your IDE.
  2. Open your iOS .csproj with a text or xml editor.
  3. Add the following NuGet reference:
    <PackageReference Include="System.Memory" IncludeAssets="None">
  1. Save and open your IDE
  2. Wait for the IDE to restore the packages. Once finished, try to capture an exception or transaction

Another way to validate if the problem is happening on an iOS project is by adding the following code to your iOS project, to check if there's a conflict:

    _ = new byte[2].AsMemory();
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").