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 · 10 comments
Closed

Blazor SignalR Client #9825

hannespreishuber opened this issue Apr 29, 2019 · 10 comments

Comments

@hannespreishuber
Copy link

@hannespreishuber hannespreishuber 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
Copy link

@limefrogyank limefrogyank 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.

Loading

@hannespreishuber
Copy link
Author

@hannespreishuber hannespreishuber 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.

Loading

@danroth27
Copy link
Member

@danroth27 danroth27 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.

Loading

@danroth27 danroth27 closed this Apr 30, 2019
@hannespreishuber
Copy link
Author

@hannespreishuber hannespreishuber commented Apr 30, 2019

Loading

@danroth27
Copy link
Member

@danroth27 danroth27 commented Apr 30, 2019

Loading

@mattferderer
Copy link
Contributor

@mattferderer mattferderer 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?

Loading

@danroth27
Copy link
Member

@danroth27 danroth27 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.

Loading

@miroslavp
Copy link

@miroslavp miroslavp commented Nov 30, 2019

How far are we from releasing this? As far I can see, all related issues are closed.

Loading

@danroth27
Copy link
Member

@danroth27 danroth27 commented Dec 2, 2019

We're getting close. There's still some work to do on the .NET runtime side to make sure all the .NET Standard APIs used by the .NET SignalR client are supported and functioning appropriately. This should happen as part of the upcoming Blazor WebAssembly release.

Loading

@BrennanConroy
Copy link
Member

@BrennanConroy BrennanConroy commented Dec 2, 2019

If you use the latest nightlies and only use LongPolling then the .NET client should be working.

Loading

@msftbot msftbot bot locked as resolved and limited conversation to collaborators Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants