kerryjiang / WebSocket4Net

A popular .NET WebSocket Client
Apache License 2.0
764 stars 273 forks source link

PusherClient has CTOR not found error with latest version of WebSocket4Net #128

Open galgitron opened 6 years ago

galgitron commented 6 years ago

We originally thought this was a PusherClient error so we raised an issue there. Please read this ticket for all the details:

https://github.com/pusher/pusher-http-dotnet/issues/44

They believe it has to do with the WebSocket4Net client. Can someone please take a look?

galgitron commented 6 years ago

Is anybody watching for these bug submissions?

kerryjiang commented 6 years ago

Can PushClient use another constructor?

Why the code can pass the build if they use a constructor which doesn't exist?

galgitron commented 6 years ago

I have no idea. Can you post these questions on their ticket? It would be a good idea for pusher and Websocket4net to talk to each other about this. pusher/pusher-http-dotnet#44

imaji commented 6 years ago

Hi there,

So we use the basic CTOR that only takes the url in. When I looked into why @galgitron was getting the exception, I found it was coming from within the websocket4net code base, not ours. Digging around on github I found a few other places having the same problem.

My best guess at the moment is that the nuget package referencing the appropriate .net version has got confused. But couldn’t dig any further as it was in your domain. I also noticed you removed silverlight support, is it possible that removed a CTOR that .net 4 DLLs relied on?

Best regards, John

kerryjiang commented 6 years ago

@imaji could you point me the piece of code which use WebSocket4Net within Pusher? I failed to find the location, even I cannot find the reference in the project file.

imaji commented 6 years ago

Sure, it’s actually in the .net client repo, not the one the bug was raised in.

https://github.com/pusher-community/pusher-websocket-dotnet/blob/master/PusherClient/Connection.cs

It’s in the Connect method.

kerryjiang commented 6 years ago

But from the code in the master branch, you are still using WebSocket4Net 0.14.1 instead of WebSocket4Net 0.15.*? https://github.com/pusher-community/pusher-websocket-dotnet/blob/master/PusherClient/PusherClient.csproj

imaji commented 6 years ago

Yup, but that doesn’t answer why going up to 15.x would throw an error for a CTOR which isn’t directly used.

galgitron commented 6 years ago

@kerryjiang , have you had a chance to review @imaji 's comment? I apologize for prodding this along but this bug has my project on hold. If this looks to be a larger bug that could take some time, please let me know so I can instead consider workarounds or alternate tech.

kerryjiang commented 6 years ago

Sorry, let me check this weekend.

kerryjiang commented 6 years ago

Can you just upgrade the WebSocket4Net version in PusherClient directly? Make sure you use the exact same version which PusherClient references.

I tested the WebSocket4Net 0.15.2 for NET 4.5, the default constructor works.

imaji commented 6 years ago

@kerryjiang the library is a .net 4 one.

imaji commented 6 years ago

@galgitron We've got a new version of the client out soon, which has an upgraded version of socket in it.

galgitron commented 6 years ago

Excellent! :) So can I assume this means I just pull the latest version of both WebSocket4Net and PusherClient when you're ready?

imaji commented 6 years ago

Yup, it'll be in preview first.

galgitron commented 6 years ago

Awesome, can't wait!

romanrakus commented 5 years ago

Hello all,

Any updates on this?

Svisstack commented 5 years ago

Let me know if this will get out of the preview. At the moment we are working on the preview version and it seems to be working.