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

[BUG] NPM outbound internet http traffic failing to use system http_proxy variables (NOT NPM config related) #1127

Open
tunloop opened this issue Jul 17, 2024 · 0 comments

Comments

@tunloop
Copy link

tunloop commented Jul 17, 2024

Describe the bug
Having some issues with NPM trying to download the yt-dlp binary but not using the set http_proxy and https_proxy variables.

This is not an issue with NPM, as the NPM installation occurred through my proxy, but after using npm run it then attempts a direct connection to github, rather than through the proxy.

To Reproduce
Steps to reproduce the behavior:

  1. Install youtubedl-material using the build it yourself method
  2. Set proxy variables in /etc/environment and .npmrc
  3. Attempt to npm run
  4. Observe outbound system traffic not pointing towards proxy

Expected behavior
YoutubeDL-Material NPM should use system declared proxies, and/or .npmrc declared proxies.

Logs

Jul 17 13:25:46 archivebox npm[1854]: > [email protected] start
Jul 17 13:25:46 archivebox npm[1854]: > pm2-runtime --raw pm2.config.js
Jul 17 13:25:46 archivebox npm[1866]: 2024-07-17T13:25:46: PM2 log: Launching in no daemon mode
Jul 17 13:25:46 archivebox npm[1866]: 2024-07-17T13:25:46: PM2 log: [Watch] Start watching YoutubeDL-Material
Jul 17 13:25:46 archivebox npm[1866]: 2024-07-17T13:25:46: PM2 log: App [YoutubeDL-Material:0] starting in -fork mode-
Jul 17 13:25:46 archivebox npm[1866]: 2024-07-17T13:25:46: PM2 log: App [YoutubeDL-Material:0] online
Jul 17 13:25:47 archivebox npm[1866]: 2024-07-17T20:25:47.906Z WARN: Failed to get youtube-dl binary details at location 'appdata/youtube-dl.json'. Generating file...
Jul 17 13:27:57 archivebox npm[1866]: 2024-07-17T20:27:57.168Z ERROR: Failed to check yt-dlp version for an update.
Jul 17 13:27:57 archivebox npm[1866]: 2024-07-17T20:27:57.168Z ERROR: request to https://api.github.com/repos/yt-dlp/yt-dlp/tags failed, reason: connect ETIMEDOUT 140.82.116.6:443
Jul 17 13:27:57 archivebox npm[1866]: 2024-07-17T20:27:57.169Z WARN: Updating yt-dlp binary to 'appdata/bin/yt-dlp', downloading...
Jul 17 13:30:08 archivebox npm[1866]: 2024-07-17T20:30:08.239Z ERROR: Failed to download new yt-dlp version: null
Jul 17 13:30:08 archivebox npm[1866]: 2024-07-17T20:30:08.240Z ERROR: request to https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp failed, reason: connect ETIMEDOUT 140.82.116.4:443

npm config

npm config list
; "builtin" config from /usr/share/nodejs/npm/npmrc

globalignorefile = "/etc/npmignore" 
prefix = "/usr/local" 

; "global" config from /etc/npmrc

https-proxy = "http://192.168.1.10:3128/" 
proxy = "http://192.168.1.10:3128/" 

; node bin location = /usr/bin/node
; node version = v18.19.0
; npm local prefix = /opt
; npm version = 9.2.0
; cwd = /opt
; HOME = /opt/ytdl
; Run `npm config ls -l` to show all defaults.

/etc/environment

http_proxy=http://192.168.1.10:3128
https_proxy=http://192.168.1.10:3128

Environment

  • YoutubeDL-Material version 4.3.2
  • Debian 12
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

No branches or pull requests

1 participant