Giter Club home page Giter Club logo

Comments (6)

daniel-abramov avatar daniel-abramov commented on September 15, 2024

Hm, we don't remove useful information from the original error as far as I can remember (so you can print an error if you map it in map_err for instance or handle it by any other means) and I don't remember having Other error with an empty error description. We also do not create any ErrorKind::Other errors explicitly. Could you check if you can establish a regular TCP / TLS connection to the server?

from tokio-tungstenite.

horacimacias avatar horacimacias commented on September 15, 2024

thanks for your reply.

Looks like I overlooked this and something else must be generating an error and dropping the original cause; I'll dig a bit further.

Sorry for the confusion.

from tokio-tungstenite.

shutton avatar shutton commented on September 15, 2024

I'm running into the exact same thing:

          match connect_async(url.clone()).await {
              Ok((mut ws_stream, _response)) => {
                  debug!("Connected to {}", url);
                  ...
              }
              Err(e) => {
                  debug!("Last OS Error: {}", Error::last_os_error());
                  debug!("Failed to connect to {:?}: {:?}", url, e);
                  Err(format!("connection failed: {:?}", e))
              }
          }

Trying to figure out what it was, I reported the last OS error (though I don't think it's the issue -- that just looks like a typical nonblocking connect result).

Last OS Error: Resource temporarily unavailable (os error 35)
Failed to connect to "<<redacted>>": Io(Custom { kind: Other, error: "" })

Even with full debugging enabled, I'm not seeing anything useful from tungstenite or hyper, which is a little surprising. Connecting to the websocket endpoint using openssl works as expected.

from tokio-tungstenite.

shutton avatar shutton commented on September 15, 2024

Discovered a bit more. This is happening when the endpoint returns a 404.

from tokio-tungstenite.

daniel-abramov avatar daniel-abramov commented on September 15, 2024

Hm, I believe that one of the underlying libraries does something fishy. The reason I think it's the case is because we don't create any customer errors with an empty error code inside tungstenite-rs. Is there a server which could be used to test / reproduce this behavior?

from tokio-tungstenite.

horacimacias avatar horacimacias commented on September 15, 2024

In my case it was something else, sorry for the confusion.
I fixed several things so I can't really tell you exactly what it was, but for sure it did not look like tokio-tungstenite was causing the issue.
thanks for the help!

from tokio-tungstenite.

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.