Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Akka.Actor: does not run inside Blazor WASM #5082

Open
Aaronontheweb opened this issue Jun 9, 2021 · 1 comment
Open

Akka.Actor: does not run inside Blazor WASM #5082

Aaronontheweb opened this issue Jun 9, 2021 · 1 comment

Comments

@Aaronontheweb
Copy link
Member

Version Information
Version of Akka.NET? v1.4.20
Which Akka.NET Modules? Akka

Describe the bug
At the moment it is not possible to start an ActorSystem inside a WASM Blazor application due to a number of platform compatibility / unsupported methods Akka.NET calls during startup.

To Reproduce

  1. Create Blazor WASM application;
  2. Call ActorSystem.Create

See petabridge/DrawTogether.NET#10 for a code sample

Expected behavior
Akka.NET should be able to start up correctly.

Actual behavior

blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.PlatformNotSupportedException: Operation is not supported on this platform.
   at System.ConsolePal.get_BackgroundColor()
   at System.Console.get_BackgroundColor()
   at System.Reflection.RuntimePropertyInfo.StaticGetterAdapterFrame[ConsoleColor](StaticGetter`1 getter, Object obj)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   --- End of inner exception stack trace ---
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at System.Reflection.PropertyInfo.GetValue(Object obj)
   at Akka.Actor.Internal.ActorSystemImpl.Start()
   at Akka.Actor.ActorSystem.CreateAndStartSystem(String name, Config withFallback, ActorSystemSetup setup)
   at Akka.Actor.ActorSystem.Create(String name, Config config)
   at DrawTogether.UI.Client.Program.<>c.<Main>b__0_0(IServiceProvider sp) in D:\Repositories\DrawTogether.NET\src\DrawTogether.UI\Client\Program.cs:line 26

Screenshots
You can see me try to run it here https://www.twitch.tv/videos/1050466404

Environment
Windows, .NET 5, Chromium Browser

@Aaronontheweb
Copy link
Member Author

#5085 (comment) - looks like this will be pretty complicated to implement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant