From 9ca70a79469275def39a724102eee6d74454c20d Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 26 Aug 2024 12:57:32 -0400 Subject: [PATCH] Prevent "Error: Addon must include an id, version, and type" And "Addon with ID undefined already installed, older version will be disabled". --- app/scripts/fetch_xulrunner | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/scripts/fetch_xulrunner b/app/scripts/fetch_xulrunner index 179bcdfaf5..c4404c9ccf 100755 --- a/app/scripts/fetch_xulrunner +++ b/app/scripts/fetch_xulrunner @@ -186,6 +186,9 @@ function modify_omni { #rm Telemetry* rm URLDecorationAnnotationsService.sys.mjs popd + pushd chrome/toolkit/content/mozapps/extensions + rm -rf default-theme + popd # Clear most WebExtension manifest properties replace_line 'manifest = normalized.value;' 'manifest = normalized.value; @@ -232,6 +235,10 @@ function modify_omni { replace_line 'lazy.AddonManagerPrivate.webExtensionsMinPlatformVersion' '"7.0"' modules/addons/AddonUpdateChecker.sys.mjs replace_line 'result.targetApplications.push' 'false && result.targetApplications.push' modules/addons/AddonUpdateChecker.sys.mjs + # Prevent automatic installation of default theme + # (chrome/toolkit/content/mozapps/extensions/default-theme, removed above) + replace_line 'this.maybeInstallBuiltinAddon\(' 'if (false) this.maybeInstallBuiltinAddon(' modules/addons/XPIProvider.jsm + # Allow addon installation by bypassing confirmation dialogs. If we want a confirmation dialog, # we need to either add gXPInstallObserver from browser-addons.js [1][2] or provide our own with # Ci.amIWebInstallPrompt [3].