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

Unexpected crash of app using bugout #70

Open
Kos-M opened this issue Apr 21, 2024 · 1 comment · May be fixed by #71
Open

Unexpected crash of app using bugout #70

Kos-M opened this issue Apr 21, 2024 · 1 comment · May be fixed by #71

Comments

@Kos-M
Copy link
Contributor

Kos-M commented Apr 21, 2024

Hey , i have noticed this weird exception that crashes my app using bugout.

This happens on scenarios that network connectivity is under restoring its state back to online , for example after a laptop hibernation.

bugout/index.js

Line 112 in 62ddbc8

if (this.torrent.discovery.tracker) {

/home/t13/Documents/proj/app/node_modules/bugout/index.js:112
  if (this.torrent.discovery.tracker) {
                             ^

TypeError: Cannot read properties of null (reading 'tracker')
    at Bugout._onTorrent (/home/t13/Documents/proj/app/node_modules/bugout/index.js:112:30)
    at /home/t13/Documents/proj/app/node_modules/bugout/index.js:96:14
    at /home/t13/Documents/proj/app/node_modules/bugout/index.js:505:15
    at _onseed (/home/t13/Documents/proj/app/node_modules/webtorrent/index.js:364:41)
    at /home/t13/Documents/proj/app/node_modules/webtorrent/index.js:358:9
    at end (/home/t13/Documents/proj/app/node_modules/run-parallel/index.js:21:15)
    at done (/home/t13/Documents/proj/app/node_modules/run-parallel/index.js:25:10)
    at each (/home/t13/Documents/proj/app/node_modules/run-parallel/index.js:31:7)
    at Torrent.<anonymous> (/home/t13/Documents/proj/app/node_modules/run-parallel/index.js:46:37)
    at Object.onceWrapper (node:events:628:28)

Node.js v20.5.0
error Command failed with exit code 1.

Solution to that could be as easy as that :

 if (this?.torrent?.discovery?.tracker) { 

Let me know your thoughts on this..

@chr15m
Copy link
Owner

chr15m commented Apr 22, 2024

Seems like that would probably fix it!

@Kos-M Kos-M linked a pull request Apr 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants