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.
For users on Xamarin iOS, offline caching may cause this issue.
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
- Close your IDE.
- Open your iOS
.csprojwith a text or xml editor.
- Add the following NuGet reference:
<PackageReference Include="System.Memory" IncludeAssets="None"> <Version>4.5.4</Version> </PackageReference>
It's important to add the
None, or this fix will not work.
- Save and open your IDE
- 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.AsMemory();