Disable developer mode extensions pop up in Chrome

Google ChromeGoogle Chrome-ExtensionWatir WebdriverSelenium Chromedriver

Google Chrome Problem Overview


Since the latest release of chrome (34.0.1847.116) last week, I have been receiving the “Disable developer mode extensions" when running automated tests using watir-webdriver.

This seems to be the offensive extension but it doesn't make sense to me that this is a potentially hazardous extension given its used by the chromedriver.

Anyone that has found a fix for this, as i am unable to roll back to the previous version or find an installer for an older version to roll back to and this is playing havoc with my tests.

enter image description here

enter image description here

Google Chrome Solutions


Solution 1 - Google Chrome

The official way to disable the popup is this:

  1. Pack your extension: go to chrome://extensions, check Developer mode and click Pack extension

  2. Install the extension by dragging and dropping the .crx file into the chrome://extensions page.

You'll get an "Unsupported extensions disabled" popup if you try restarting Chrome at this point.

Then for Windows 7 or Windows 8:

  1. Download Chrome group policy templates here
  2. Copy [zip]\windows\admx\chrome.admx to c:\windows\policydefinitions
  3. Copy [zip]\windows\admx\[yourlanguage]\chrome.adml to c:\windows\policydefinitions\[yourlanguage]\chrome.adml (not c:\windows\[yourlanguage])
  4. In Chrome, go to the Extensions page: chrome://extensions
  5. Check Developer Mode
  6. Scroll down the list of disabled extensions and note the ID(s) of the extensions you want to enable.
  7. Click Start > Run, type gpedit.msc and hit enter.
  8. Click User Configuration > Administrative Templates > Google Chrome > Extensions
  9. Double click Configure extension installation whitelist policy
  10. Select Enabled, and click Show
  11. In the list, enter the ID(s) of the extensions you noted in Step 7
  12. Click OK and restart Chrome.

That's it!

EDIT: As of July 2018, this approach no longer works: it seems Google has stopped honouring the "whitelist".

EDIT 2: As of December 2018, this approach works in Chrome Version 69.0.3497.100 (Official Build) (64-bit):

  1. Temporarily enable Developer mode in chrome://extensions

  2. Uninstall the extension that causes the popup using the Load unpacked.

  3. Click on Pack extension, and find and select the folder containing the extension files. Don't enter the private key file if you don't have it.

  4. Click Pack extension. A .crx and .pem file will be created near the root directory of the extension. Install the extension using the .crx file and keep the .pem file safe.

  5. Copy the .crx installed extension ID to the whitelist and restart Chrome.

The popup should be gone.

Solution 2 - Google Chrome

While creating chrome driver, use option to disable it. Its working without any extensions.

Use following code snippet

ChromeOptions options = new ChromeOptions();
options.addArguments("chrome.switches","--disable-extensions");
System.setProperty("webdriver.chrome.driver",(System.getProperty("user.dir") + "//src//test//resources//chromedriver_new.exe"));
driver = new ChromeDriver(options);
		

Solution 3 - Google Chrome

As of May 2015 Chrome beta/dev/canary on Windows (see lines 75-78) always display this warning.

  • I've just patched chrome.dll (dev channel, 32-bit) using hiew32 demo version: run it, switch to hex view (Enter key), search for ExtensionDeveloperModeWarning (F7) then press F6 to find the referring code, go to nearby INC EAX line, which is followed by RETN, press F3 to edit, type 90 instead of 40, which will be rendered as NOP (no-op), save (F9).

  • Simplified method found by @Gsx, which also works for 64-bit Chrome dev:

  1. run hiew32 demo (in admin mode) and open Chrome.dll
  2. switch to hex view (Enter key)
  3. search for ExtensionDeveloperModeWarning (F7)
  4. press F3 to edit and replace the first letter "E" with any other character
  5. save (F9).

Of course this will last only until the next update so whoever needs it frequently might write an auto-patcher or a launcher that patches the dll in memory.

Solution 4 - Google Chrome

Can't be disabled. Quoting: "Sorry, we know it is annoying, but you the malware writers..."

Your only options are: adapt your automated tests to this new behavior, or upload the offending script to Chrome Web Store (which can be done in an "unlisted" fashion).

Solution 5 - Google Chrome

There is an alternative solution, use Chrome-Developer-Mode-Extension-Warning-Patcher:

  1. Download the latest release from here from Github.
  2. Close Chrome.
  3. Unpack the zip archive and run ChromeDevExtWarningPatcher.exe as administrator.
  4. Select your Chrome installation from the just opened GUI and then click on Patch button:

enter image description here

  1. Enjoy Chrome without any DevMode pop-up!

Solution 6 - Google Chrome

(In reply to Antony Hatchkins)

This is the current, literally official way to set Chrome policies: https://support.google.com/chrome/a/answer/187202?hl=en

> The Windows and Linux templates, as well as common policy > documentation for all operating systems, can be found here: > https://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip (Zip file > of Google Chrome templates and documentation)

Instructions for Windows (with my additions):

> Open the ADM or ADMX template you downloaded: > > - Extract "chrome.adm" in the language of your choice from the "policy_templates.zip" downloaded earlier (e.g. "policy_templates.zip\windows\adm\en-US\chrome.adm"). > - Navigate to Start > Run: gpedit.msc. > - Navigate to Local Computer Policy > Computer / User Configuration > Administrative Templates. > - Right-click Administrative Templates, and select Add/Remove Templates. > - Add the "chrome.adm" template via the dialog. > - Once complete, Classic Administrative Templates (ADM) / Google / Google Chrome folder will appear under Administrative Templates. > - No matter whether you add the template under Computer Configuration or User Configuration, the settings will appear in both places, so you can configure Chrome at a machine or a user level.


Once you're done with this, continue from step 5 of Antony Hatchkins' answer. After you have added the extension ID(s), you can check that the policy is working in Chrome by opening chrome://policy (search for ExtensionInstallWhitelist).

Solution 7 - Google Chrome

The disable extensions setting did not work for me. Instead, I used the Robot class to click the Cancel button.

import java.awt.Robot;
import java.awt.event.InputEvent;

public class kiosk {
  public static void main(String[] args) {
    // As long as you don't move the Chrome window, the Cancel button should appear here.
    int x = 410;
    int y = 187;
    			
    try {
      Thread.sleep(7000);// can also use robot.setAutoDelay(500);
      Robot robot = new Robot();
      robot.mouseMove(x, y);
      robot.mousePress(InputEvent.BUTTON1_MASK);
      robot.mouseRelease(InputEvent.BUTTON1_MASK);
      Thread.sleep(3000);// can also use robot.setAutoDelay(500);
    } catch (AWTException e) {
      System.err.println("Error clicking Cancel.");
      e.printStackTrace();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
  }
}

Solution 8 - Google Chrome

I was suffering from the same problem, and I tried the following:

  1. Pack the unpacked extension
  2. Turn off Developer Mode
  3. Drag and drop the .crx file from the packed extension
  4. Close Chrome, and then open it again.

A few things to note:

  • The .pem file should be kept with the .crx
  • Don't put the .crx and the .pem in the folder of the unpacked extension.

When I reopened Chrome, I got a popup that told me about the new packed extension, so I rebooted Chrome to see if it would do it again, and it did not.

I hope this solution worked!

Solution 9 - Google Chrome

Based on Antony Hatchkins's answer:

The official way to disable the popup seems to be like this:

  1. Pack your extension (chrome://extensions/, tick at 'Developer mode', hit 'Pack extension...') and install it via drag-and-dropping the .crx file into the chrome://extensions page.

    (Since the extension is not from Chrome Web Store, it will be disabled by default.)

Then for Windows:

  1. In Chrome, go to the Extensions page (chrome://extensions)
  2. Check the Developer Mode checkbox at the top
  3. Scroll down the list of disabled extensions and note the ID(s) of the extensions you want to enable. LogMeIn, for example, is ID: nmgnihglilniboicepgjclfiageofdfj
  4. Click Start > Run, and type regedit <ENTER>
  5. Under key HKLM\Software\Policies\Google\Chrome\ExtensionInstallWhitelist (create it if not exists), create a new string for each extension you want to enable with sequential names (indices), e.g. 1, 2, ...
  6. Enter the extension ID(s) as string values in any order. For example, there is a string with name 1 and value nmgnihglilniboicepgjclfiageofdfj
  7. Restart Chrome

That's it!

Note: When you update a whitelisted extension, you do not have to follow the same steps since the ID of the extension will not change.

Solution 10 - Google Chrome

  1. Wait for the popup balloon to appear.

  2. Open a new tab.

  3. Close the a new tab. The popup will be gone from the original tab.

A small Chrome extension can automate these steps:

manifest.json

{
  "name": "Open and close tab",
  "description": "After Chrome starts, open and close a new tab.",
  "version": "1.0",
  "manifest_version": 2,
  "permissions": ["tabs"],
  "background": {
    "scripts": ["background.js"], 
    "persistent": false
  }
}

background.js

// This runs when Chrome starts up
chrome.runtime.onStartup.addListener(function() {

  // Execute the inner function after a few seconds
  setTimeout(function() {

    // Open new tab
    chrome.tabs.create({url: "about:blank"});

    // Get tab ID of newly opened tab, then close the tab
    chrome.tabs.query({'currentWindow': true}, function(tabs) {
      var newTabId = tabs[1].id;
      chrome.tabs.remove(newTabId);
    });

  }, 5000);

});

With this extension installed, launch Chrome and immediately switch apps before the popup appears... a few seconds later, the popup will be gone and you won't see it when you switch back to Chrome.

Solution 11 - Google Chrome

I am working on Windows And I have tried lots of things provided here as answer but Pop up was disabling the extension continually then i have tried following steps and it works now:

  1. Go to chrome://extensions page and click Pack extension button and select your root Directory of extension by clicking on red rectangled browse button displayed in below image.

browse root directory of extension

  1. after selecting root directory Click on Pack extension button displayed in red circle in below image.

enter image description here

  1. Now in check parent directory of your selected root directory of extension, 2 file would have created [extension name].crx and [extension name].pem.

  2. Now just drag and drop the [extension name].crx file onto the chrome://extensions page and it will ask using add app dialog box click on Add app and refresh the page it is installed now.

Note: Before doing anything as above make sure to enable Developer mode for extensions. If this was not enabled, refresh the chrome://extensions page after enabling it.

Solution 12 - Google Chrome

This question is enormously old but is still the top result on google when you search for ways to try to disable this popup message as an extension developer who hasn't added their extension to the chrome store, doesn't have access to group policies due to their OS, and is not using the chrome dev build. There is currently no official solution in this circumstance so I'll post a somewhat 'hacky' one here.

This method has us immediately create a new window and close the old one. The popup window is associated with the original window so in normal use cases the popup never appears since that window gets closed.

The simplest solution here is we create a new window, and we close all windows that are not the window we just created in the callback:

chrome.windows.create({
    type: 'normal',
    focused: true,
    state: 'maximized'
}, function(window) {
    chrome.windows.getAll(function(windows) {
        for (var i = 0; i < windows.length; i++) {
            if (windows[i].id != window.id) {
                chrome.windows.remove(windows[i].id);
            }
        }
    });
});

Additionally we can detect how this extension is installed and only run this code if it is a development install (although probably best to completely remove altogether from release code). First we create the callback function for a chrome.management.getSelf call which allows us to check the extension's install type, which is basically just wrapping the code above in an if statement:

function suppress_dev_warning(info) {
    if (info.installType == "development") {
        chrome.windows.create({
            type: 'normal',
            focused: true,
            state: 'maximized'
        }, function(window) {
            chrome.windows.getAll(function(windows) {
                for (var i = 0; i < windows.length; i++) {
                    if (windows[i].id != window.id) {
                        chrome.windows.remove(windows[i].id);
                    }
                }
            });
        });
    }
}

next we call chrome.management.getSelf with the callback we made:

chrome.management.getSelf(suppress_dev_warning);

This method has some caveats, namely we are assuming a persistent background page which means the code runs only once when chrome is first opened. A second issue is that if we reload/refresh the extension from the chrome://extensions page, it will close all windows that are currently open and in my experience sometimes display the warning anyways. This special case can be avoided by checking if any tabs are open to "chrome://extensions" and not executing if they are.

Solution 13 - Google Chrome

Have you tried using the Developer Mode Extension Patcher on Github?

It automatically patches your Chrome/Chromium/Edge browser and hides the warning.

Solution 14 - Google Chrome

I found something that will load user-packed extensions and works beautifully:

You'll still have to pack it in details for the problem extension, but after that you can turn off developer mode and load the packed CRX through this. You don't have to deal with signing it or anything.

https://chrome.google.com/webstore/detail/crosspilot/migomhggnppjdijnfkiimcpjgnhmnale?hl=en

Note: I'm not from their team, I've just been looking for an elegant solution for this for years.

Solution 15 - Google Chrome

Ruby based watir-webdriver use something like this:

browser=Watir::Browser.new( :chrome, :switches => %w[ --disable-extensions ] )

Solution 16 - Google Chrome

For anyone using WebdriverIO, you can disable extensions by creating your client like this:

var driver = require('webdriverio');
var client = driver.remote({
    desiredCapabilities: {
        browserName: 'chrome',
        chromeOptions: {
            args: [
                'disable-extensions'
            ]
        }
    }
});

Solution 17 - Google Chrome

I'm not sure if this is still a problem for people or not. However, I read through this post and several others and finally played around with this and was able to make it work in C# using this code. I derived it all from this post and possible some posts linked to this post.

I hope this helps, it certainly solved my problems in C# console application.

Using version 52.0.2743.116 m of Chrome Selenium 2.9 Server Driver

        var chromeService = ChromeDriverService.CreateDefaultService(@"C:\Selenium\InstalledServerDrivers\");
        var options = new ChromeOptions();

        options.AddArgument("--disable-extensions");                                      
        IWebDriver driver = new ChromeDriver(chromeService, options);
                                                         
        driver.Url = "http://www.google.com/";

Solution 18 - Google Chrome

Now, we need to handle it using following -

ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("chrome.switches", "--disable-extensions --disable-extensions-file-access-check --disable-extensions-http-throttling");

Apart from --disable-extensions, we also need to add --disable-extensions-file-access-check (and/or) --disable-extensions-http-throttling chrome switches.

Solution 19 - Google Chrome

Unfortunately I cant automate setting it to developer mode because of restrictions in width using the browser in iphone mode. I have found a dangerous workaround for now, install the dev channel version of chrome. It does not have the warning message, but im sure it will cause me more problems in the long run when problems are introduced. Still will hopefully give me a few days to find a workaround.

Solution 20 - Google Chrome

Using selenium with Python, you start the driver with extensions disabled like this:

from selenium import webdriver
options = webdriver.chrome.options.Options()
options.add_argument("--disable-extensions")
driver = webdriver.Chrome(chrome_options=options)

The popup 'Disable developer mode extensions' will not pop up.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionlambsubstituteView Question on Stackoverflow
Solution 1 - Google ChromeAntony HatchkinsView Answer on Stackoverflow
Solution 2 - Google ChromeAmanpreet KaurView Answer on Stackoverflow
Solution 3 - Google ChromewOxxOmView Answer on Stackoverflow
Solution 4 - Google ChromeXanView Answer on Stackoverflow
Solution 5 - Google ChromeNicolaView Answer on Stackoverflow
Solution 6 - Google ChromePantherView Answer on Stackoverflow
Solution 7 - Google ChromestackexchangerView Answer on Stackoverflow
Solution 8 - Google ChromeEthan LeydenView Answer on Stackoverflow
Solution 9 - Google ChromeBurak GökView Answer on Stackoverflow
Solution 10 - Google ChromejkdevView Answer on Stackoverflow
Solution 11 - Google ChromeHaritsinh GohilView Answer on Stackoverflow
Solution 12 - Google ChromeSparkleStepView Answer on Stackoverflow
Solution 13 - Google ChromeCeiridgeView Answer on Stackoverflow
Solution 14 - Google ChromeJohn SikesView Answer on Stackoverflow
Solution 15 - Google ChromeSuperkevyView Answer on Stackoverflow
Solution 16 - Google ChromechrisView Answer on Stackoverflow
Solution 17 - Google ChromeDougView Answer on Stackoverflow
Solution 18 - Google ChromeAlphaView Answer on Stackoverflow
Solution 19 - Google ChromelambsubstituteView Answer on Stackoverflow
Solution 20 - Google ChromeRemiView Answer on Stackoverflow