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

cannot read property 'replace' of undefined #146

Open
ghost opened this issue Oct 8, 2021 · 0 comments
Open

cannot read property 'replace' of undefined #146

ghost opened this issue Oct 8, 2021 · 0 comments
Labels

Comments

@ghost
Copy link

ghost commented Oct 8, 2021

I'm not entirely certain if this is a bug in create-torrent, webtorrent-hybrid, or some other module, but when I run this command which works for a much smaller test directory I get a crash:

peermaps@vmi595217:~/data/peermaps/edb$ time webtorrent-hybrid create . -o $HOME/data/peermaps.torrent

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!
OPEN AN ISSUE: https://github.com/webtorrent/webtorrent-cli/issues

DEBUG INFO: webtorrent-cli 3.5.4, webtorrent 1.5.6, node v14.17.0, linux x64, exit 1
/home/peermaps/.nvm/versions/node/v14.17.0/lib/node_modules/webtorrent-hybrid/node_modules/create-torrent/get-files.js:52
      file.path = file.path.replace(path, '').split(corePath.sep)
                            ^

TypeError: Cannot read property 'replace' of undefined
    at /home/peermaps/.nvm/versions/node/v14.17.0/lib/node_modules/webtorrent-hybrid/node_modules/create-torrent/get-files.js:52:29
    at Array.forEach (<anonymous>)
    at /home/peermaps/.nvm/versions/node/v14.17.0/lib/node_modules/webtorrent-hybrid/node_modules/create-torrent/get-files.js:50:11
    at end (/home/peermaps/.nvm/versions/node/v14.17.0/lib/node_modules/webtorrent-hybrid/node_modules/run-parallel/index.js:21:15)
    at done (/home/peermaps/.nvm/versions/node/v14.17.0/lib/node_modules/webtorrent-hybrid/node_modules/run-parallel/index.js:25:10)
    at each (/home/peermaps/.nvm/versions/node/v14.17.0/lib/node_modules/webtorrent-hybrid/node_modules/run-parallel/index.js:31:7)
    at /home/peermaps/.nvm/versions/node/v14.17.0/lib/node_modules/webtorrent-hybrid/node_modules/run-parallel/index.js:46:37
    at end (/home/peermaps/.nvm/versions/node/v14.17.0/lib/node_modules/webtorrent-hybrid/node_modules/run-parallel/index.js:21:15)
    at done (/home/peermaps/.nvm/versions/node/v14.17.0/lib/node_modules/webtorrent-hybrid/node_modules/run-parallel/index.js:25:10)
    at each (/home/peermaps/.nvm/versions/node/v14.17.0/lib/node_modules/webtorrent-hybrid/node_modules/run-parallel/index.js:31:7)

real    1m36.296s
user    1m52.893s
sys     1m52.498s

It might be relevant that this directory has 2.6 million files and 99GB of data.

To reproduce, the data is also seeded to /ipfs/QmVCYUK51Miz4jEjJxCq3bA6dfq5FXD6s2EYp6LjHQhGmh

@alxhotel alxhotel added the bug label Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant