OYIon / LiveSharp

Public repository for the LiveSharp project
96 stars 4 forks source link

Process terminated. Assertion Failed (_jsRuntime != null) #96

Closed Flaflo closed 3 years ago

Flaflo commented 3 years ago

Hi!

I am getting the following error when I am saving my CSS files:

Process terminated. Assertion Failed
_jsRuntime != null
   at LiveSharp.Support.Blazor.BlazorUpdateHandler.HandleResourceUpdate(String path, String content)
   at LiveSharp.Runtime.LiveSharpRuntimeProxy.ResourceUpdated(String path, String content)
   at LiveSharp.Runtime.LiveSharpRuntime.LiveSharpMessageReceived(String messageContent, Byte contentType, Int32 groupId)
   at LiveSharp.Runtime.LiveSharpRuntime.LiveSharpMessageReceived(ServerMessage message)
   at LiveSharp.Runtime.LiveSharpRuntime.MessageReceived(ServerMessage message)
   at LiveSharp.ServerClient.LiveServerClient.MessageParsed(Object sender, ParserEventArgs`1 e)
   at LiveSharp.ServerClient.ParserBase`1.RaiseMessageReceived(TMessage message, Object payload)
   at LiveSharp.ServerClient.MessageParser.Feed(Byte b)
   at LiveSharp.ServerClient.ParserBase`1.Feed(Byte[] buffer, Int32 bytesRead)
   at LiveSharp.ServerClient.LiveServerClient.OnBufferReceived(Object connectionObject, Byte[] buffer, Int32 length)
   at LiveSharp.Support.Blazor.BlazorTransport.<>c__DisplayClass6_0.<StartReceiving>b__0(Byte[] buffer)
   at Microsoft.AspNetCore.SignalR.Client.HubConnectionExtensions.<>c__DisplayClass2_0`1.<On>b__0(Object[] args)
   at Microsoft.AspNetCore.SignalR.Client.HubConnectionExtensions.<>c.<On>b__0_0(Object[] parameters, Object state)
   at Microsoft.AspNetCore.SignalR.Client.HubConnection.DispatchInvocationAsync(InvocationMessage invocation)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.AspNetCore.SignalR.Client.HubConnection.DispatchInvocationAsync(InvocationMessage invocation)
   at Microsoft.AspNetCore.SignalR.Client.HubConnection.<ReceiveLoop>g__StartProcessingInvocationMessages|81_0(ChannelReader`1 invocationMessageChannelReader)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
   at System.Threading.Channels.AsyncOperation`1.SetCompletionAndInvokeContinuation()
   at System.Threading.Channels.AsyncOperation`1.System.Threading.IThreadPoolWorkItem.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

I am on the newest Version of LiveSharp and target framework is .NET 5 RC2 on BlazorWASM

ionoy commented 3 years ago

Did you modify your LiveSharp.dashboard.cs file? Can you share the sample project that I could use to reproduce this issue? I have tested the newest LiveSharp release on RC2 and the CSS update worked for me.

Flaflo commented 3 years ago

Sure

Flaflo commented 3 years ago

This error has been fixed by updating livesharp, sorry for wasting your time on here