From 459130b049a991744748b636976d0fe76c0c5217 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Apr 2026 01:14:57 +0000 Subject: [PATCH] fix: force IPv4 DNS in web-ext sign to fix fetch failed error Node.js 18+ resolves DNS with IPv6 preference by default. On Linux systems where IPv6 routing to addons.mozilla.org is broken or unavailable, this causes web-ext's fetch to silently fail. Setting --dns-result-order=ipv4first via NODE_OPTIONS ensures IPv4 is tried first. https://claude.ai/code/session_01G6wo3QBwKjEgAM7j5hQkx4 --- sign-firefox.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sign-firefox.sh b/sign-firefox.sh index 27b7efe..58bdc01 100755 --- a/sign-firefox.sh +++ b/sign-firefox.sh @@ -86,7 +86,9 @@ for attempt in $(seq 1 $MAX_ATTEMPTS); do echo "=== Attempt $attempt: signing v$NEW_VERSION ===" # Capture output to check for specific errors - OUTPUT=$(npx web-ext sign \ + # NODE_OPTIONS forces IPv4 DNS resolution first — Node.js 18+ defaults to IPv6, + # which silently fails when the system can't reach addons.mozilla.org over IPv6. + OUTPUT=$(NODE_OPTIONS='--dns-result-order=ipv4first' npx web-ext sign \ --no-config-discovery \ --source-dir "$SCRIPT_DIR/dist/firefox" \ --artifacts-dir "$SCRIPT_DIR/dist/firefox-signed" \