'WebDriverException: failed to wait for extension background page to load: xxx Selenium

When I try to add an extension on my script like for example "Selenium" I get this error message:

selenium.common.exceptions.WebDriverException:
  Message: unknown error: failed to wait for extension background page to load: chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/background.html
from timeout: Timed out receiving message from renderer: 10.000

Code:

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

executable_path = "chromedriver.exe"
chrome_options = Options()
chrome_options.add_extension('MetaMask.crx')

driver = webdriver.Chrome(executable_path=executable_path, chrome_options=chrome_options)
driver.get("http://stackoverflow.com")
driver.quit()


Solution 1:[1]

Downgrading MetaMask version to 9.01 solved this, something must have changed in the most recent 10.x versions.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rushby