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

Issue 775703 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Last visit 29 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug

Blocking:
issue 617931



Sign in to add a comment

Headless maintains a different profile folder structure to headful

Project Member Reported by lushnikov@chromium.org, Oct 17 2017

Issue description

Currently, chrome headless and chrome headful maintain a different
profile structure.

This compromises a powerful user scenario:
1. Open headful browser
2. Login into the websites with your credentials, do other actions to setup a nice user profile
3. Re-use the profile for tests/automation with headless chromium.

Is the difference between headful/headless profile directories intentional?
 
Blockedon: 617931
See https://bugs.chromium.org/p/chromium/issues/detail?id=617931
This is on our radar this quarter. 
Ideally yes, we'd like to share the same profile structure. But in non-headless that code lives in Chrome so it will depend on us being able to move and reuse the code, otherwise maintaining compatibility will be difficult for everything, although some components might be easier (e.g., Cookies)
For the record: downstream bug in Puppeteer https://github.com/GoogleChrome/puppeteer/issues/921
If you point chrome --headless to the right directory with --user-data-dir do things work? I would expect them to.
As per https://github.com/GoogleChrome/puppeteer/issues/921 — no, defining user data dir does not work.
Owner: dvallet@chromium.org
Status: Assigned (was: Available)
Lushnikov pointed out that local storage in Headless is stored in the root user-data-dir, while non-headless stores it in the Default user profile. 

So cookies are stored: 
  - ${usr-data-dir}/Cookies in Headless
  - ${usr-data-dir}/Default/Cookies in non-headless

I'm sending a CL that will fix this.


Blockedon: -617931
Blocking: 617931
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/17e4ef91bf7efcf9b4dfcbc4d638b276914c05ac

commit 17e4ef91bf7efcf9b4dfcbc4d638b276914c05ac
Author: David Vallet <dvallet@chromium.org>
Date: Mon Oct 30 22:36:31 2017

Changed headless browser profile dir to use Default profile path

Bug:  775703 
Change-Id: Id56b1abd8355667d93a4d5b612af6e7a08a3577e
Reviewed-on: https://chromium-review.googlesource.com/743144
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: David Vallet <dvallet@chromium.org>
Commit-Queue: David Vallet <dvallet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512647}
[modify] https://crrev.com/17e4ef91bf7efcf9b4dfcbc4d638b276914c05ac/headless/lib/browser/headless_browser_context_impl.cc

Status: Fixed (was: Assigned)

Sign in to add a comment