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.

(UWP) System.InvalidOperationException: Cannot call Set on a null context

See original GitHub issue

TestMonoTorrentUWP.zip

I’m implement MonoTorrent in UWP project. It’s work perfect in Debug mode, but in Release mode (only happen on Release) (submit to Store), an UnhandledException happen with this error message You can see in attached sample UWP project

System.InvalidOperationException: Cannot call Set on a null context
   at System.Threading.ExecutionContext.Run(ExecutionContext, ContextCallback, Object) + 0x3e
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.CallMoveNext() + 0x7f
   at System.Action.Invoke() + 0x25
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(Action, Boolean, Task&) + 0x43

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
alanmcgoverncommented, Jan 30, 2020

Sorry - this change is in 1.0.14!

1reaction
alanmcgoverncommented, Dec 17, 2019

I’ll merge similar changes into the library so it works out of box on UWP. Thanks for verifying the fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot call Set on a null context · Issue #5603 · dotnet/ ...
After I built the latest corert build, I started gettting this error when working with WebClient and httpClient.
Read more >
InvalidOperationException Class (System)
Attempting to cast a Nullable<T> value that is null to its underlying type throws an InvalidOperationException exception and displays the error message, " ......
Read more >
Handling 'Sequence has no elements' Exception [duplicate]
You are using LINQ's First() method, which as per the documentation throws an InvalidOperationException if you are calling it on an empty ......
Read more >
InvalidOperationException Unable resolve service ... - YouTube
InvalidOperationException Unable resolve service Context attempt activate Controller ASP.NET Core · Comments11.
Read more >
Page cannot be null. Please ensure that this operation is ...
But when I try to render, I am getting error. Page cannot be null. Please ensure that this operation is being performed in...
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