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

"Error: Cannot add duplicate torrent" but webtorrent-desktop work. #1037

Closed
VinceXie opened this issue Feb 9, 2017 · 2 comments
Closed

"Error: Cannot add duplicate torrent" but webtorrent-desktop work. #1037

VinceXie opened this issue Feb 9, 2017 · 2 comments

Comments

@VinceXie
Copy link

@VinceXie VinceXie commented Feb 9, 2017

What version of WebTorrent?
0.98.5
What operating system and Node.js version?
osx 10.12.2
What browser and version? (if using WebTorrent in the browser)

What did you expect to happen?
download file
What actually happened?
error but webtorrent-desktop work.

Magnet link:

magnet:?xt=urn:btih:D3FCB351B1B9C93144695D9042D88D5EC29CB8FB&dn=The+Last+Reef+3D+%282012%29+%5B720p%5D+%5BYTS.AG%5D&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fp4p.arenabg.ch%3A1337&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337

Error infomation:

DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/vMUyr)
Client is downloading: d3fcb351b1b9c93144695d9042d88d5ec29cb8fb
events.js:154
throw er; // Unhandled 'error' event
^

Error: Cannot add duplicate torrent d3fcb351b1b9c93144695d9042d88d5ec29cb8fb
at Torrent.onInfoHash (/Users/vincexie/Desktop/tmp/VSpider/node_modules/webtorrent/index.js:272:26)
at Torrent.g (events.js:273:16)
at emitOne (events.js:90:13)
at Torrent.emit (events.js:182:7)
at Torrent._onParsedTorrent (/Users/vincexie/Desktop/tmp/VSpider/node_modules/webtorrent/lib/torrent.js:265:8)
at /Users/vincexie/Desktop/tmp/VSpider/node_modules/webtorrent/lib/torrent.js:232:12
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

Here my code

/**
 * Created by vincexie on 2017/2/9.
 */
var WebTorrent = require('webtorrent')

var client = new WebTorrent()
var magnetURI = 'magnet:?xt=urn:btih:D3FCB351B1B9C93144695D9042D88D5EC29CB8FB&dn=The+Last+Reef+3D+%282012%29+%5B720p%5D+%5BYTS.AG%5D&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fp4p.arenabg.ch%3A1337&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337'

client.add(magnetURI, function (torrent) {
  // Got torrent metadata!
  console.log('Client is downloading:', torrent.infoHash)

  client.add(magnetURI, { path: '../movies' }, function (torrent) {
    torrent.on('done', function () {
      console.log('torrent download finished')
    })
  })
})
@VinceXie

This comment has been minimized.

Copy link
Author

@VinceXie VinceXie commented Feb 9, 2017

i find my fault

@VinceXie VinceXie closed this Feb 9, 2017
@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 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 4, 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
1 participant
You can’t perform that action at this time.