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

Try seed but get error! #1337

Closed
vsystech opened this issue Mar 24, 2018 · 2 comments
Closed

Try seed but get error! #1337

vsystech opened this issue Mar 24, 2018 · 2 comments

Comments

@vsystech
Copy link

@vsystech vsystech commented Mar 24, 2018

Hello, i'm install webtorrent-hybrid

Upload file to my server and try seed.

var WebTorrent = require('../index')

var client = new WebTorrent()

var filePath = '/var/www/html/video.mp4'

console.log('filePath:', filePath)

client.seed(filePath, function (torrent) {
console.log('torrentId (info hash):', torrent.infoHash)
})

start this file with node seed.js check file on instant.io start downloading 1 sec and stopped.

What is the problem ? i'm few days ago try working with webtorrent but is hard...

filePath: /var/www/html/video.mp4
torrentId (info hash): 820e190c1f211dd49ae4184c2ae3c008e07f4283

^C/usr/lib/node_modules/webtorrent-hybrid/node_modules/electron-webrtc/src/RTCPeerConnection.js:17
throw new Error('Cannot create RTCPeerConnection, the electron-webrtc daemon has been closed')
^

Error: Cannot create RTCPeerConnection, the electron-webrtc daemon has been closed
at new RTCPeerConnection (/usr/lib/node_modules/webtorrent-hybrid/node_modules/electron-webrtc/src/RTCPeerConnection.js:17:15)
at new Peer (/usr/lib/node_modules/webtorrent-hybrid/node_modules/simple-peer/index.js:82:14)
at WebSocketTracker._createPeer (/usr/lib/node_modules/webtorrent-hybrid/node_modules/bittorrent-tracker/lib/client/websocket-tracker.js:422:14)
at WebSocketTracker._onAnnounceResponse (/usr/lib/node_modules/webtorrent-hybrid/node_modules/bittorrent-tracker/lib/client/websocket-tracker.js:279:17)
at WebSocketTracker._onSocketData (/usr/lib/node_modules/webtorrent-hybrid/node_modules/bittorrent-tracker/lib/client/websocket-tracker.js:224:10)
at Socket.self._onSocketDataBound (/usr/lib/node_modules/webtorrent-hybrid/node_modules/bittorrent-tracker/lib/client/websocket-tracker.js:179:10)
at Socket.emit (events.js:180:13)
at addChunk (/usr/lib/node_modules/webtorrent-hybrid/node_modules/readable-stream/lib/_stream_readable.js:291:12)
at readableAddChunk (/usr/lib/node_modules/webtorrent-hybrid/node_modules/readable-stream/lib/_stream_readable.js:278:11)
at Socket.Readable.push (/usr/lib/node_modules/webtorrent-hybrid/node_modules/readable-stream/lib/_stream_readable.js:245:10)

@vsystech

This comment has been minimized.

Copy link
Author

@vsystech vsystech commented Mar 24, 2018

Ok so, now seeding the torrent files from node with my own js.

client.add('own.mp4.torrent', {announce: 'wss://tracker.fastcast.nz', path: '/usr/lib/node_modules/own/'}, function (torrent) {................

when open from browser not start playing.

own.mp4 820e190c1f211dd49ae4184c2ae3c008e07f4283 0 peer 100% download 171.85 MB size, upload speed 0 B/s

but if stop seed and start again. start playing in the browser for 1-2 sec and stopping.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Apr 18, 2018

webtorrent-hybrid has lots of problems at the moment because it uses electron-webrtc. We need to update it to use wrtc or a better implementation.

@feross feross closed this Apr 18, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 17, 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.