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

Uncaught TypeError: item.path.shift is not a function #1706

Closed
arranlomas opened this issue Aug 14, 2019 · 3 comments
Closed

Uncaught TypeError: item.path.shift is not a function #1706

arranlomas opened this issue Aug 14, 2019 · 3 comments
Labels
bug

Comments

@arranlomas
Copy link

@arranlomas arranlomas commented Aug 14, 2019

I have seen this issue raised previously with regards to brave (eg. #526). I am having this issue in chrome.

I am using the typescript type definitions here: https://www.npmjs.com/package/@types/webtorrent

It only happens if I add multiple files with the same prefix, for example download 1 and download 2

What version of this package are you using?
0.107.3

What operating system, Node.js, and npm version?
node: v10.16.2
npm: 6.9.0
browser: chrome 76.0.3809.100

What happened?
When adding multiple torrents with File[] Uncaught TypeError: item.path.shift is not a function is thrown

What did you expect to happen?
No error plz 🙏. Expect files to be added as with files without the same prefix.

Are you willing to submit a pull request to fix this bug?
Yes

Thanks for this excellent library, very interesting project!

@feross feross added the bug label Aug 14, 2019
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Aug 14, 2019

I haven't been able to pin down the source of this. A code example that can reliably reproduce this issue in Chrome would be most helpful!

Related: webtorrent/create-torrent#98

@arranlomas

This comment has been minimized.

Copy link
Author

@arranlomas arranlomas commented Aug 15, 2019

It's actually coming from here: https://github.com/webtorrent/create-torrent/blob/fb1d634529a87c04c58217fa2d8c8d4c8e016234/index.js#L131

Closing this issue in favour of the issue you linked. I didn't realise the issue was coming from create-torrent 👍

Will continue discussion there. I can reliably reproduce the issue so will see if there are any tests that can cover this or make a small project to share. (Larger project is not ready to open-source yet).

Cheers.

@arranlomas arranlomas closed this Aug 15, 2019
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Aug 16, 2019

@arranlomas Sounds good, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.