You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何用Watir解决「管理员已禁用加载未打包扩展」报错并关闭弹窗

Fixes for "Loading of unpacked extensions is disabled by the administrator" Popup

Hey there! I’ve dealt with this exact frustrating popup before when automating browsers, so let me share the actionable fixes that actually work to get rid of it:

1. Bypass the Restriction via Command-Line Flags

This is the quickest fix if you’re launching the browser programmatically (like with Selenium, Puppeteer, etc.). Add these flags when initializing your browser instance:

  • --disable-features=BlockUnpackedExtensions: This directly disables the admin-enforced block on unpacked extensions
  • --load-extension=/full/path/to/your/extension: Specify the exact folder path of your unpacked extension
  • Optional: Add --no-first-run and --disable-default-apps to skip other annoying initial setup popups

Example for Python Selenium:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument("--disable-features=BlockUnpackedExtensions")
chrome_options.add_argument("--load-extension=/home/your-user/your-extension-folder")
driver = webdriver.Chrome(options=chrome_options)

2. Adjust Local Group Policy (Windows Only)

If your Windows system has admin-level group policies blocking unpacked extensions, tweak these settings:

  1. Press Win + R, type gpedit.msc and hit Enter to open the Local Group Policy Editor
  2. Navigate to: Computer Configuration > Administrative Templates > Google > Google Chrome > Extensions
  3. Find the Configure extension installation blocklist policy, double-click it, and set it to Disabled or Not Configured
  4. Next, locate Allow unpacked extensions and set it to Enabled
  5. Restart Chrome for changes to take effect

3. Modify Chrome Preference Files (Mac/Linux)

For Mac or Linux users, you can edit Chrome’s core preference settings to allow unpacked extensions:

  1. Close all Chrome windows completely
  2. Navigate to Chrome’s preference directory:
    • Mac: ~/Library/Application Support/Google/Chrome/Default/Preferences
    • Linux: ~/.config/google-chrome/Default/Preferences
  3. Open the Preferences JSON file in a text editor
  4. Look for the extensions section, then add or modify the line: "allow_unpacked_extensions": true
  5. Save the file and restart Chrome

4. Use a Portable Browser Build

If all else fails, grab a portable version of Chrome (or Edge). Portable builds don’t respect system-wide admin policies, so you can load your unpacked extension without hitting the popup. Just download the portable package, extract it, and launch it directly.

Hope one of these solutions squashes that annoying popup for you! Let me know if you need help with any specific step.

内容的提问来源于stack exchange,提问作者Apzal Bahin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 07:06:34