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

Issue 676882 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Error running depot_tools first time - cipd.ps1 cannot be loaded

Reported by teepee...@gmail.com, Dec 24 2016

Issue description

Chrome Version       : N/A - This is a depot_tools issue
URLs (if applicable) : N/A
Other browsers tested: N/A

What steps will reproduce the problem?

(1) Follow instructions on https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md page.
(2) Error while running gclient at this step: "From a cmd.exe shell, run the command gclient (without arguments).".

What is the expected result?
    Expected no errors.

What happens instead?
    Error: "cipd.ps1 cannot be loaded"

Details:

C:\Users\User\Development\Chromium>gclient
Installing python 2.7.6...
Fetching from https://storage.googleapis.com/chrome-infra/python276_bin.zip
                                                   File C:\Users\User\Development\Chromium\depot_tools\cipd.ps1 cannot be loaded. The file C:\Users\User\Development\Chromium\depot_tools\cipd.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see
about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
    + CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnauthorizedAccess
Traceback (most recent call last):
  File "C:\Users\User\Development\Chromium\depot_tools\bootstrap\win\git_bootstrap.py", line 193, in <module>
    sys.exit(main(sys.argv[1:]))
  File "C:\Users\User\Development\Chromium\depot_tools\bootstrap\win\git_bootstrap.py", line 185, in main
    install_git(args, git_version, git_directory)
  File "C:\Users\User\Development\Chromium\depot_tools\bootstrap\win\git_bootstrap.py", line 103, in install_git
    'v' + git_version.replace('.', '_'))
  File "C:\Users\User\Development\Chromium\depot_tools\bootstrap\win\git_bootstrap.py", line 65, in cipd_install
    _check_call(cipd_args)
  File "C:\Users\User\Development\Chromium\depot_tools\bootstrap\win\git_bootstrap.py", line 26, in _check_call
    subprocess.check_call(argv, **kwargs)
  File "C:\Users\User\Development\Chromium\depot_tools\python276_bin\lib\subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\User\\Development\\Chromium\\depot_tools\\cipd.bat', 'ensure', '-list', 'c:\\users\\user\\appdata\\local\\temp\\tmp9zvzlg', '-root', 'c:\\users\\user\\appdata\\local\\temp\\tmp5skycj']' returned non-zero exit status 1

----------
I'm getting this same result on two different Windows 10 boxes.  I disabled indexing and McAfee for the folder where I'm running gclient.
 

Comment 1 by hdodda@chromium.org, Dec 26 2016

Labels: TE-NeedsTriageHelp
Components: Infra
Owner: mar...@chromium.org
Not sure how to set a component, so following the instructions on the depot_tools pages and CCing maruel@.

Comment 3 by mar...@chromium.org, Dec 26 2016

Cc: mar...@chromium.org
Owner: iannucci@chromium.org
Did you find a solution to this issue? I'm running into this as well. Only on 1 machine, works fine on the other. 

I modified the execution policy in powershell but i don't think that affects what happens in cmd. From what i read, using cmd is preferred.

Would love to find a solution for this!
Here's my error for reference:

C:\Users\User\src\chromium>gclient
Installing python 2.7.6...
Fetching from https://storage.googleapis.com/chrome-infra/python276_bin.zip
File C:\Users\User\src\depot_tools\cipd.ps1 cannot be loaded. The file C:\Users\User\src\depot_tools\cipd.ps1 is
not digitally signed. You cannot run this script on the current system. For more information about running scripts and
setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
    + CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnauthorizedAccess
Traceback (most recent call last):
  File "C:\Users\User\src\depot_tools\bootstrap\win\git_bootstrap.py", line 193, in <module>
    sys.exit(main(sys.argv[1:]))
  File "C:\Users\User\src\depot_tools\bootstrap\win\git_bootstrap.py", line 185, in main
    install_git(args, git_version, git_directory)
  File "C:\Users\User\src\depot_tools\bootstrap\win\git_bootstrap.py", line 103, in install_git
    'v' + git_version.replace('.', '_'))
  File "C:\Users\User\src\depot_tools\bootstrap\win\git_bootstrap.py", line 65, in cipd_install
    _check_call(cipd_args)
  File "C:\Users\User\src\depot_tools\bootstrap\win\git_bootstrap.py", line 26, in _check_call
    subprocess.check_call(argv, **kwargs)
  File "C:\Users\User\src\depot_tools\python276_bin\lib\subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\User\\src\\depot_tools\\cipd.bat', 'ensure', '-list', 'c:\\users\\User\\appdata\\local\\temp\\tmpi5xjmz', '-root', 'c:\\users\\User\\appdata\\local\\temp\\tmp69dxue']' returned non-zero exit status 1

Comment 6 by teepee...@gmail.com, Dec 30 2016

I still haven't found a solution to this issue.

Furqan, you stated that you only see this issue on one machine.  Some
questions:

1) Are both Windows 10 boxes?

2) If so, do you see any differences between the environments?

3) Was the same version of depot_tools installed on both machines (and do
you know how to check the version of depot_tools)?

4) Is it possible for you run a test by extracting the copy of
depot_tools.zip from the machine that is failing to some folder on the
machine that successfully runs gclient, then try running gclient in that
folder (you might have to modify your PATH environment variable)?

Thanks,
Tim
Is there anything I can provide to help identify this problem and find a solution?  I'm still getting the "cipd.ps1 is not digitally signed" error when runing gclient.  I'm blocked and would like to get a Windows build started.
1) Are both Windows 10 boxes?

Both machines are windows 10, 1 is a dell, the other is MSI. Both have windows pre-installed from the vendor.

2) If so, do you see any differences between the environments?

The main difference I see is the dell (the one with the issue) has a ton of pre-installed dell software. some being firewall / security. Going to try to uninstall everything / wipe windows.

3) Was the same version of depot_tools installed on both machines (and do
you know how to check the version of depot_tools)?

Same version

4) Is it possible for you run a test by extracting the copy of
depot_tools.zip from the machine that is failing to some folder on the
machine that successfully runs gclient, then try running gclient in that
folder (you might have to modify your PATH environment variable)?

Tried different folders, different versions, different paths, etc.

Not sure what else I can do except try to wipe windows and start over.

Would love to find a solution that isn't that!
I ran into the same problem. Here is what I did to fix it. I hope this helps!



Run the command below **in PowerShell**. The output should give you an idea of where the problem is coming from.

Get-ExecutionPolicy -List

If your problem is coming from the Group Policy (like mine does), then the following steps should fix it.

Open up Control Panel > Administrative Tools > Edit Group Policy

Then do the steps below for the following sections
1. Computer Configuration > Administrative Templates > All Settings
2. User Configuration > Administrative Templates > All Settings

Steps
1. Select "Turn on Script Execution"
2. Click "Enabled"
3. Under Options / Execution Policy, select "Allow all scripts"
4. Press OK

After completing all the steps, run the command below in a PowerShell with elevated privileges.
Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\PowerShell -Name ExecutionPolicy -Value Bypass


References

[1] Microsoft documentation on PowerShell execution policies:
http://go.microsoft.com/fwlink/?LinkID=135170
[2] Random article documenting the location of the policy:
https://4sysops.com/archives/set-powershell-execution-policy-with-group-policy/
[3] Random article documenting the PowerShell command for the registry tweak:
https://absolute-sharepoint.com/2014/03/change-powershell-machinepolicy-execution-policy-windows-server-2012r2.html
I just now fixed my gclient issue by reverting this recent change to git_bootstrap.py:
	229ac2b Revert "Revert "Stop adhoc cipd client bootstrap.""

That change had removed a call to recipe_modules/cipd/resources/bootstrap.py

After that running gclient got past the "cipd.ps1 is not digitally signed" error.  I then experienced a "failed to rename" error, but got past that by disabling McAfee ( issue 652585 ).

I'm running "fetch chromium" now (fingers crossed).
Components: -Infra Infra>SDK
Did reverting the revert of the revert(r229ac2bb535ca62b00a91778e07833175f0b761a) help at all?
Yes.
Status: Fixed (was: Unconfirmed)

Sign in to add a comment