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

npm install found 14 vulnerabilities and failed to fix/get dependency #142

Closed
slrslr opened this issue Apr 23, 2021 · 9 comments
Closed
Assignees
Labels
released waiting for reply Awaiting for feedback from user/reporter

Comments

@slrslr
Copy link

slrslr commented Apr 23, 2021

Hello,

i am having same issue as described here

Can you use newer node.js in https://github.com/DEgITx/rats-search/blob/master/.travis.yml#L7 ?

Or tell how to deal with the described issues?

@DEgITx
Copy link
Owner

DEgITx commented Apr 25, 2021

why did you try to run audit fix?
it's not nessary for correct work but can be fixed in future

@DEgITx DEgITx added the waiting for reply Awaiting for feedback from user/reporter label Apr 25, 2021
@slrslr
Copy link
Author

slrslr commented Apr 25, 2021

Thanks for a reply. I thought it can fix some of the vulnerabilities claimed to exist per the npm install command output. So if i do not understand a npm and package management, you suggesting to ignore "14 vulnerabilities (6 low, 2 moderate, 6 high)" and after the "npm install" which i ran a few days ago, i now go back to the git cloned "rats-search" directory and run the:
npm run buildweb
npm run server
? Sorry i am just user, not know npm, git and such.

@DEgITx
Copy link
Owner

DEgITx commented Apr 25, 2021

so yes, you don't need to make npm audit

only
npm install
npm run buildweb
npm run server

to run the web version on http://localhost:8095

@slrslr
Copy link
Author

slrslr commented Apr 26, 2021

@DEgITx thanks, i ran it and it ended with TypeError:

[system] Rejection: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (7)
    at Object.writeFileSync (node:fs:1528:5)
    at setVersion (/home/user/apps/rats-search/src/background/dbPatcher.js:24:7)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async module.exports (/home/user/apps/rats-search/src/background/dbPatcher.js:468:3) {
  code: 'ERR_INVALID_ARG_TYPE'
}

full output here

localhost:8095 web page is empty and dev console shows these debug lines

How to proceed please, any commands to try running?

@DEgITx DEgITx closed this as completed in af57a58 Apr 27, 2021
@DEgITx
Copy link
Owner

DEgITx commented Apr 27, 2021

@DEgITx thanks, i ran it and it ended with TypeError:

[system] Rejection: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (7)
    at Object.writeFileSync (node:fs:1528:5)
    at setVersion (/home/lnot/apps/rats-search/src/background/dbPatcher.js:24:7)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async module.exports (/home/lnot/apps/rats-search/src/background/dbPatcher.js:468:3) {
  code: 'ERR_INVALID_ARG_TYPE'
}

full output here

localhost:8095 web page is empty and dev console shows these debug lines

How to proceed please, any commands to try running?

this one must be fixed in master, try it, if not good - reopen

@slrslr
Copy link
Author

slrslr commented Apr 28, 2021

@DEgITx i tried this and it failed

after i have tried to rename
node_modules/bittorrent-tracker
node_modules/semver
as it was suggesting, and ran npm install;npm run buildweb;npm run server

the "run server" command continue to complain:
/home/user/apps/rats-search/node_modules/electron/index.js:14
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')

after renaming also this directory and re-running npm install, build, run commands:

the run server error was:

[system] Exception: Error: bind EADDRINUSE 0.0.0.0:4446
    at node:dgram:356:20
    at processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -98,
  code: 'EADDRINUSE',
  syscall: 'bind',
  address: '0.0.0.0',
  port: 4446
} Origin: uncaughtException

[system] Exception: Error: listen EADDRINUSE: address already in use :::8095
    at Server.setupListenHandle [as _listen2] (node:net:1311:16)
    at listenInCluster (node:net:1359:12)
    at Server.listen (node:net:1446:7)
    at Object.<anonymous> (/home/user/apps/rats-search/src/background/server.js:40:8)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'EADDRINUSE',
  errno: -98,
  syscall: 'listen',
  address: '::',
  port: 8095
} Origin: uncaughtException

"ss -p|grep 8095" shown there is node running and in "lsof -p pid" it was rats-search so i killed it: kill -9 4036476

then "npm run server" worked

@DEgITx
Copy link
Owner

DEgITx commented Apr 28, 2021

you have broken node_modules folder, remove it before
$ npm install

@slrslr
Copy link
Author

slrslr commented Apr 28, 2021

I just did that, not ran "npm run buildweb" after that (i ran it before). The other issues i have:

npm run server:

[upnp] upnp server dont respond
[upnp] upnp server dont respond
[upnp] upnp server dont respond
[http] https://api.myjson.com/bins/1e5rmh abort by time

[http] https://api.myjson.com/bins/1e5rmh error: socket hang up

[replication] replicate remote torrent Рюдзо

([http] lines in red color) - maybe not important

The webUI is working except dev. console says http://localhost:8095/app.js was not found (404) possibly due to:
The resource from “http://localhost:8095/app.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options

also i think that you may fix the "uncaughtException" described in my previous comment so the software instead return user friendly error or show which PID and process name is utilizing the socket (so i can kill it), i am guessing not all users would know the fix for that exception error.

DEgITx pushed a commit that referenced this issue Jun 10, 2021
# [1.6.0](v1.5.0...v1.6.0) (2021-06-10)

### Bug Fixes

* **build:** fix build under windows ([4fb0bb4](4fb0bb4))
* **changelog:** fix changelog show ([61a8baa](61a8baa))
* **db:** first run start fix [#142](#142) ([af57a58](af57a58))
* **download:** fix download status in recent torrents ([4adbd5c](4adbd5c))
* **search:** double search on DHT ([f14cdcb](f14cdcb))
* **search:** fix slow query wrong remote response on search ([2329b5a](2329b5a))
* **search:** improve search on magnet queries ([a871aed](a871aed))
* **tests:** fix timeout testing ([826b3a7](826b3a7))

### Features

* **core:** update all deps ([4162dc7](4162dc7))
* **core:** update components ([7ceffc8](7ceffc8))
* **test:** details test ([d02592e](d02592e))
DEgITx pushed a commit that referenced this issue Jun 10, 2021
# [1.6.0](v1.5.0...v1.6.0) (2021-06-10)

### Bug Fixes

* **build:** fix build under windows ([4fb0bb4](4fb0bb4))
* **changelog:** fix changelog show ([61a8baa](61a8baa))
* **db:** first run start fix [#142](#142) ([af57a58](af57a58))
* **download:** fix download status in recent torrents ([4adbd5c](4adbd5c))
* **search:** double search on DHT ([f14cdcb](f14cdcb))
* **search:** fix slow query wrong remote response on search ([2329b5a](2329b5a))
* **search:** improve search on magnet queries ([a871aed](a871aed))
* **tests:** fix timeout testing ([826b3a7](826b3a7))

### Features

* **core:** update all deps ([4162dc7](4162dc7))
* **core:** update components ([7ceffc8](7ceffc8))
* **test:** details test ([d02592e](d02592e))
@DEgITx
Copy link
Owner

DEgITx commented Jun 10, 2021

🎉 This issue has been resolved in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

DEgITx added a commit that referenced this issue Jun 1, 2023
DEgITx pushed a commit that referenced this issue Jun 1, 2023
# [1.6.0](v1.5.0...v1.6.0) (2021-06-10)

### Bug Fixes

* **build:** fix build under windows ([4fb0bb4](4fb0bb4))
* **changelog:** fix changelog show ([61a8baa](61a8baa))
* **db:** first run start fix [#142](#142) ([af57a58](af57a58))
* **download:** fix download status in recent torrents ([4adbd5c](4adbd5c))
* **search:** double search on DHT ([f14cdcb](f14cdcb))
* **search:** fix slow query wrong remote response on search ([2329b5a](2329b5a))
* **search:** improve search on magnet queries ([a871aed](a871aed))
* **tests:** fix timeout testing ([826b3a7](826b3a7))

### Features

* **core:** update all deps ([4162dc7](4162dc7))
* **core:** update components ([7ceffc8](7ceffc8))
* **test:** details test ([d02592e](d02592e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released waiting for reply Awaiting for feedback from user/reporter
Projects
None yet
Development

No branches or pull requests

2 participants