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

Problem seeding file with webtorrent #1063

Closed
GuigsEvt opened this issue Feb 28, 2017 · 7 comments
Closed

Problem seeding file with webtorrent #1063

GuigsEvt opened this issue Feb 28, 2017 · 7 comments

Comments

@GuigsEvt
Copy link

@GuigsEvt GuigsEvt commented Feb 28, 2017

What version of WebTorrent?
"webtorrent": "^0.98.8"

What operating system and Node.js version?
Mac OS / Node v6.9.5

What browser and version? (if using WebTorrent in the browser)

What did you expect to happen?
I am currently trying to seed a torrent but I am enabled to download it.

What actually happened?

Here is a breakdown of my torrent file that I created.

Guillaume$webtorrent info ./torrentHandler/torrents/45a854383327f2900a09adec29ea62e3ef6f27aa.torrent
{
"infoHash": "45a854383327f2900a09adec29ea62e3ef6f27aa",
"name": "8af94181fcf1386d4237bca69f10a540d68aaae629af123175f97f9cf50c71ce.ccm",
"created": "+049131-09-15T07:30:13.000Z",
"announce": [
"udp://open.demonii.com:1337",
"udp://tracker.openbittorrent.com:80",
"udp://tracker.publicbt.com:80",
"udp://tracker.webtorrent.io:80",
"wss://tracker.webtorrent.io"
],
"urlList": [],
"files": [
{
"path": "8af94181fcf1386d4237bca69f10a540d68aaae629af123175f97f9cf50c71ce.ccm",
"name": "8af94181fcf1386d4237bca69f10a540d68aaae629af123175f97f9cf50c71ce.ccm",
"length": 561,
"offset": 0
}
],
"length": 561,
"pieceLength": 16384,
"lastPieceLength": 561,
"pieces": [
"c3f99985970c2b87a4854293e0ade0016f29ea88"
]

And here the torrent.infohash breakdown when I am sharing the torrent file:

Torrent {
domain: null,
_events: { error: { [Function: g] listener: [Function] } },
_eventsCount: 1,
_maxListeners: 0,
client:
WebTorrent {
domain: null,
_events: { error: [Function] },
_eventsCount: 1,
_maxListeners: 0,
destroyed: false,
torrentPort: 59468,
tracker: true,
_rtcConfig: undefined,
_wrtc: undefined,
torrents: [ [Circular] ],
_downloadSpeed: [Function],
_uploadSpeed: [Function],
maxConns: undefined,
peerId: '2d5757303037382d313231323336366133363364',
peerIdBuffer: <Buffer 2d 57 57 30 30 37 38 2d 31 32 31 32 33 36 36 61 33 36 33 64>,
nodeId: 'c1ca7895652257bc8ef9cd7ce1f3be64b3f9eccb',
nodeIdBuffer: <Buffer c1 ca 78 95 65 22 57 bc 8e f9 cd 7c e1 f3 be 64 b3 f9 ec cb>,
dht:
DHT {
_tables: [Object],
_values: [Object],
_peers: [Object],
_secrets: [Object],
_rpc: [Object],
_verify: null,
_host: null,
_interval: [Object],
listening: true,
destroyed: false,
nodeId: <Buffer c1 ca 78 95 65 22 57 bc 8e f9 cd 7c e1 f3 be 64 b3 f9 ec cb>,
nodes: [Object],
domain: null,
_events: [Object],
_eventsCount: 2,
_maxListeners: undefined },
blocked: { add: [Function], contains: [Function] },
ready: true },
_debugId: '33363364',
announce:
[ 'udp://open.demonii.com:1337',
'udp://tracker.openbittorrent.com:80',
'udp://tracker.publicbt.com:80',
'udp://tracker.webtorrent.io:80',
'wss://tracker.webtorrent.io' ],
urlList: [],
path: './data/spv',
_store: [Function: Storage],
strategy: 'sequential',
_rechokeNumSlots: 10,
_rechokeOptimisticWire: null,
_rechokeOptimisticTime: 0,
_rechokeIntervalId:
Timeout {
_called: false,
_idleTimeout: 10000,
_idlePrev: null,
_idleNext: null,
_idleStart: 517,
_onTimeout: [Function: bound ],
_timerArgs: undefined,
_repeat: 10000,
_handle:
Timer {
'0': [Function: unrefdHandle],
_list: [Object],
owner: [Circular],
domain: undefined } },
ready: true,
destroyed: false,
metadata: <Buffer 64 38 3a 61 6e 6e 6f 75 6e 63 65 32 37 3a 75 64 70 3a 2f 2f 6f 70 65 6e 2e 64 65 6d 6f 6e 69 69 2e 63 6f 6d 3a 31 33 33 37 31 33 3a 61 6e 6e 6f 75 6e ... >,
store:
ImmediateStore {
store:
Storage {
chunkLength: 16384,
files: [Object],
length: 561,
chunkMap: [Object],
closed: false,
lastChunkLength: 561,
lastChunkIndex: 0 },
chunkLength: 16384,
mem: [ null ] },
numBlockedPeers: 0,
files:
[ File {
domain: null,
_events: {},
_eventsCount: 0,
_maxListeners: undefined,
_torrent: [Circular],
name: '8af94181fcf1386d4237bca69f10a540d68aaae629af123175f97f9cf50c71ce.ccm',
path: '8af94181fcf1386d4237bca69f10a540d68aaae629af123175f97f9cf50c71ce.ccm',
length: 561,
offset: 0,
done: true,
_startPiece: 0,
_endPiece: 0 } ],
done: true,
_amInterested: false,
pieces: [ null ],
_selections: [],
_critical: [],
_servers: [],
info:
{ comment: <Buffer 43 6f 6c 6f 72 65 64 20 43 6f 69 6e 73 20 4d 65 74 61 64 61 74 61>,
'created by': <Buffer 43 6f 6c 6f 72 65 64 43 6f 69 6e 73 2d 31 2e 30 2e 30>,
length: 561,
name: <Buffer 38 61 66 39 34 31 38 31 66 63 66 31 33 38 36 64 34 32 33 37 62 63 61 36 39 66 31 30 61 35 34 30 64 36 38 61 61 61 65 36 32 39 61 66 31 32 33 31 37 35 ... >,
'piece length': 16384,
pieces: <Buffer c3 f9 99 85 97 0c 2b 87 a4 85 42 93 e0 ad e0 01 6f 29 ea 88> },
infoBuffer: <Buffer 64 37 3a 63 6f 6d 6d 65 6e 74 32 32 3a 43 6f 6c 6f 72 65 64 20 43 6f 69 6e 73 20 4d 65 74 61 64 61 74 61 31 30 3a 63 72 65 61 74 65 64 20 62 79 31 38 ... >,
infoHash: '45a854383327f2900a09adec29ea62e3ef6f27aa',
infoHashBuffer: <Buffer 45 a8 54 38 33 27 f2 90 0a 09 ad ec 29 ea 62 e3 ef 6f 27 aa>,
name: '8af94181fcf1386d4237bca69f10a540d68aaae629af123175f97f9cf50c71ce.ccm',
created: +049131-09-16T04:32:53.000Z,
length: 561,
pieceLength: 16384,
lastPieceLength: 561,
magnetURI: 'magnet:?xt=urn:btih:45a854383327f2900a09adec29ea62e3ef6f27aa&dn=8af94181fcf1386d4237bca69f10a540d68aaae629af123175f97f9cf50c71ce.ccm&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.webtorrent.io%3A80&tr=wss%3A%2F%2Ftracker.webtorrent.io',
torrentFile: <Buffer 64 38 3a 61 6e 6e 6f 75 6e 63 65 32 37 3a 75 64 70 3a 2f 2f 6f 70 65 6e 2e 64 65 6d 6f 6e 69 69 2e 63 6f 6d 3a 31 33 33 37 31 33 3a 61 6e 6e 6f 75 6e ... >,
swarm:
Swarm {
domain: null,
_events:
{ error: [Function: bound ],
wire: [Object],
download: [Function],
upload: [Function] },
_eventsCount: 4,
_maxListeners: undefined,
infoHash: '45a854383327f2900a09adec29ea62e3ef6f27aa',
infoHashBuffer: <Buffer 45 a8 54 38 33 27 f2 90 0a 09 ad ec 29 ea 62 e3 ef 6f 27 aa>,
peerId: '2d5757303037382d313231323336366133363364',
peerIdBuffer: <Buffer 2d 57 57 30 30 37 38 2d 31 32 31 32 33 36 36 61 33 36 33 64>,
handshakeOpts: { dht: true },
maxConns: 55,
destroyed: false,
listening: true,
paused: false,
server:
Server {
domain: null,
_events: [Object],
_eventsCount: 3,
_maxListeners: undefined,
_connections: 0,
_handle: [Object],
_usingSlaves: false,
_slaves: [],
_unref: false,
allowHalfOpen: false,
pauseOnConnect: false,
_connectionKey: '6::::0' },
wires: [],
_queue: [],
_peers:
{ '85.233.202.4:59157': [Object],
'85.233.202.4:58975': [Object],
'85.233.202.4:58987': [Object] },
_peersLength: 3,
_port: 59468,
downloaded: 0,
uploaded: 0,
downloadSpeed: [Function],
uploadSpeed: [Function],
_hostname: undefined },
discovery:
Discovery {
domain: null,
_events:
{ error: [Function: bound ],
peer: [Function: bound ],
trackerAnnounce: [Function: listener],
dhtAnnounce: [Function: listener],
warning: [Function: listener] },
_eventsCount: 5,
_maxListeners: undefined,
announce:
[ 'udp://open.demonii.com:1337',
'udp://tracker.openbittorrent.com:80',
'udp://tracker.publicbt.com:80',
'udp://tracker.webtorrent.io:80',
'wss://tracker.webtorrent.io' ],
rtcConfig: undefined,
peerId: '2d5757303037382d313231323336366133363364',
port: 59468,
wrtc: undefined,
intervalMs: 900000,
destroyed: false,
infoHash: '45a854383327f2900a09adec29ea62e3ef6f27aa',
infoHashBuffer: <Buffer 45 a8 54 38 33 27 f2 90 0a 09 ad ec 29 ea 62 e3 ef 6f 27 aa>,
torrent: [Circular],
_dhtAnnouncing: false,
_dhtTimeout: false,
_internalDHT: false,
tracker:
Client {
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
peerId: '2d5757303037382d313231323336366133363364',
peerIdBuffer: <Buffer 2d 57 57 30 30 37 38 2d 31 32 31 32 33 36 36 61 33 36 33 64>,
_peerIdBinary: '-WW0078-1212366a363d',
infoHash: '45a854383327f2900a09adec29ea62e3ef6f27aa',
infoHashBuffer: <Buffer 45 a8 54 38 33 27 f2 90 0a 09 ad ec 29 ea 62 e3 ef 6f 27 aa>,
_infoHashBinary: 'E¨T83'ò�\n\t­ì)êbãïo'ª',
torrentLength: 561,
destroyed: false,
_port: 59468,
_rtcConfig: undefined,
_wrtc: undefined,
_getAnnounceOpts: undefined,
_trackers: [Object] },
dht:
DHT {
_tables: [Object],
_values: [Object],
_peers: [Object],
_secrets: [Object],
_rpc: [Object],
_verify: null,
_host: null,
_interval: [Object],
listening: true,
destroyed: false,
nodeId: <Buffer c1 ca 78 95 65 22 57 bc 8e f9 cd 7c e1 f3 be 64 b3 f9 ec cb>,
nodes: [Object],
domain: null,
_events: [Object],
_eventsCount: 2,
_maxListeners: undefined } },
rarityMap:
RarityMap {
pieces: [ 0 ],
swarm:
Swarm {
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
infoHash: '45a854383327f2900a09adec29ea62e3ef6f27aa',
infoHashBuffer: <Buffer 45 a8 54 38 33 27 f2 90 0a 09 ad ec 29 ea 62 e3 ef 6f 27 aa>,
peerId: '2d5757303037382d313231323336366133363364',
peerIdBuffer: <Buffer 2d 57 57 30 30 37 38 2d 31 32 31 32 33 36 36 61 33 36 33 64>,
handshakeOpts: [Object],
maxConns: 55,
destroyed: false,
listening: true,
paused: false,
server: [Object],
wires: [],
_queue: [],
_peers: [Object],
_peersLength: 3,
_port: 59468,
downloaded: 0,
uploaded: 0,
downloadSpeed: [Function],
uploadSpeed: [Function],
_hostname: undefined },
numPieces: 1 },
_hashes: [ 'c3f99985970c2b87a4854293e0ade0016f29ea88' ],
_reservations: [ null ],
bitfield: BitField { grow: 0, buffer: <Buffer 80> } }

Is anyone have an idea about this ? Everything looks fine but when I am trying to download it from either the webtorrent module or a torrent software nothing happens...

Thanks.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Feb 28, 2017

Based on the list of trackers included in your torrent, it looks like you're using an extremely old version of webtorrent. Maybe you have a really old version installed globally?

@feross feross closed this Feb 28, 2017
@GuigsEvt

This comment has been minimized.

Copy link
Author

@GuigsEvt GuigsEvt commented Mar 1, 2017

Well I have checked my package and I have the latest version of webtorrent: webtorrent@0.98.8

You thing that the trackers list is why the torrent is can't be downloaded ? Maybe I could add it manually. What trackers should it be ?

Thanks.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Mar 1, 2017

What do you get when you run npm ls webtorrent -g and then npm ls webtorrent in your project folder?

@GuigsEvt

This comment has been minimized.

Copy link
Author

@GuigsEvt GuigsEvt commented Mar 2, 2017

For npm ls webtorrent -g I have:
/usr/local/lib
├── webtorrent@0.98.8
├─┬ webtorrent-cli@1.9.0
│ └── webtorrent@0.98.8
└─┬ webtorrent-hybrid@1.0.5
└── webtorrent@0.98.8

And for nom ls webtorrent I have:
├─┬ cc-metadata-handler@0.5.3
│ └── webtorrent@0.78.0
└── webtorrent@0.98.8

I have been running some test yesterday and it seems to be the sharing part that is not working.
Indeed when I am creating a torrent via my program and webtorrent if I seed it via a torrent software like qBitTorrent the download works. But when I share the file via webtorrent (my program) it doesn't work.
Any ideas ?

Here is the code generating the torrent.infohash output:

var opts = {
      name: dataFileName,                 // name of the torrent (default = basename of `path`)
      comment: 'Colored Coins Metadata',  // free-form textual comments of the author
      createdBy: 'ColoredCoins-1.0.0',    // name and version of program used to create torrent
      announceList: self.announce,        // custom trackers (array of arrays of strings) (see [bep12](http://www.bittorrent.org/beps/bep_0012.html))
      urlList: self.urlList,               // web seed urls (see [bep19](http://www.bittorrent.org/beps/bep_0019.html))
    }
    self.client.on('error', function (err) {console.error(err)})
    self.client.seed(dataFilePath, opts, function (torrent) {
      //console.log('onseed() - torrent.infoHash = ', torrent.infoHash)
      console.log(util.inspect(torrent.infoHash, options));
      self.emit('uploads/' + infoHash, torrent)
      self.emit('uploads', torrent)
      if (cb) cb(null, torrent)
    })

Thanks.

@GuigsEvt

This comment has been minimized.

Copy link
Author

@GuigsEvt GuigsEvt commented Mar 6, 2017

Hello Feross,

Do you have any idea why is it not seeding at all ?

Thanks.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Mar 6, 2017

It looks like cc-metadata-handler is using a really old version of webtorrent (0.78.0). If you are using that package, then this could be the source of your issue. Can you ask that project to update to the latest version? It may fix your issue.

Also, you might try remove the announceList option and letting webtorrent fill in the trackers with it's default set.

@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 3, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.