New issue
Advanced search Search tips

Issue 666586 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocking:
issue 659726



Sign in to add a comment

Public Mac checkout is broken for Googlers

Project Member Reported by lgar...@chromium.org, Nov 18 2016

Issue description

Chrome 56.0.2914.3
OSX 10.11.6

What steps will reproduce the problem?
(1) Install depot_tools
(2) `fetch chromium`
(3)

What is the expected result?
chromium is fetched

What happens instead?
Running: gclient root
Running: gclient config --spec 'solutions = [
  {
    "url": "https://chromium.googlesource.com/chromium/src.git",
    "managed": False,
    "name": "src",
    "deps_file": ".DEPS.git",
    "custom_deps": {},
  },
]
'
Running: gclient sync
Error: Command '/usr/bin/python src/build/mac_toolchain.py' returned non-zero exit status 1 in /Users/lgarron/chromium
Traceback (most recent call last):
  File "/Users/lgarron/Code/depot_tools/fetch.py", line 300, in <module>
    sys.exit(main())
  File "/Users/lgarron/Code/depot_tools/fetch.py", line 295, in main
    return run(options, spec, root)
  File "/Users/lgarron/Code/depot_tools/fetch.py", line 289, in run
    return checkout.init()
  File "/Users/lgarron/Code/depot_tools/fetch.py", line 132, in init
    self.run_gclient(*sync_cmd)
  File "/Users/lgarron/Code/depot_tools/fetch.py", line 76, in run_gclient
    return self.run(cmd_prefix + cmd, **kwargs)
  File "/Users/lgarron/Code/depot_tools/fetch.py", line 66, in run
    return subprocess.check_output(cmd, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('gclient', 'sync')' returned non-zero exit status 2

jparent@: I can't find the right component for this; could you triage?
 
Labels: -Pri-3 OS-Mac Pri-1
Status: Assigned (was: Asss)
Cc: aga...@chromium.org
Components: -Infra Infra>SDK
Owner: ----
Owner: erikc...@chromium.org
Actually, I just realized the failure is in src/build/mac_toolchain.py
Oh, trying to run it directly doesn't succeed because it shows this:

src/build/mac_toolchain.py
You are attempting to access protected data with no configured
credentials. Please visit https://cloud.google.com/console#/project
and sign up for an account, and then run the "gsutil config" command
to configure gsutil to use these credentials.
Access to gs://chrome-mac-sdk/ not configured.
-----------------------------------------------------------------

You appear to be a Googler.

I'm sorry for the hassle, but you need to do a one-time manual
authentication. Please run:

    download_from_google_storage --config

and follow the instructions.

NOTE 1: Use your google.com credentials, not chromium.org.
NOTE 2: Enter 0 when asked for a "project-id".

-----------------------------------------------------------------

So much for me trying to start with a public checkout. 😕
Summary: Public Mac checkout is broken for Googlers (was: Mac checkout is broken)
Blocking: 659726
Are you not getting the right error message when you run gclient sync and the script fails?

What's this bug about?
The initial fetch fails, printing only the stacktrace in the first bug.
Just to be extra clear, this is before the checkout is successful, which means that running `gclient sync` does not make sense yet.
You're in the "gclient sync" part of the initial checkout. When it fails, you should be able to set up credentials, and then run "gclient sync" again and get everything working. This should be the same as Windows.
> When it fails, you should be able to set up credentials, and then run "gclient sync" again and get everything working. This should be the same as Windows.

Yes, but
1) the process fails
2) it fails only after a few minutes, and I can't resume (#230691, #411783)
3) it doesn't tell me why (just throws  stacktrace), and
4) None of the instructions told me I should set up those credentials.

If my goal is to do a public checkout (on any computer), I expect `fetch chromium` to work without any further interaction. Or at least it should guide me through anything I need to do.

Else, the build[1]/checkout[2] instructions should clearly state when I need to set up my credentials.

[1] https://chromium.googlesource.com/chromium/src/+/master/docs/mac_build_instructions.md
[2] https://www.chromium.org/developers/how-tos/get-the-code
Looks like the issue is probably also present on Windows, but the documentation is up to date:
https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md

"""
Google employees

Run: download_from_google_storage --config and follow the authentication instructions. Note that you must authenticate with your @google.com credentials, not @chromium.org. Enter “0” if asked for a project-id.

Run: gclient sync again to download and install the toolchain automatically.

The toolchain will be in depot_tools\win_toolchain\vs_files\<hash>, and windbg can be found in depot_tools\win_toolchain\vs_files\<hash>\win_sdk\Debuggers.

If you want the IDE for debugging and editing, you will need to install it separately, but this is optional and not needed to build Chromium.
"""
Cc: dpranke@chromium.org erikc...@chromium.org
 Issue 667994  has been merged into this issue.
Owner: dpranke@chromium.org
I'm reworking all of the build instructions so I'll take this.
Labels: -Pri-1 Pri-2
Status: Started (was: Assigned)
The fetch command has actually been fixed, so this is lower priority; I'm moving it to P2.
Issue 726042 has been merged into this issue.
Status: Fixed (was: Started)
I think the docs have mostly been updated, and the mac_toolchain.py script should print out a more helpful error in this case as well. Marking as closed; let me know if there's more you'd like to see here.
Cc: borisv@chromium.org
borisv just ran into this problem. Apparently the error message is still unclear on a new checkout for google devices?

"""
borisv [2:59 PM] 
Error: Command '/usr/bin/python src/build/mac_toolchain.py' returned non-zero exit status 1 in /Users/borisv/chromium
Traceback (most recent call last):
 File "/Users/borisv/depot_tools/fetch.py", line 299, in <module>
   sys.exit(main())
 File "/Users/borisv/depot_tools/fetch.py", line 294, in main
   return run(options, spec, root)
 File "/Users/borisv/depot_tools/fetch.py", line 288, in run
   return checkout.init()
 File "/Users/borisv/depot_tools/fetch.py", line 131, in init
   self.run_gclient(*sync_cmd)
 File "/Users/borisv/depot_tools/fetch.py", line 78, in run_gclient
   return self.run(cmd_prefix + cmd, **kwargs)
 File "/Users/borisv/depot_tools/fetch.py", line 68, in run
   return subprocess.check_output(cmd, **kwargs)
 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
   raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('gclient', 'sync')' returned non-zero exit status 2


[2:59] 
The command I ran was "fetch chromium"


[3:00] 
... deleting chromium and starting over again...
"""

[The problem was missing .boto file, which running the script directly helps set up]

Sign in to add a comment