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

Option 'port' is required #1071

Closed
dpxcc opened this issue Mar 4, 2017 · 4 comments
Closed

Option 'port' is required #1071

dpxcc opened this issue Mar 4, 2017 · 4 comments

Comments

@dpxcc
Copy link

@dpxcc dpxcc commented Mar 4, 2017

I'm using webtorrent on react native, with the help of rn-nodeify. But I got an error: Option 'port' is required at index.js:20:44

What version of WebTorrent?
0.98.9
What operating system and Node.js version?
OSX, 6.3.1
What browser and version? (if using WebTorrent in the browser)
In Iphone 6 iOS 10.2 simulator
What did you expect to happen?

const client = new WebTorrent()
client.add(magnet, torrent =>
  console.log(torrent)
)

What actually happened?
Option 'port' is required at index.js:20:44

@dpxcc

This comment has been minimized.

Copy link
Author

@dpxcc dpxcc commented Mar 6, 2017

I fixed this by using a random torrentPort. However, webtorrent is still not working.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Mar 6, 2017

Sorry, I don't use React Native and it's unclear from your bug report what the issue could be. If you have a PR that fixes your issue, feel free to submit it.

@feross feross closed this Mar 6, 2017
@Phactory

This comment has been minimized.

Copy link

@Phactory Phactory commented Mar 19, 2018

on RN (with rn-nodeify) this error goes away after passing: new WebTorrent({ torrentPort: 12318 });

now with client.add torrent gets partially added - second add try results in unique validation exception but no torrent is visible in client.torrents array nor client.on 'torrent' handler (or client.add callback) is being called...

Has anyone been successful in running webtorrent under react-native so far?

PS: i used: rn-nodeify --install buffer,crypto,stream,util,process,vm,events,path,fs,http,https,url --hack

@dpxcc

This comment has been minimized.

Copy link
Author

@dpxcc dpxcc commented Mar 19, 2018

I was able to use webtorrent with react-native. If I remember correctly, you have to update some nodes libraries. The current rn-nodify are using old shimed libraries and they are not compatible with others.

urbien/tradle#3

@lock lock bot locked as resolved and limited conversation to collaborators Jun 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
3 participants
You can’t perform that action at this time.