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
Error with dotnet client #44
Comments
Are they watching their issues? Or is .NET pusher being neglected? |
Hi, When you say "a pile" of nuget updates, what else were you upgrading? Cheers, |
mostly version upgrades. websocket4net and Newtonsoft I think. |
Any other packages that have a shared dependencies? I'm going to try try reproducing :) |
The only other non .net package is SuperSocket.ClientEngine. All packages are the latest versions |
I was able to remove SuperSocket.ClientEngine and reproduce the OP error, so disregard the SuperSocket |
Cool, I'll try reproducing it tonight/tomorrow |
If you can't reproduce, let me know and I'll try to put together a sample app |
What version of .NET are you working against? |
4.7 |
I've managed to reproduced it. It looks like Websocket4Net 15.0 has introduced a funny into it. I've done some googling and found we're not the only library affected by the issue. There seem to be a few libraries out there having this problem. I've tested with 15.0, 15.1 & 15.2, and the all suffer from it. As a short term fix whilst I fix it this side, can I recommend that you go back down to 14.1 of Websocket4Net? |
Glad to hear the problem has been isolated! If it won't take too long to patch, I'd rather wait for your fix. I frequently update my nuget packages and I don't want to keep track of downversioning |
Reproduced, but not isolated yet. As far as I can tell, this is happening inside of WebSocket4Net, so will probably be a bug raised on WebSocket4Net. |
Are you taking the lead on pursuing that or should I? |
Let me isolate it, then we'll take it from there :) |
I am running into the same issue, and going back to 0.14.1 was not a fix for me. I'll stay tunned to this. |
@martinsolovey You're getting the exact same problem with 0.14.1? You don't have any references to 0.15.x anywhere else in your code base? Could you make a simple solution that reproduces it please? As I can reproduce it without problem in 0.15.x, but not 0.14.x |
Actually if I create a brand new project and install first WebSocket4Net 0.14.1 it works! I will see how to fix that within my real sln, I probably have latest WebSocket4Net running on another class library project, do you know if it's possible to have them both working ? EDIT: An unhandled exception of type 'System.IO.FileLoadException' occurred in PusherClient.dll Additional information: Could not load file or assembly 'WebSocket4Net, Version=0.15.2.11, Culture=neutral, PublicKeyToken=eb4e154b696bf72a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) |
You won't be able to load the two versions of the same named DLL into the same project, last write will win. So that's telling you you have a reference to 0.15.2 somewhere. You'll need to remove that reference via the nuget manager, and if you still have a reference to 0.15.2, then it's been added as a reference to a project not via nuget. Delete that reference, and then re-add it with nuget. |
Found the wrong reference, killed it and now it's working ! Gonna use the WebSocket version 0.14.1 for now, keep us posted though, if it's possible to move to the latest will do! thanks for everything! much appreciated |
@imagi, how's the progress? Not trying to rush you, but do you have a rough ETA? |
@galgitron Ok, so I've dug through the code as much as I can, and I don't think the problem is with the Pusher Client, this appears to be a problem with the WebSocket4Net library. In the Pusher Client, we only use the following constructor:
The error you're getting, and the one I've been able to replicate looks like this:
Which is a CTOR we don't use. So I decompiled the WebSocket4Net DLL included with 0.15.2 and had a look, and found no matching CTOR. It doesn't look like the Pusher Client is the only one affected by this problem. discord-net/Discord.Net#954 I think you're going to need to raise this on the WebSocket4Net repo. I'm going to close this issue, as I think it's WebSocket4Net specific, yell if you object :) |
Appreciate the effort. I'll pursue it with WebSocket4Net then. |
Why the code can pass the build if they use a constructor which doesn't exist? |
Is there any solution to this? I am running into the same issue and it's been a year after this post. |
Using PusherClient 0.5.1 with WebSocket4Net 0.15.2.
After a pile of NuGet updates, my existing code now breaks when I try to Connect(). As below:
Error is:
System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'Void WebSocket4Net.WebSocket..ctor(System.String, System.String, System.Collections.Generic.List
1<System.Collections.Generic.KeyValuePair
2<System.String,System.String>>, System.Collections.Generic.List1<System.Collections.Generic.KeyValuePair
2<System.String,System.String>>, System.String, System.String, WebSocket4Net.WebSocketVersion, System.Net.EndPoint)'.Source=PusherClient
StackTrace:
at PusherClient.Connection.Connect()
at PusherClient.Pusher.Connect()
The text was updated successfully, but these errors were encountered: