New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 706008 link

Starred by 35 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Feature


Show other hotlists

Hotlists containing this issue:
Hotlist-1
Hotlist-1


Sign in to add a comment

Extensions support in headless Chrome

Reported by krabo...@gmail.com, Mar 28 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36

Steps to reproduce the problem:
1. Use Chrome with Selenium
2. Add extension with `background.js` script
3. Run in headless mode

What is the expected behavior?
Usual output as in windowed mode

What went wrong?
Got error:

selenium.common.exceptions.WebDriverException: Message: unknown error: failed to wait for extension background page to load: chrome-extension://jcolbbihfiphppdfbkbhmiabgaomajdf/_generated_background_page.html
from unknown error: page could not be found: chrome-extension://jcolbbihfiphppdfbkbhmiabgaomajdf/_generated_background_page.html
  (Driver info: chromedriver=2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f),platform=Linux 4.8.0-41-generic x86_64)

Did this work before? N/A 

Chrome version: 57.0.2987.110  Channel: stable
OS Version: Ubuntu 16.10
Flash Version: 

I failed to find information about extensions in headless mode. This is the only thread where it was mentioned: https://bugs.chromium.org/p/chromium/issues/detail?id=604324#c13

But I don't get if it would be done in headless mode or just fixed in chromedriver (and the latest version can start in the headless mode so the workaround has been applied). For me it is a crucial feature as I need to get a content of CSV files programmatically without downloading them and in Chrome this behaviour can be introduced only via plugins.
 
Labels: TE-NeedsTriageHelp
Cc: sushkov@chromium.org irisu@chromium.org jzfeng@chromium.org
Labels: -Type-Bug Proj-Headless Type-Feature
Status: Available (was: Unconfirmed)
Headless mode doesn't currently support extensions, and it's not clear whether we can support them easily -- although we are doing some initial feasibility analysis.

FWIW, general headless support for ChromeDriver/Selenium is tracked in  issue 604324 .
Labels: -TE-NeedsTriageHelp
Components: Internals>Headless
Labels: -Pri-2 Pri-3
To give an update, we've decided against implementing extension support in headless mode for now because supporting all the required features is rather complex.

Full analysis: https://docs.google.com/document/d/1OeUik1MZb1qSQ_Dnf1kIYcyCgLYRZHg1GlZo06bsKx4/edit#heading=h.o067l9gdl1jy
Cc: johnchen@chromium.org
 Issue chromedriver:1851  has been merged into this issue.
Small problem here:
* Chromedriver requires an extension to run correctly (automation-extension).
* Headless chrome, designed to be used for automated testing, does not support extensions.
* Without that extension, basic functionality like resizing the window is broken (and whatever the default size is, it's hiding elements my tests are trying to interact with).

See this file for where it's activating it:
https://codesearch.chromium.org/chromium/src/chrome/test/chromedriver/chrome_launcher.cc?l=769

Headless chrome is supposed to be a big win for automated testing, but by blocking extensions you've blocked the supposedly right way to do automated testing with Chrome. The efforts that went into the headless flag are a lot less worthwhile without that ability. 

Either Chromedriver needs to update to not need the extension, or headless needs to support automation-extension.

In the meantime, I guess I'll look into xvfb.
Ah, I see that jzfeng@chromium.org is already way ahead on the issue I just posted as part of https://bugs.chromium.org/p/chromium/issues/detail?id=604324. 
 Issue chromedriver:2071  has been merged into this issue.
Labels: OS-Chrome OS-Mac OS-Windows
 Issue chromedriver:2115  has been merged into this issue.
Components: -Platform>DevTools
Hi everyone,is there a plan about possible implementation of extension support ? 

Thanks 
Status: WontFix (was: Available)
See #5 -- implementing extension support in headless mode isn't really feasible right now. I'll close this issue accordingly.

Comment 15 Deleted

 Issue chromedriver:2217  has been merged into this issue.
How can we keep updated if this gets re-prioritized as something that is important to fix? 
 Issue chromedriver:2342  has been merged into this issue.
Any update about extension support? I was looking for How can I use chrome headless with extension.
Thank you?
They decided it was too hard, and refuse to do the work or allow it to be done.
Cc: goanuj@google.com
Components: Enterprise

Sign in to add a comment