ChromeDriver 78: Cannot use CRX format extensions anymore

1,254 views
Skip to first unread message

mr.hud...@gmail.com

unread,
Oct 29, 2019, 12:32:13 PM10/29/19
to ChromeDriver Users
Since updating to ChromeDriver 78.0.3904.70, I am no longer able to run any tests that add Browser extensions to Chrome Sessions. 

With ChromeDriver 77 this used to work fine. This still works fine with Chrome 78 + Chromedriver 77

System.setProperty("webdriver.chrome.driver", "./Drivers/Windows/chromedriver.exe");

options.addExtensions(new File("Path_to_extension/ModHeader_v2.4.1.crx"));

driver = new ChromeDriver(options);
}


Now with ChromeDriver 78.0.3904.70 + Chrome 78
I get the following callstack

Starting ChromeDriver 78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800}) on port 35182
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

org.openqa.selenium.WebDriverException: unknown error: cannot process extension #1
from unknown error: CRX verification failed: 3

Have tried a few different Extensions.
I saw mention that CRX is deprecated in Chrome 78? Has anyone successfully tried CRX3 extension Extensions with chrome78? This is a big step back and need to research how to repackage these extensions without source files

Have also tried
options.addExtensions("--load-extension=Path_to_extension/ModHeader_v2.4.1.crx");
Which also throws an error

Basically anyone else have this issue? or Anyone able to get a work around for this? 
My only work around currently is Chrome 78 + Chromedriver 77

Thanks

T Crichton

unread,
Oct 29, 2019, 1:11:03 PM10/29/19
to ChromeDriver Users
We include tests to load CRX3 extensions for ChromeDriver, so this is a feature that should work. Other users have reported success after repackaging their extensions.

Have you seen the information here: https://www.chromium.org/crx2-deprecation
One of the links includes instructions on repackaging the extension: https://developer.chrome.com/extensions/linux_hosting#packaging

The first link also clarifies why this is now an issue: 
  • M78 (October 2019)

    • The ExtensionAllowInsecureUpdates policy will be ignored.

    • Chrome will no longer install or update to extensions packaged with CRX2 format.

    • All extensions must be packaged with CRX3 format.


The error you are seeing "CRX verification failed: 3" is used when the format is incorrect. Specifically this error means that the header of the crx could not be parsed successfully. We will be improving this message in version 80.

Reply all
Reply to author
Forward
0 new messages