Giter Club home page Giter Club logo

Comments (7)

nathanchere avatar nathanchere commented on August 16, 2024

Not sure if it's related but whenever I take any kind of action I keep getting WebSocket4Net related errors. For example even just on a basic connection with the RTM client:

var client = new SlackSocketClient(TOKEN);
var wait = new EventWaitHandle(false, EventResetMode.ManualReset);
client.Connect(x => wait.Set());
result = wait.WaitOne(10000);

I get things like this:

An exception of type 'System.MissingMethodException' occurred in SlackAPI.dll but was not handled in user code

Additional information: 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.List`1<System.Collections.Generic.KeyValuePair`2<System.String,System.String>>, System.String, System.String, WebSocket4Net.WebSocketVersion)'.

from slackapi.

Inumedia avatar Inumedia commented on August 16, 2024

That's odd. Try setting the reference to copy to local, let me know if that fixes anything.

from slackapi.

Inumedia avatar Inumedia commented on August 16, 2024

@nathanchere Can you try out the latest code in the branch mentioned above ( 26f2fc3 ) and let me know if it resolves your MissingMethodException issues. 😄

from slackapi.

nathanchere avatar nathanchere commented on August 16, 2024

OK will do later today

from slackapi.

nathanchere avatar nathanchere commented on August 16, 2024

The MissingMethodException has disappeared!

from slackapi.

nathanchere avatar nathanchere commented on August 16, 2024

although when it comes to actually sending a message now it's giving null exception.

Example:

 client.Connect((o) => {
    Debug.WriteLine("RTM Start");
    wait.Set();
});

result = wait.WaitOne(10000);

var user = client.Users.Single(x => x.name == "testbot");
var dm = client.DirectMessages.Single(x => x.user == user.id);
client.SendMessage(received => { Debug.WriteLine("Received: {0}", received.text); },
   dm.id,
   "testing");

dm, dm.id and client all have values. I'll dig around SlackSocketClient to try and see what's going on

from slackapi.

nathanchere avatar nathanchere commented on August 16, 2024

OK so underlyingSocket is null when SendMessage is called. Maybe I'm just using it wrong but in my instance it was easily enough fixed in SlackSocketClient Connect by moving the onConnected(s) call after the ConnectSocket(onSocketConnected call.

from slackapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.