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.

Cannot run on blazor WASM application

See original GitHub issue

I am using this library with blazor WASM, and got below error:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: The type initializer for 'Traceable`1' threw an exception.
System.TypeInitializationException: The type initializer for 'Traceable`1' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'FSharp.Data.Adaptive.IndexList`1' threw an exception.
 ---> System.TypeInitializationException: The type initializer for '<StartupCode$FSharp-Data-Adaptive>.$Index' threw an exception.
 ---> System.PlatformNotSupportedException: Cannot start threads on this runtime.
   at System.Threading.Thread.Start()
   at FSharp.Data.Adaptive.Index.startThread(FSharpFunc`2 run)
   at <StartupCode$FSharp-Data-Adaptive>.$Index..cctor()

Looks like we cannot run this in WASM: https://github.com/fsprojects/FSharp.Data.Adaptive/blob/a4807a26e9eec83a7cf5aa150ff151e51c97c0b1/src/FSharp.Data.Adaptive/Datastructures/Index.fs#L174

Any suggestion for this?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
haraldsteinlechnercommented, Nov 16, 2021

also, i think acar et al. used an implementation based on Dietz and Sleator “Two Algorithms for Maintaining Order in a List” (1988) In 2002, Bender et al. took up on this again, in Two Simplified Algorithms for Maintaining order in a list", https://erikdemaine.org/papers/DietzSleator_ESA2002/paper.pdf There is also an implementation in a paper actually working on immutable arrays which i can’t find anymore (see below). Janestreet’s incremental also has order maintenance they tweaked several times according to their videos (e.g. link).

1reaction
krauthaufencommented, Nov 16, 2021

Btw @albertwoo i had a little time to spare today and switched to a task-based implementation for the Index-deletion, so everything should be fine now in package version 1.2.8

Sadly I had some trouble with the automated package push, so the github release might be missing

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blazor WASM projects will not run
Creating a new Blazor WASM project will not run using dotnet run or Visual Studio non-debug mode. It will run in Visual Studio...
Read more >
Can't run Blazor wasm hosted solution from VS 2022 with a ...
I've used Visual Studio 2022 to create a new Blazor wasm hosted app and I want to create a new custom environment that...
Read more >
Blazor WASM app won't load after publish. Works fine on ...
I have now moved my project over to a WASM Blazor app since I don't really need the benefits of a server-sided application....
Read more >
Debug ASP.NET Core Blazor WebAssembly
Learn how to debug Blazor WebAssembly with browser developer tools and an ... Open the standalone Blazor WebAssembly app in VS Code.
Read more >
Cannot run blazor wasm projects in debug mode
Launching an ASP.NET Core hosting blazor web assembly app in debug mode does hangs. It opens a browser window to about: blank and...
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