WebSocket4Net icon indicating copy to clipboard operation
WebSocket4Net copied to clipboard

PusherClient has CTOR not found error with latest version of WebSocket4Net

Open galgitron opened this issue 7 years ago • 18 comments

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 avatar Mar 22 '18 12:03 galgitron

Is anybody watching for these bug submissions?

galgitron avatar Mar 26 '18 14:03 galgitron

Can PushClient use another constructor?

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

kerryjiang avatar Mar 26 '18 16:03 kerryjiang

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

galgitron avatar Mar 26 '18 17:03 galgitron

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

imaji avatar Mar 26 '18 18:03 imaji

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

kerryjiang avatar Mar 26 '18 20:03 kerryjiang

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.

imaji avatar Mar 26 '18 20:03 imaji

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

kerryjiang avatar Mar 26 '18 22:03 kerryjiang

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

imaji avatar Mar 27 '18 06:03 imaji

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

galgitron avatar Mar 30 '18 12:03 galgitron

Sorry, let me check this weekend.

kerryjiang avatar Mar 30 '18 15:03 kerryjiang

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.

kerryjiang avatar Apr 05 '18 02:04 kerryjiang

@kerryjiang the library is a .net 4 one.

imaji avatar Apr 05 '18 07:04 imaji

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

imaji avatar Apr 05 '18 07:04 imaji

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

galgitron avatar Apr 05 '18 11:04 galgitron

Yup, it'll be in preview first.

imaji avatar Apr 05 '18 12:04 imaji

Awesome, can't wait!

galgitron avatar Apr 05 '18 12:04 galgitron

Hello all,

Any updates on this?

romanrakus avatar Oct 19 '18 14:10 romanrakus

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.

Svisstack avatar May 29 '19 15:05 Svisstack