Disable developer mode extensions pop up in Chrome

Multi tool use
Disable developer mode extensions pop up in Chrome
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.
I suggest stackoverflow.com/questions/30287907/…
– artdias90
Oct 17 '16 at 7:33
@artdias90 doesn't work anymore, he also doesn't want to update anymore (which is understandable after 2 years of maintaining it).
– BadAtPHP
Jan 14 at 16:37
after the popup shows, press esc button using robot type.
Robot robot; try { robot = new Robot(); robot.keyPress(KeyEvent.VK_ENTER); // confirm by pressing Enter in the end robot.keyRelease(KeyEvent.VK_ENTER); } catch (AWTException e) { printStackTraceToString(e); }
– Abdullah Nurum
Jan 24 at 4:16
Robot robot; try { robot = new Robot(); robot.keyPress(KeyEvent.VK_ENTER); // confirm by pressing Enter in the end robot.keyRelease(KeyEvent.VK_ENTER); } catch (AWTException e) { printStackTraceToString(e); }
Side note: Vivaldi browser is compatible with most chrome extensions and does not give this warning
– User
Mar 11 at 21:06
14 Answers
14
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);
where should we write this ?
– İbrahim Özbölük
Jul 20 '16 at 12:12
Added it to my Protractor conf.js file args list and that worked. Thanks a lot :)
– ghiscoding
Jul 29 '16 at 15:16
This worked great. In C# the code is:
options.AddArgument("--disable-extensions");
– kirbycope
Aug 12 '16 at 21:54
options.AddArgument("--disable-extensions");
Today, I had to use
options.AddArguments("chrome.switches", "--disable-extensions --disable-extensions-file-access-check --disable-extensions-http-throttling");
instead of just `--disable-extensions. I think one of the additional switches can be omitted, but not both.– Anders Lindén
Apr 4 '17 at 12:27
options.AddArguments("chrome.switches", "--disable-extensions --disable-extensions-file-access-check --disable-extensions-http-throttling");
can you explain it a bit for mortal humans? what is that script, or where to put it...
– T.Todua
Aug 12 '17 at 14:30
The official way to disable the popup seems to be like this:
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.
chrome://extensions/
.crx
chrome://extensions
(you'll get an "Unsupported extensions disabled" popup if you try restarting Chrome at this stage)
Then for Win7/8:
http://dl.google.com/dl/edgedl/chrome/policy/policy_templates.zip
[zip]windowsadmxchrome.admx
c:windowspolicydefinitions
[zip]windowsadmx[yourlanguage]chrome.adml
c:windowspolicydefinitions[yourlanguage]chrome.adml
c:windows[yourlanguage]
nmgnihglilniboicepgjclfiageofdfj
Start
Run
gpedit.msc
<ENTER>
User Configuration
Administrative Templates
Google Chrome
Extensions
Configure extension installation whitelist
Enabled
Show...
OK
That's it!
@Ryan The homepage of those policy templates seems to be chromium.org/administrators/policy-templates This site is updated regularly (last update 54 minutes ago). I used this method on Jun 24 and the configuration works with most recent Chrome version today. If you prefer «Can't be disabled» to be the official version - it's your choice ;)
– Antony Hatchkins
Aug 11 '16 at 8:03
I solved the problem via Selenium Chrome Driver options, see here.
– kriegaex
Aug 11 '16 at 11:25
@Antony Hatchkins I used the updated code from this answer stackoverflow.com/questions/30287907/… and it started working again. thanks for reacting!
– tube-builder
Dec 19 '16 at 16:25
My Windows is Home Premium, I don't have gpedit.msc :/
– Lucas Bustamante
Mar 11 '17 at 17:59
Works for me in Chrome 58.0.3029.81, Win 7 x64 :) Hoping this solution will last!
– Jimadine
Apr 28 '17 at 19:36
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:
Enter
F7
F3
F9
patch.BAT
script
patch.BAT
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.
Hi, I am trying to patch it with hiew32demo but I haven't been able to do so. When I open chrome.dll I get
Hiew Demo doesn't support NE/LX/LE/NLM/ELF/PE64 files
, but I can skip that warning. Then I change the mode with F4 to decode and search ExtensionDeveloperMo since _ExtensionDeveloperModeWarning _ doesn't fit. After it finds it I press F6 but I get Target not found
. Could you help me?– Gsx
May 17 '15 at 14:03
Hiew Demo doesn't support NE/LX/LE/NLM/ELF/PE64 files
Target not found
I can't find '4578 7465 6e73 696f 6e44 6576' ('ExtensionDev') in chrome.dll. Does this method still work?
– Emerson
May 17 '15 at 14:15
Gsx, my method works for 32-bit Chrome on dev channel.
– wOxxOm
May 18 '15 at 14:22
Emerson, this change has landed in the Dev channel just a week ago, so it's not in Stable. You'll have to find the relevant place by analyzing the previous version of source code.
– wOxxOm
May 18 '15 at 14:24
@wOxxOm That failed also, but I have found a weird way XD. I searched for ExtensionDeveloperMo and changed that to EXtensionDeveloperMo and that seemed to work.
– Gsx
May 18 '15 at 23:58
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).
There are thousands of reason why i cant use my extension/apps in webstore, i need to run it locally. This was a very EVIL implementation from Google Chromium team, very EVIL, someone with knowledge should debat with Chromium and get it fixed. Horrible issue and seriously not appreciated. All the answer to this problem is just over killing for people who is working on kiosks project. its nightmare. please inform / knock/ debat with chromium community to give a fix for this.
– YumYumYum
Mar 11 '16 at 2:42
It will only be a matter of time until you can't develop anything anymore using Chrome :)
– Vinzenz
Dec 26 '16 at 20:43
I was suffering from the same problem, and I tried the following:
A few things to note:
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!
I got "Unsupported extensions popup" after using your method. See my answer for details how to disable it as well.
– Antony Hatchkins
Jun 24 '16 at 10:38
(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:
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).
chrome://policy
Thanks Panther. Added the "chrome.adm" template via the dialog, and got this error: The following entry in the [strings] sectin is too long and has been truncated. This is followed by a page of Cyrillic?
– Steve Staple
Dec 12 '17 at 15:31
Use @ to automatically notify other user about your post (like @Panther).
– Antony Hatchkins
Dec 18 '17 at 15:21
@SteveStaple Sorry, but I don't know what would be the cause of such an issue. :( I'm not an expert at this, just followed the instructions from the page I linked. Fortunately it worked for me.
– Panther
Dec 19 '17 at 18:58
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();
}
}
}
This answer is under-rated because it can be adapted to automate other annoying unavoidable GUI button clicking tasks.
– D Adams
May 18 at 2:00
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'
]
}
}
});
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.
(Bonus tip 1) When using Selenium you can immediately open a new window, wait for the popup in the new window, and then close the new window to dismiss the popup. stackoverflow.com/a/36507179/3345375
– jkdev
Jul 3 at 3:42
(Bonus tip 2) You could also try this: Add the flag
--enable-automation
to avoid getting the popup.– jkdev
Jul 3 at 3:42
--enable-automation
Ruby based watir-webdriver use something like this:
browser=Watir::Browser.new( :chrome, :switches => %w[ --disable-extensions ] )
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:SeleniumInstalledServerDrivers");
var options = new ChromeOptions();
options.AddArgument("--disable-extensions");
IWebDriver driver = new ChromeDriver(chromeService, options);
driver.Url = "http://www.google.com/";
Works like a charm (C# WebDriver 2.53.1.0, ChromeDriver 2.20.353145, Win7 x64)
– Alessandro Da Rugna
Aug 24 '16 at 15:07
For AngularJS and Protractor: (not explained anywhere else here)
Edit conf.js, add a capabilities
section:
capabilities
exports.config = {
...
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
// Prevent warning about dev tools, which breaks some tests, in Windows at least.
'args': ['--disable-extensions']
}
},
(based on this answer: https://stackoverflow.com/a/33113360/694469 about something a bit related but different)
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.
You can also use the beta channel. It's more stable than dev. At the same time, it has more features than the stable channel.
– Rob W
Apr 14 '14 at 17:18
@RobW asargent said that the popup is present in the beta channel too. Is that wrong? code.google.com/p/chromium/issues/detail?id=337734#c2
– rsanchez
Apr 14 '14 at 17:24
@rsanchez Just tried on Windows, and you're correct. Thanks for the correction. I'm using Linux, so I don't experience this issue (:
– Rob W
Apr 14 '14 at 17:31
This no longer works: blog.chromium.org/2015/05/…
– Xan
May 14 '15 at 11:37
@RobW Could you post an update on the bug? (it's
Restrict-AddIssueComment-EditIssue
)– Xan
May 14 '15 at 11:39
Restrict-AddIssueComment-EditIssue
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.
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Use external clicks to kill the popup: stackoverflow.com/a/29376532/285594
– YumYumYum
Feb 13 '16 at 12:35