Skip to content

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

@diffalot

Description

@diffalot

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions