From 3ffac3299fdc108462db46bfc5ea0d7c5968e4c3 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 26 Mar 2026 20:58:16 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20Firefox=20signing=20=E2=80=94=20manifest?= =?UTF-8?q?=5Fversion=20corruption=20+=20rate=20limiting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sign script's sed command was replacing ALL "version" patterns including "manifest_version": 3, corrupting it to "manifest_version": 1. Fixed by anchoring the sed pattern to only match the top-level "version" field (starts with two spaces at line beginning). Also: - Added data_collection_permissions to Firefox manifest (new Mozilla requirement for all extensions) - Added 8-second sleep between retry attempts to avoid Mozilla API rate limiting (was causing cascading failures) https://claude.ai/code/session_01SWSwDfMVij53bCTNSCLMwn --- manifest.firefox.json | 7 ++++++- sign-firefox.sh | 15 ++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/manifest.firefox.json b/manifest.firefox.json index 38fd0ba..2bafc34 100644 --- a/manifest.firefox.json +++ b/manifest.firefox.json @@ -6,7 +6,12 @@ "browser_specific_settings": { "gecko": { "id": "silent-send@example.com", - "strict_min_version": "128.0" + "strict_min_version": "128.0", + "data_collection_permissions": { + "required": false, + "optional": false, + "description": "Silent Send does not collect, transmit, or store any data externally. All processing is 100% local in your browser." + } } }, "permissions": [ diff --git a/sign-firefox.sh b/sign-firefox.sh index a28938a..f86ce84 100755 --- a/sign-firefox.sh +++ b/sign-firefox.sh @@ -30,10 +30,10 @@ NEW_VERSION="$MAJOR.$MINOR.$PATCH" echo "Version: $CURRENT_VERSION → $NEW_VERSION" -# Update all version references -sed -i "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/" "$MANIFEST" -sed -i "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/" "$MANIFEST_CHROME" -sed -i "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEW_VERSION\"/" "$PACKAGE_JSON" +# Update all version references (only top-level "version", not "manifest_version") +sed -i "s/^ \"version\": \"$CURRENT_VERSION\"/ \"version\": \"$NEW_VERSION\"/" "$MANIFEST" +sed -i "s/^ \"version\": \"$CURRENT_VERSION\"/ \"version\": \"$NEW_VERSION\"/" "$MANIFEST_CHROME" +sed -i "s/^ \"version\": \"$CURRENT_VERSION\"/ \"version\": \"$NEW_VERSION\"/" "$PACKAGE_JSON" # Commit the version bump cd "$SCRIPT_DIR" @@ -113,7 +113,12 @@ for attempt in $(seq 1 $MAX_ATTEMPTS); do PATCH=$((PATCH + 1)) NEW_VERSION="$MAJOR.$MINOR.$PATCH" - sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$NEW_VERSION\"/" "$SCRIPT_DIR/dist/firefox/manifest.json" + # Only replace the top-level "version" field, not "manifest_version" + sed -i "s/^ \"version\": \"[^\"]*\"/ \"version\": \"$NEW_VERSION\"/" "$SCRIPT_DIR/dist/firefox/manifest.json" + + # Wait before retrying to avoid Mozilla rate limiting + echo "Waiting 8 seconds before retry..." + sleep 8 done echo "Error: Failed after $MAX_ATTEMPTS attempts."