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

Bittorrent-tracker:websocket-tracker ignoring websocket #1150

Closed
dumanhaydar opened this issue Jun 26, 2017 · 6 comments
Closed

Bittorrent-tracker:websocket-tracker ignoring websocket #1150

dumanhaydar opened this issue Jun 26, 2017 · 6 comments

Comments

@dumanhaydar
Copy link

@dumanhaydar dumanhaydar commented Jun 26, 2017

What version of WebTorrent?
0.98.19

What operating system and Node.js version?
Debian + NodeJS 8

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

I have this, and browser doesn't download something.

The seeder seed in Server (nodejs + webtorrent-hybrid).

In Browser:

bittorrent-tracker:websocket-tracker ignoring websocket data from wss://tracker.fastcast.nz for 299f23389a1265d8a4cd83d729137584ca96e093 (looking for a4b3219fa10c85a071411c970158b81a75d4dd37: reused socket) +2ms
webtorrent.min.js:4 bittorrent-tracker:websocket-tracker ignoring websocket data from wss://tracker.fastcast.nz for a4b3219fa10c85a071411c970158b81a75d4dd37 (looking for f0d63db4a0890210eaf0e264785fa7263420e0b8: reused socket) +3ms
webtorrent.min.js:4 bittorrent-tracker:websocket-tracker ignoring websocket data from wss://tracker.fastcast.nz for a4b3219fa10c85a071411c970158b81a75d4dd37 (looking for 6b7a26a1ee9105a4580cbee088f0cf21baf91bb8: reused socket) +0ms
webtorrent.min.js:4 bittorrent-tracker:websocket-tracker ignoring websocket data from wss://tracker.fastcast.nz for a4b3219fa10c85a071411c970158b81a75d4dd37 (looking for 299f23389a1265d8a4cd83d729137584ca96e093: reused socket) +1ms
webtorrent.min.js:4 bittorrent-tracker:websocket-tracker received {"complete":0,"incomplete":4,"action":"announce","interval":120,"info_hash":"¤³!�¡\f� qA\u001c�\u0001X¸\u001auÔÝ7"} from wss://tracker.fastcast.nz for a4b3219fa10c85a071411c970158b81a75d4dd37 +1ms

In Nodejs:

  bittorrent-tracker:websocket-tracker ignoring websocket data from wss://tracker.fastcast.nz for a4b3219fa10c85a071411c970158b81a75d4dd37 (looking for 299f23389a1265d8a4cd83d729137584ca96e093: reused socket) +0ms
  bittorrent-tracker:websocket-tracker ignoring websocket data from wss://tracker.fastcast.nz for 299f23389a1265d8a4cd83d729137584ca96e093 (looking for a4b3219fa10c85a071411c970158b81a75d4dd37: reused socket) +1ms
  bittorrent-tracker:websocket-tracker ignoring websocket data from wss://tracker.fastcast.nz for 6b7a26a1ee9105a4580cbee088f0cf21baf91bb8 (looking for 299f23389a1265d8a4cd83d729137584ca96e093: reused socket) +1ms
  bittorrent-tracker:websocket-tracker ignoring websocket data from wss://tracker.fastcast.nz for f0d63db4a0890210eaf0e264785fa7263420e0b8 (looking for a4b3219fa10c85a071411c970158b81a75d4dd37: reused socket) +320ms

Sometime just one is downloaded, but not the other

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Jun 26, 2017

You are adding two torrents to the client right?

As the socket is reused by the two, they are receiving the information of both. Clashing here: https://github.com/webtorrent/bittorrent-tracker/blob/3e87df8699116516e3a9f6558cc6156a6c0d9413/lib/client/websocket-tracker.js#L235

@dumanhaydar

This comment has been minimized.

Copy link
Author

@dumanhaydar dumanhaydar commented Jun 26, 2017

Oww... How can I do it ? I need absolutely to add two, or more torrents..

@dumanhaydar

This comment has been minimized.

Copy link
Author

@dumanhaydar dumanhaydar commented Jun 26, 2017

This is my code in client (browser)

var client = new WebTorrent()
client.add('magnet:?xt=urn:btih:f0d63db4a0890210eaf0e264785fa7263420e0b8&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com', function (torrent) {
  // Got torrent metadata!
  console.log('Client is downloading:', torrent.infoHash)
	torrent.on('download', function (bytes) {
        								console.log('progress: ' + torrent.progress * 100);
 
        							});
  torrent.on('done', function(){
    console.log('torrent finished downloading');
    torrent.files.forEach(function(file){
      file.getBlob(function(err, blob) {
        console.log(blob);
        
      });
    })
  })
})
client.add('magnet:?xt=urn:btih:6b7a26a1ee9105a4580cbee088f0cf21baf91bb8&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com', function (torrent) {
  // Got torrent metadata!
  console.log('Client is downloading:', torrent.infoHash)
	torrent.on('download', function (bytes) {
        								console.log('progress: ' + torrent.progress * 100);
 
        							});
  torrent.on('done', function(){
    console.log('torrent finished downloading');
    torrent.files.forEach(function(file){
      file.getBlob(function(err, blob) {
        console.log(blob);
        
      });
    })
  })
})
client.add('magnet:?xt=urn:btih:299f23389a1265d8a4cd83d729137584ca96e093&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com', function (torrent) {
  // Got torrent metadata!
  console.log('Client is downloading:', torrent.infoHash)
	torrent.on('download', function (bytes) {
        								console.log('progress: ' + torrent.progress * 100);
 
        							});
  torrent.on('done', function(){
    console.log('torrent finished downloading');
    torrent.files.forEach(function(file){
      file.getBlob(function(err, blob) {
        console.log(blob);
        
      });
    })
  })
})
client.add('magnet:?xt=urn:btih:a4b3219fa10c85a071411c970158b81a75d4dd37&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com', function (torrent) {
  // Got torrent metadata!
  console.log('Client is downloading:', torrent.infoHash)
	torrent.on('download', function (bytes) {
        								console.log('progress: ' + torrent.progress * 100);
 
        							});
  torrent.on('done', function(){
    console.log('torrent finished downloading');
    torrent.files.forEach(function(file){
      file.getBlob(function(err, blob) {
        console.log(blob);
        
      });
    })
  })
})

And this is in server (nodejs)

var WebTorrent = require('webtorrent-hybrid');
var client = new WebTorrent( {dht: false} );
client.seed("cache/segm170623113221839.ts?", { announce: ['tracker.fastcast.nz','tracker.openwebtorrent.com'], path: "cache/" }, function (torrent) {
        console.log('Client is seeding:', torrent.infoHash);
      });
      client.seed("cache/segm170627005507737.ts?", { announce: ['tracker.fastcast.nz','tracker.openwebtorrent.com'], path: "cache/" }, function (torrent) {
        console.log('Client is seeding:', torrent.infoHash);
      });
      client.seed("cache/segm170627005513956.ts?", { announce: ['tracker.fastcast.nz','tracker.openwebtorrent.com'], path: "cache/" }, function (torrent) {
        console.log('Client is seeding:', torrent.infoHash);
      });
      client.seed("cache/segm170627005519925.ts?", { announce: ['tracker.fastcast.nz','tracker.openwebtorrent.com'], path: "cache/" }, function (torrent) {
        console.log('Client is seeding:', torrent.infoHash);
      });
@dumanhaydar

This comment has been minimized.

Copy link
Author

@dumanhaydar dumanhaydar commented Jun 29, 2017

Someone to help me?

@xwjonline

This comment has been minimized.

Copy link

@xwjonline xwjonline commented Apr 9, 2018

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented May 15, 2018

This issue appears stale since it has been open for a while with no activity. I'm going to close it for now. If this is still issue, please feel free to leave a comment or open a new issue.

@feross feross closed this May 15, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 13, 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
4 participants
You can’t perform that action at this time.