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

Blazor SignalR Client #9825

Closed
hannespreishuber opened this issue Apr 29, 2019 · 7 comments

Comments

@hannespreishuber
Copy link

commented Apr 29, 2019

Same Code working on Blazor Server side for a simple Chat, doenst work on Blazor Client side.
Just calling the "app" getting several errors in F12 command like

WASM: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: libc assembly: type: member:(null)

as I can not debug (also shift alt D in chrome) my guess is happens here
protected override async Task OnInitAsync()
{
connection = new HubConnectionBuilder()
.WithUrl("https://signalrdemo2220190428112854.azurewebsites.net/ChatDemoHub")
.Build();
await connection.StartAsync();

<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.0.0-preview4-19216-03" /> <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.0.0-preview4-19216-03" PrivateAssets="all" /> <PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.0.0-preview4-19216-03" PrivateAssets="all" /> <PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="3.0.0-preview4-19216-03" />

@danroth27 danroth27 changed the title Balzor SignalR Client Blazor SignalR Client Apr 29, 2019

@limefrogyank

This comment has been minimized.

Copy link

commented Apr 29, 2019

I didn't expect the .NET client of SignalR to work on Server-side Blazor that well...

However, on client-side Blazor, you're operating completely in the browser so you need to use the javascript client of SignalR and interop with it in your .NET code. At least, that's what I'd expect.

@hannespreishuber

This comment has been minimized.

Copy link
Author

commented Apr 30, 2019

I didn't expect the .NET client of SignalR to work on Server-side Blazor

sorry to say that clear, what you expect doenst matter for me and solution seekers. btw your are wrong.

@danroth27

This comment has been minimized.

Copy link
Member

commented Apr 30, 2019

Hi @hannespreishuber,

The SignalR client isn't supported yet on client-side Blazor due at least in part to it's dependency on WebSocket support in the runtime, which we haven't enabled yet. There have been some community efforts to get it to work that you can take a look at:

Since we're tracking enabling WebSockets in the runtime separately, I'm going to go ahead and close this issue.

@danroth27 danroth27 closed this Apr 30, 2019

@hannespreishuber

This comment has been minimized.

Copy link
Author

commented Apr 30, 2019

@danroth27

This comment has been minimized.

@mattferderer

This comment has been minimized.

Copy link
Contributor

commented May 23, 2019

Since we're tracking enabling WebSockets in the runtime separately, I'm going to go ahead and close this issue.

@danroth27 if it's not to much to ask, any chance you could link to that issue?

@danroth27

This comment has been minimized.

Copy link
Member

commented May 23, 2019

@mattferderer No trouble at all 😄

WebSockets support has already been implemented for mono.wasm: mono/mono#9567.

To enable this support in Blazor we need to move to the mono bindings. We've been tracking that internally, but I just filed #10489 to track it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.