Bug Description
Clicking "Download Model" in the subtitle/auto-captions editor always fails. The download never completes — no error is shown in the UI other than a generic failure, and the whisper/ directory remains empty.
Root Cause
Recordly's Electron main process downloads the Whisper model using Node.js built-in require("node:https").get() (aliased as mv in dist-electron/main.cjs, line 2).
Node.js's native https.get() does not support HTTP_PROXY/HTTPS_PROXY environment variables. It always makes direct TCP connections to the target host.
The download URL is:
https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin
On networks where HuggingFace is blocked or only reachable through an HTTP proxy (e.g. behind a firewall, corporate proxy, or in regions with internet restrictions like China), https.get() fails with ETIMEDOUT because the proxy is never used.
Verification
# curl respects HTTP_PROXY -> works
curl -L "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin"
302 Found -> downloads 465 MB ggml-small.bin
# Node.js https.get ignores HTTP_PROXY -> times out
node -e "require(\"https\").get(\"...\", {timeout:15000}, ...)"
AggregateError: ETIMEDOUT
Affected Code
dist-electron/main.cjs:
// Line 2: mv = require("node:https")
// The download function gE() uses mv.get():
function gE(e,t,r){
const n=(i,a=0)=>new Promise((s,o)=>{
const c=mv.get(i, {timeout:3e4}, u=>{ ... });
});
}
Node.js's built-in HTTP/HTTPS modules (node:http, node:https) do not natively support HTTP proxies. This is a well-known limitation. The HTTP_PROXY/HTTPS_PROXY/NO_PROXY environment variables that tools like curl and many package managers respect are simply not checked by these modules.
Steps to Reproduce
- Install Recordly on a machine that can only reach HuggingFace through an HTTP proxy
- Set
HTTP_PROXY=http://proxy:port and HTTPS_PROXY=http://proxy:port environment variables
- Open the editor -> subtitles -> click "Download Model"
- The download fails silently (ETIMEDOUT)
Expected Behavior
The download should work regardless of whether the user needs an HTTP proxy to reach HuggingFace. Recordly should either:
- Use an HTTP client that supports proxy environment variables (e.g.
undici with proxy dispatcher, or the https-proxy-agent package)
- Or pass the proxy settings explicitly via Node.js
http.Agent / https.Agent
Environment
- OS: Windows 10
- Recordly version: 1.3.3
- Network: Behind HTTP proxy (Karing 127.0.0.1:3067)
Suggested Fix
Replace the bare https.get() call with a proxy-aware approach. The simplest fix would be to use undici (built-in since Node.js 20) with a proxy dispatcher, or to create an https.Agent that uses the https-proxy-agent package when HTTP_PROXY/HTTPS_PROXY env vars are set.
Example with https-proxy-agent:
const HttpsProxyAgent = require("https-proxy-agent");
const https = require("https");
function getWithProxy(url, options) {
const proxy = process.env.HTTPS_PROXY || process.env.HTTP_PROXY;
const agent = proxy ? new HttpsProxyAgent(proxy) : undefined;
return https.get(url, { ...options, agent });
}
Workaround
Manually download the model with curl (which respects HTTP_PROXY) and place it at the correct path:
curl -L -o "$APPDATA/Recordly/whisper/ggml-small.bin" \
"https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.bin"
After placing the file there, the "Download Model" button immediately detects it as already downloaded (via the get-whisper-small-model-status IPC handler checking file existence).
Bug Description
Clicking "Download Model" in the subtitle/auto-captions editor always fails. The download never completes — no error is shown in the UI other than a generic failure, and the
whisper/directory remains empty.Root Cause
Recordly's Electron main process downloads the Whisper model using Node.js built-in
require("node:https").get()(aliased asmvindist-electron/main.cjs, line 2).Node.js's native
https.get()does not supportHTTP_PROXY/HTTPS_PROXYenvironment variables. It always makes direct TCP connections to the target host.The download URL is:
On networks where HuggingFace is blocked or only reachable through an HTTP proxy (e.g. behind a firewall, corporate proxy, or in regions with internet restrictions like China),
https.get()fails withETIMEDOUTbecause the proxy is never used.Verification
Affected Code
dist-electron/main.cjs:Node.js's built-in HTTP/HTTPS modules (
node:http,node:https) do not natively support HTTP proxies. This is a well-known limitation. TheHTTP_PROXY/HTTPS_PROXY/NO_PROXYenvironment variables that tools like curl and many package managers respect are simply not checked by these modules.Steps to Reproduce
HTTP_PROXY=http://proxy:portandHTTPS_PROXY=http://proxy:portenvironment variablesExpected Behavior
The download should work regardless of whether the user needs an HTTP proxy to reach HuggingFace. Recordly should either:
undiciwith proxy dispatcher, or thehttps-proxy-agentpackage)http.Agent/https.AgentEnvironment
Suggested Fix
Replace the bare
https.get()call with a proxy-aware approach. The simplest fix would be to useundici(built-in since Node.js 20) with a proxy dispatcher, or to create anhttps.Agentthat uses thehttps-proxy-agentpackage whenHTTP_PROXY/HTTPS_PROXYenv vars are set.Example with
https-proxy-agent:Workaround
Manually download the model with curl (which respects
HTTP_PROXY) and place it at the correct path:After placing the file there, the "Download Model" button immediately detects it as already downloaded (via the
get-whisper-small-model-statusIPC handler checking file existence).