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

Issue with integrating webtorrent with electron. #1276

Closed
aszokalski opened this issue Jan 26, 2018 · 1 comment
Closed

Issue with integrating webtorrent with electron. #1276

aszokalski opened this issue Jan 26, 2018 · 1 comment

Comments

@aszokalski
Copy link

@aszokalski aszokalski commented Jan 26, 2018

What version of WebTorrent?
I tried using webtorrent v0.98.21 and webtorrent-hybrid v1.0.6.

What operating system and Node.js version?
I use OSX high sierra and node.js v8.9.4.

What browser and version? (if using WebTorrent in the browser)
Electron v1.7.11

What did you expect to happen?
I was expecting that if I copy the code working with node.js to electron it would work correctly but it didn't.

What actually happened?

When I try to download torrents with regular webtorrent package nothing happens. When console log WebTorrent.WEBRTC_SUPPORT i get false (why? Electron has webrtc support. Ever one of your developers said it on some youtube video). So I import webtorrent-hybrid which enables webrtc in Node.js but I get this pop up.
Uncaught Exception: TypeError: Bad argument at ChildProcess.spawn (internal/child_process.js:294:26) at Object.exports.spawn (child_process.js:390:9) at spawn (/Users/adamszokalski/github/bitnet-app/node_modules/cross-spawn/index.js:17:18) at Daemon._startElectron (/Users/adamszokalski/github/bitnet-app/node_modules/electron-eval/lib/index.js:169:20) at new Daemon (/Users/adamszokalski/github/bitnet-app/node_modules/electron-eval/lib/index.js:60:13) at module.exports (/Users/adamszokalski/github/bitnet-app/node_modules/electron-eval/lib/index.js:25:10) at module.exports (/Users/adamszokalski/github/bitnet-app/node_modules/electron-webrtc/index.js:5:16) at Object.global.WRTC [as wrtc] (/Users/adamszokalski/github/bitnet-app/node_modules/webtorrent-hybrid/lib/global.js:13:14) at new Client (/Users/adamszokalski/github/bitnet-app/node_modules/bittorrent-tracker/client.js:70:55) at Discovery._createTracker (/Users/adamszokalski/github/bitnet-app/node_modules/torrent-discovery/index.js:161:17)

Seems like something is wrong in your scripts. (I made a new project and reinstalled everything but still same error).

Help me. What did I miss? Should I install some drivers?

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 29, 2018

Electron renderer processes have WebRTC support. But the main process has no chromium integration at all.

Also, you should use the webtorrent package, not webtorrent-hybrid since you want to use the WebRTC implementation from the JS environment.

@feross feross closed this Jan 29, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 25, 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.