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

client.add's callback does not get called #1227

Closed
Hissvard opened this issue Nov 11, 2017 · 2 comments
Closed

client.add's callback does not get called #1227

Hissvard opened this issue Nov 11, 2017 · 2 comments
Labels

Comments

@Hissvard
Copy link

@Hissvard Hissvard commented Nov 11, 2017

What version of WebTorrent?
0.98.20

What operating system and Node.js version?
Ubuntu 17.04, Node v8.2.0

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

What did you expect to happen?
I'm trying to use webtorrent in a React app.

What actually happened?
I'm using webpack - I initially tried to import webtorrent like

import WebTorrent from 'webtorrent';

But got errors related to the fs module not being found - makes sense since I'm running the app inside a browser. I "solved" this issue the same way a user in another issue did, importing the minified version like

import WebTorrent from 'webtorrent/webtorrent.min';

However this seems to produce a nasty litttle warning
image
And this snippet doesn't work:

import WebTorrent from 'webtorrent/webtorrent.min';
const client = new WebTorrent();
const torrentMagnet = torrentData.magnet;
client.add(torrentMagnet, (torrent) => {
    console.info("YAY!");
    console.log(torrent);
});

Does not produce errors, but the callback is never called.

@DiegoRBaquero

This comment has been minimized.

Copy link
Member

@DiegoRBaquero DiegoRBaquero commented Nov 12, 2017

The callback is called when metadata is fetched. You might be using a magnet which is not seeded anywhere. Try the same magnet in instant.io

@stale

This comment has been minimized.

Copy link

@stale stale bot commented May 3, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 3, 2018
@stale stale bot closed this May 10, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 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.