OYIon / LiveSharp

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

.NET 5: Support for render-mode="WebAssemblyPrerendered" #92

Open ChristianWeyer opened 4 years ago

ChristianWeyer commented 4 years ago

Currently, we get an exception when trying tom use WebAssembly pre-prendering with Live Sharp:

image

Would be great to have this solved with .NET support.

Thanks!

ionoy commented 4 years ago

Hi Christian!

Could you post a sample project that I can use to reproduce this issue?

ChristianWeyer commented 4 years ago

Sure, this one should do it: https://github.com/thinktecture/blazor-webassembly-demo/tree/net5-rc1-refactored-prerender

ionoy commented 4 years ago

Should I install something along with it?

I'm getting these errors: image

ChristianWeyer commented 4 years ago

Oh please go to the csproj and remove the task will the kill-port command - sorry.

ionoy commented 4 years ago

It throws the following exception for me, even without LiveSharp installed

System.ArgumentNullException: 'Value cannot be null. (Parameter 'input')'

This exception was originally thrown at this call stack:
    System.Text.RegularExpressions.ThrowHelper.ThrowArgumentNullException(System.Text.RegularExpressions.ExceptionArgument)
    System.Text.RegularExpressions.Regex.IsMatch(string)
    Microsoft.AspNetCore.Builder.DebugProxyLauncher.CompleteTaskWhenServerIsReady.__OnOutputDataReceived|0(object, System.Diagnostics.DataReceivedEventArgs)
    System.Diagnostics.Process.OutputReadNotifyUser(string)
    System.Diagnostics.AsyncStreamReader.FlushMessageQueue(bool)
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    System.Diagnostics.AsyncStreamReader.FlushMessageQueue.AnonymousMethod__18_0(object)
    System.Threading.QueueUserWorkItemCallback..cctor.AnonymousMethod__6_0(System.Threading.QueueUserWorkItemCallback)
    System.Threading.ExecutionContext.RunForThreadPoolUnsafe<TState>(System.Threading.ExecutionContext, System.Action<TState>, TState)
    System.Threading.QueueUserWorkItemCallback.Execute()
    ...
    [Call Stack Truncated]

But it seems like the initial error disappeared with the latest LiveSharp build. You can try it out yourself.

LiveSharp.1.6.11.zip

ChristianWeyer commented 4 years ago

Sorry for the issues with the sample - strangely, it works here, but anyway ;-)

The issue now is similar...

image

ionoy commented 4 years ago

Are you using VS 16.8.0 Preview 3.2?

ChristianWeyer commented 4 years ago

Yes.

vertonghenb commented 3 years ago

It is actually supported, I made a reproduction here : https://github.com/vertonghenb/Livesharp.Issue92/commits/master

However it sometimes opens multiple Dashboard, but that could be unrelated.