Error “{”stateMachine“:{”<>1__state“:-2,”<>t__builder“:{” when run project netcore
Before you get into this article, if you like to view .Net Core.
Introduction
You may probably worked in async Task and serialization in your .net core project.
The unhandled error thrown is solvable.
To explain a bit, I used .Net core 2.0 to create a sample demo web api that deals with accessing server to grab authorization code using controller action method. And the two Action Methods one result passed to another method, this is where error while executing.
How error displayed?
If you notice error, obviously this never been easier to read "{stateMachine: <> 1 __state <> t__builder".
The System.Runtime.CompilerServices.AsyncTaskMethodBuilder is the one trying to compile action method used in controller.
Just ignore below box, it might scare no head and tail - it is captured from browser while testing endpoint in browser
[System.Collections.Generic.List 1[XXXX.Models.YYY],System.Runtime.CompilerServices.IAsyncStateMachine]'. Path 'stateMachine.<>t__builder'.
[System.Collections.Generic.List 1[XXXX.Models.YYY],System.Runtime.CompilerServices.IAsyncStateMachine]'. Path 'stateMachine.<>t__builder'.
0 Comments