question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'System.PlatformNotSupportedException', reason: 'Operation is not supported on this platform. (System.PlatformNotSupportedException)

See original GitHub issue

Please mark the type framework used:

  • Other: net6.0-maccatalyst

Please mark the NuGet packages used:

  • Sentry
  • Sentry.Serilog
  • Sentry.Extensions.Logging
  • Version: 3.15.0

Seems like Sentry doesn’t yet support net6.0-maccatalyst target, app crashes on startup with (I also looked into supplying my own http factory, but property is internal)

Application Specific Information:
*** Terminating app due to uncaught exception 'System.PlatformNotSupportedException', reason: 'Operation is not supported on this platform. (System.PlatformNotSupportedException)
at System.Net.Http.NSUrlSessionHandler.get_SupportsAutomaticDecompression()
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
--- End of stack trace from previous location ---
at System.Net.Http.HttpClientHandler.InvokeNativeHandlerMethod(String name, Object[] parameters)
at System.Net.Http.HttpClientHandler.GetSupportsAutomaticDecompression()
at System.Net.Http.HttpClientHandler.get_SupportsAutomaticDecompression()
at Sentry.Internal.Http.DefaultSentryHttpClientFactory.Create(SentryOptions options) in /_/src/Sentry/Internal/Http/DefaultSentryHttpClientFactory.cs:line 34
at Sentry.Internal.SdkComposer.CreateTransport() in /_/src/Sentry/Internal/SdkComposer.cs:line 37
at Sentry.Internal.SdkComposer.CreateBackgroundWorker() in /_/src/Sentry/Internal/SdkComposer.cs:line 112
at Sentry.SentryClient..ctor(SentryOptions options, IBackgroundWorker worker) in /_/src/Sentry/SentryClient.cs:line 52
at Sentry.SentryClient..ctor(SentryOptions options) in /_/src/Sentry/SentryClient.cs:line 39
at Sentry.Internal.Hub..ctor(SentryOptions options, ISentryClient client, ISessionManager sessionManager, ISystemClock clock, IInternalScopeManager scopeManager) in /_/src/Sentry/Internal/Hub.cs:line 51
at Sentry.SentrySdk.InitHub(SentryOptions options) in /_/src/Sentry/SentrySdk.cs:line 53
at Sentry.SentrySdk.Init(SentryOptions options) in /_/src/Sentry/SentrySdk.cs:line 97
at Serilog.SentrySinkExtensions.Sentry(LoggerSinkConfiguration loggerConfiguration, Action`1 configureOptions) in /_/src/Sentry.Serilog/SentrySinkExtensions.cs:line 341

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
SimonCroppcommented, Apr 4, 2022

@anpin thanks so much for the help. i have raised an upstream issue here https://github.com/dotnet/runtime/issues/67529

on potential workaround would be to catch PlatformNotSupportedException and assume SupportsAutomaticDecompression is false. @mattjohnsonpint thoughts?

0reactions
mattjohnsonpintcommented, Apr 4, 2022

@SimonCropp - the workaround sounds fine to me. I made a PR with that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

System.PlatformNotSupportedException: 'Operation is not ...
System.PlatformNotSupportedException: 'Operation is not supported on this platform.' when upgrading ServiceStack to .netcore 2.0.
Read more >
System.PlatformNotSupportedException: Operation is not ...
Looks a bit like you got the library for the wrong platform. You need to make sure you build for linux to run...
Read more >
System.PlatformNotSupportedException:“Operation is not ...
The reason the compilation APIs are not supported is because the compilers (e.g. CS compiler) doesn't ship as part of the .NET runtime....
Read more >
*System.PlatformNotSupportedException:** 'Operation is ...
Hello Guys , So i tried to run this game in xamarin forms , but when i try compile : System.Drawing.Bitmap mybitmap =...
Read more >
Security - PlatformNotSupportedException (Operation is ...
Security - PlatformNotSupportedException (Operation is not supported on this platform) is thrown on an attempt to run a Xamarin app (E4908) on ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found