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

Issue 161336 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2012
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Profile broken with system-wide installation and UserDataDir and DiskCacheDir policy after v24 upgrade

Reported by igor.sve...@gmail.com, Nov 15 2012

Issue description

UserAgent: Opera/9.80 (Windows NT 6.1; WOW64) Presto/2.12.388 Version/12.11

Steps to reproduce the problem:
1. Use the latest v23 beta
2. Create these registry keys:

[HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome]
"UserDataDir"="${roaming_app_data}\\Google\\Chrome"
"DiskCacheDir"="${local_app_data}\\Google\\Chrome"

3. Make sure everything is working fine
4. Now, let Chrome update to v24..

What is the expected behavior?
Everything should still be working. Chrome should launch with specified UserDataDir and DiskCacheDir.

What went wrong?
Chrome stops working. My profile seems to be "broken", because everytime I launch Chrome, I'll start with a fresh profile ("Welcome to Chome..."/ "Please login...").

This happens everytime. Chrome seems to not save any settings.

Did this work before? Yes Before the beta branch switched to v24.0 it was working fine.

Chrome version: 24.0.1312.14 (Offizieller Build 167497) beta-m  Channel: beta
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)

We are using Chrome's system-wide setup for month. We'd now problems with any updates until the upgrade to v24.

I restored some v23 working profiles from backup - no chance.

If I remove the UserDataDir and DiskCacheDir from registry (=disabling policy), Chrome seems to work at least (starts with a default profile, but it is now saving...).
 
Either the profile is completely not saved, or the FirstRun sentinel couldn't be written. Does Chrome save bookmarks or are they also gone after relaunching?

The first run sentinel is an empty file named "First Run" that is placed next to the .exe (for user installations) or in the user data dir (for system installations). Maybe this file isn't being properly written? Can you find it?

After a quick glance at the code it looks like the First Run sentinel is not written anymore to the user data dir, but to the local app data directory, regardless of the user-data-dir policy or the --user-data-dir flag. I'll try to repro this tomorrow, seems like a really bad regression.
> Either the profile is completely not saved, or the FirstRun
> sentinel couldn't be written. Does Chrome save bookmarks or are
> they also gone after relaunching?

Depends:
In my setup, with custom UserDataDir and DiskCacheDir, bookmarks are still there and new bookmarks can be saved.

If you remove HKEY_LOCAL_MACHINE\Software\Policies\Google\Chrome (=disable Chrome policies) and start chrome.exe via commandline with "--user-data-dir=D:\foo" you will see, that D:\foo will be created, but nothing will be written.


> The first run sentinel is an empty file named "First Run" that
> is placed next to the .exe (for user installations) or in the
> user data dir (for system installations). Maybe this file isn't
> being properly written? Can you find it?

Right, seems like the file isn't written -- I cannot find it.

"Process Monitor" is revealing, that chrome.exe is looking in "%localappdata%\Google\Chrome\User Data\" for that file. But there is no "%localappdata%\Google\Chrome\User Data" folder.

When I create the folder by hand, Chrome will write the "First Run" file to that location (%localappdata%\Google\Chrome\User Data\First Run) and everything seems to be fine.

Cc: joaodasilva@chromium.org pastarmovj@chromium.org
Labels: -Pri-2 -Type-Bug Pri-1 Type-Regression Mstone-24
Owner: robertshield@chromium.org
Status: Assigned
@Robert: I think this bug was introduced in https://chromiumcodereview.appspot.com/10837222.

ChromeMainDelegate::PreSandboxStartup() overrides DIR_USER_DATA depending on the --user-data-dir flag and the UserDataDir policy. So reading DIR_USER_DATA from the PathService gets the right directory.

However that CL replaced GetSentinelFilePath(), which called PathService::Get(chrome::DIR_USER_DATA, path)), with InstallUtil::GetSentinelFilePath(). This new function however doesn't take the flag nor the policy into account, and is now causing this bug.

This means that all user data will be placed in the configured directory, except the first-run sentinel and the eula sentinel (and possibly others...). The sentinels are never written in deployments where the user data dir is overridden and the default local app data dir is not writable.

Can you look into this?
Labels: ReleaseBlock-Beta
Status: Started
Cc: grt@chromium.org
There's a patch working its way through the CQ for this here: https://chromiumcodereview.appspot.com/11299038/

Note that this may be a (hopefully the only) symptom of a larger problem - that group policy settings aren't picked up by the windows installer. Any divergence in expectations re. filesystem or registry paths between setup.exe and chrome has the potential to cause trouble. 
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 19 2012

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=168531

------------------------------------------------------------------------
r168531 | robertshield@chromium.org | 2012-11-19T15:25:48.997612Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/first_run/first_run_win.cc?r1=168531&r2=168530&pathrev=168531
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/first_run/first_run_internal.h?r1=168531&r2=168530&pathrev=168531

Return first_run_win to using the Chrome path provider to look up the user data dir.

This changed in https://chromiumcodereview.appspot.com/10837222/ which causes a regression when the user data dir is overridden via GP.

BUG= 161336 
TEST=Have a group policy set to move the user data dir elsewhere. Ensure that repeated Chrome launches do not go through the first run flow.

Review URL: https://chromiumcodereview.appspot.com/11299038
------------------------------------------------------------------------

Comment 8 by dharani@google.com, Nov 20 2012

Labels: Merge-Requested
This fix made it in 25.0.1330.0. Could someone please verify it?
Cc: pavanv@chromium.org
Pavan .. Could u pls verify this..
Labels: QA-Verified
verified that I can relaunch chrome without encountering first run flow on today's canary 25.0.1330.0 on Win7

Comment 11 by dharani@google.com, Nov 20 2012

Labels: -Merge-Requested Merge-Approved
Please merge it in 1312 branch.
Project Member

Comment 12 by bugdroid1@chromium.org, Nov 26 2012

Labels: -Merge-Approved merge-merged-1312
The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=169463

------------------------------------------------------------------------
r169463 | robertshield@chromium.org | 2012-11-26T19:30:22.433271Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/chrome/browser/first_run/first_run_win.cc?r1=169463&r2=169462&pathrev=169463
   M http://src.chromium.org/viewvc/chrome/branches/1312/src/chrome/browser/first_run/first_run_internal.h?r1=169463&r2=169462&pathrev=169463

Merge 168531 - Return first_run_win to using the Chrome path provider to look up the user data dir.

This changed in https://chromiumcodereview.appspot.com/10837222/ which causes a regression when the user data dir is overridden via GP.

BUG= 161336 
TEST=Have a group policy set to move the user data dir elsewhere. Ensure that repeated Chrome launches do not go through the first run flow.

Review URL: https://chromiumcodereview.appspot.com/11299038

TBR=robertshield@chromium.org
Review URL: https://codereview.chromium.org/11348230
------------------------------------------------------------------------

Comment 13 by dharani@google.com, Nov 26 2012

Status: Fixed
Project Member

Comment 14 by bugdroid1@chromium.org, Mar 9 2013

Labels: -Feature-Enterprise -Type-Regression -Mstone-24 Type-Bug-Regression M-24 Cr-Enterprise

Sign in to add a comment