aspnetcore: Better error log for: "No .NET call dispatcher has been set."
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
I have added sentry to my website and i notice there are some errors with “No .NET call dispatcher has been set.”. But i do not have the same issue locally and based on the exception (stack trace) i wasn’t able to resolve this issue. The only hint is that it is happening only on iOS devices so far.
Stack trace
Error: No .NET call dispatcher has been set.
at w(/_framework/blazor.webassembly.js:1:2110)
at b(/_framework/blazor.webassembly.js:1:1995)
at ? (/_framework/blazor.webassembly.js:1:60337)
at asyncFunctionResume([native code])
at ? (/_framework/blazor.webassembly.js:1:28875)
at asyncFunctionResume([native code])
at ? (/_framework/blazor.webassembly.js:1:27678)
at asyncFunctionResume([native code])
at ? (/_framework/blazor.webassembly.js:1:28990)
at asyncFunctionResume([native code])
Describe the solution you’d like
It would be nice if there was some hint in error message which make debugging easier.
Additional context
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (10 by maintainers)
I already deploy ‘fix’ where i try to remove
ConfigureAwait(i hope i do not miss anything). But I still see the error in sentry. Is there anything else what could cause it? Or is there something that I can do to get more information about the error (without access to real devices where error happen)?From what i know it is only happened on iOS devices
@jirisykora83 sorry, my English broke 😄.
Avoid running things that interact with JS or Blazor state from background threads, and so on.
Blazor uses a synchronization context and things like ConfigureAwait break it.