Skip to content
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

webtorrent client in browser does not connect to local bittorrent-tracker (Opcode -1) #76

Closed
diffalot opened this issue May 20, 2015 · 1 comment

Comments

@diffalot
Copy link

I'm trying to create a torrent from Chrome 42 and use a websocket tracker on wss://localhost:8000 as the announce target. The options I'm passing into webtorrent.client.seed look like this:

{
  "name": "mt-data.zip",
  "announceList": [
    [
      "wss://localhost:8000"
    ]
  ]
}

but the my console shows

WebSocket connection to 'wss://localhost:8000/' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED
Uncaught Error: connection error to wss://localhost:8000

On localhost:8000 I've tried running bittorrent-tracker --ws and my own index.js server startup based on bin/cmd.js but I always get the same error. (I've also tired 127.0.0.1 instad of localhost?)

Looking into the websocket connection from the network inspector I see that the connection attempt doesn't reach the "101 upgrade state" that it does if the announce url is tracker.webtorrent.io, instead the only data shown in the frames inpector is (Opcode -1)

Have you seen these symptoms of misconfiguration before?

i have no idea what i'm doing

feross added a commit that referenced this issue May 22, 2015
@feross
Copy link
Member

feross commented May 22, 2015

Ah, I see your issue. Try using: ws://localhost:8000 instead of wss://localhost:8000.

The --ws option is only starting up a websocket server over http, not https. So, you want to use ws://, not wss://.

@feross feross closed this as completed May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants