async-websocket icon indicating copy to clipboard operation
async-websocket copied to clipboard

Unable to establish connection on Windows 10.

Open vinnydiehl opened this issue 3 years ago • 1 comments

On Windows 10 RubyInstaller 3.0.5, no code within my Async::WebSocket::Client.connect block is being run, the program just hangs.

On RubyInstaller 3.1.2, the situation is even worse- it crashes with the following error:

  0.0s     warn: Async::Task [oid=0x280] [ec=0x294] [pid=32436] [2022-12-13 00:36:46 -0500]
               | Task may have ended with unhandled exception.
               |   Errno::EBADF: Bad file descriptor
               |   → <internal:io> 63
               |     C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/io-event-1.1.4/lib/io/event/selector/select.rb 206

The exact same code run on WSL communicates with the websocket as expected.

Code and more information on my specific implementation here.

vinnydiehl avatar Dec 13 '22 07:12 vinnydiehl

Windows support is a work in progress, but we are making progress.

  • https://github.com/socketry/io-event/pull/38
  • https://github.com/socketry/async/pull/184
  • https://github.com/ruby/ruby/pull/6874
  • https://github.com/ruby/ruby/pull/6897

If you are able to help with any of the above, before Dec 25, we will be able to support it in Ruby 3.2 - specifically we need to support as much non-blocking IO on Windows as possible.

Otherwise, I'd recommend just using WSL.

ioquatix avatar Dec 13 '22 20:12 ioquatix