1

I am using chrome with selenium to test my extension:

ChromeOptions chromeOptions;
IWebDriver tempDriver = null;

string extensionId = "123";

chromeOptions = new ChromeOptions();
chromeOptions.AddArgument(@"--load-extension=path/to/extension");
chromeOptions.AddArgument(@"--whitelisted-extension-id=" + extensionId);

ChromeDriverService service = ChromeDriverService.CreateDefaultService();
tempDriver = new ChromeDriver(service, chromeOptions);

When I start chrome normally, it works fine. However, whenever I add the parameter:

--whitelisted-extension-id=

It crashes/closes without any error log

Adding a crash folder doesn't help:

--crash-dumps-dir=C:\\chrome-crash

I use this parameter with selenium to whitelist my extension's id after adding it with --load-extension so that I can use it.

I am currently using chrome version 112.0.5615.50 (Official Build) (64-bit)

John
  • 5,942
  • 3
  • 42
  • 79
  • Try to use Chromium of a specific version, there is quite a hell with versions of browsers and automation using Selenium and various versions of everything. – Vojtěch Dohnal Apr 12 '23 at 06:14
  • @VojtěchDohnal I need to use google chrome. It also had this issue with the previous version right before I updated to see if it was an out of date issue. – John Apr 12 '23 at 06:21

1 Answers1

1

I experienced the same problem when driving Chrome with Selenium and using --whitelisted-extension-id. But the problem can be easily reproduced simply invoking Chrome from the shell with that flag as of version 112. Therefore, I think it is a bug, and I have just reported in the Chromium bug tracker:

https://bugs.chromium.org/p/chromium/issues/detail?id=1433472

UPDATE: They closed the issue above with the following comment:

The error being reported is that argument is no longer supported. You need to use "--allowlisted-extension-id"

Boni García
  • 4,618
  • 5
  • 28
  • 44