DVLP / signalr-no-jquery

120 stars 78 forks source link

SignalR is not the real v2.2.1 #15

Closed sateffen closed 5 years ago

sateffen commented 7 years ago

Hey,

I ran in a pretty interesting issue. Using code like hubConnection('http://blah.url', {useDefaultPath: false}) won't work with longpolling. The reason is a bug in the used signalR version here

The line should actually be url = baseUrl + connection.appRelativeUrl like in the original sourcecode.

I first thought they fixed the bug not too long ago, but that line is that way since 2012, so it's pretty old. I checked the npm version of signalR, which is v2.2.1 as well, and there the code is correct. So your version of signalR seems to be quite old, or buggy.

I think solving this problem should solve #14 as well, because IE11 might be the only browser falling back to longpolling.

sateffen commented 7 years ago

A little late, but now I reviewed the Merge-Requests and saw, that #2 fixes exactly this issue.

In my opinion you should check, why there is a difference in signalR version as well, because there might be some more bugs as well.

gtwilliams03 commented 7 years ago

I think there are. I am baffled. I am only getting LongPolling to connect regardless of browser or operating system. And I cannot execute server methods with out a myHub.hello failed to execute. Error: Error: Send failed message with a yellow screen of death on the back end with the message Value cannot be null. Parameter name: s

gtwilliams03 commented 7 years ago

That said - I see this message on the home page This package is not meant to be used with ASP.NET Core version of SignalR and I have to confess that I'm not sure what that means...

sateffen commented 7 years ago

@gtwilliams03 That is a completly different problem, inherit by the way signalR is developed... Sadly.

There are two different SignalR Librarys out there, currently, the ASP.NET one, which exists for a long time, and the ASP.NET Core one. The ASP.NET Core version is the future, but still in development. You can read about that here in the chapter "When to use it".

For the old ASP.NET API you need the signalr package, which is wrapped in this project with a jQueryshim, so you don't actually need jQuery.

For the new ASP.NET Core API you need the signalr-client, which does not need jQuery at all, but does not support fallback to polling.

This package is just a wrapper for the ASP.NET API, but not the ASP.NET Core API.

But my basic point stays the same: The library wrapped here is not v2.2.1, it's a different version.

xaviergonz commented 7 years ago

+1 I spent 3 hours until I stumbled upon the same bug.

sateffen commented 7 years ago

@DVLP any idea?

robvree commented 7 years ago

Running into this bug as well. The fix mentioned by the OP is correct.

robvree commented 7 years ago

Can we get an update to know if you are going to take this change?

BtM909 commented 6 years ago

@DVLP, what would you need from us to update SignalR to the latest (2.2.2 as we speak). I'm more than willing to create a PR, but I'm guessing you might have some other PR's higher on the list or want to discuss how we can smooth the process for the future.

DVLP commented 6 years ago

Hi all, as I'm currently too busy with a contract job and running an early stage startup, to approve signalr-no-jquery improvemnets, I added @sateffen as a collaborator.

sateffen commented 6 years ago

@DVLP is there a way to contact you? I would like to talk to you about contributing, because as you might know I've got an own version of a signalR version without jquery (jqueryless-signalr). Maybe IRC or Gitter? Or twitter, works as well.

sateffen commented 6 years ago

Sadly there were no contact up till now, so I'll decline the contributor role. I can't just "take control" without at least having a talk with you about how to go on with the repo.