build-tools: Windows toolchain out of date or doesn't exist, updating (Pro) error on e sync

________ running 'python3 src/build/landmines.py' in 'C:\Users\c\Desktop\r\electron'
________ running 'python3 src/third_party/depot_tools/update_depot_tools_toggle.py --disable' in 'C:\Users\c\Desktop\r\electron'
________ running 'python3 src/tools/remove_stale_pyc_files.py src/android_webview/tools src/build/android src/gpu/gles2_conform_support src/infra src/ppapi src/printing src/third_party/blink/renderer/build/scripts src/third_party/blink/tools src/third_party/catapult src/tools' in 'C:\Users\c\Desktop\r\electron'
________ running 'python3 src/build/vs_toolchain.py update --force' in 'C:\Users\c\Desktop\r\electron'
Windows toolchain out of date or doesn't exist, updating (Pro)...
  current_hashes:
  desired_hash: e146e01913
Traceback (most recent call last):
  File "C:\Users\c\Desktop\r\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 608, in <module>
    sys.exit(main())
  File "C:\Users\c\Desktop\r\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 547, in main
    DoTreeMirror(toolchain_target_dir, args.desired_hash)
  File "C:\Users\c\Desktop\r\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 363, in DoTreeMirror
    temp_dir, local_zip = DownloadUsingHttp(tree_sha1 + '.zip')
  File "C:\Users\c\Desktop\r\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 313, in DownloadUsingHttp
    import urlparse
ModuleNotFoundError: No module named 'urlparse'
Traceback (most recent call last):
  File "src/build/vs_toolchain.py", line 573, in <module>
    sys.exit(main())
  File "src/build/vs_toolchain.py", line 569, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "src/build/vs_toolchain.py", line 517, in Update
    subprocess.check_call(get_toolchain_args)
  File "C:\Users\c\.electron_build_tools\third_party\depot_tools\bootstrap-2@3_8_10_chromium_19_bin\python3\bin\lib\subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\c\\.electron_build_tools\\third_party\\depot_tools\\bootstrap-2@3_8_10_chromium_19_bin\\python3\\bin\\python3.exe', 'C:\\Users\\c\\Desktop\\r\\electron\\src\\third_party\\depot_tools\\win_toolchain\\get_toolchain_if_necessary.py', '--output-json', 'C:\\Users\\c\\Desktop\\r\\electron\\src\\build\\win_toolchain.json', 'e146e01913', '--force']' returned non-zero exit status 1.
Error: Command 'python3 src/build/vs_toolchain.py update --force' returned non-zero exit status 1 in C:\Users\c\Desktop\r\electron
Windows toolchain out of date or doesn't exist, updating (Pro)...
  current_hashes:
  desired_hash: e146e01913
Traceback (most recent call last):
  File "C:\Users\c\Desktop\r\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 608, in <module>
    sys.exit(main())
  File "C:\Users\c\Desktop\r\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 547, in main
    DoTreeMirror(toolchain_target_dir, args.desired_hash)
  File "C:\Users\c\Desktop\r\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 363, in DoTreeMirror
    temp_dir, local_zip = DownloadUsingHttp(tree_sha1 + '.zip')
  File "C:\Users\c\Desktop\r\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 313, in DownloadUsingHttp
    import urlparse
ModuleNotFoundError: No module named 'urlparse'
Traceback (most recent call last):
  File "src/build/vs_toolchain.py", line 573, in <module>
    sys.exit(main())
  File "src/build/vs_toolchain.py", line 569, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "src/build/vs_toolchain.py", line 517, in Update
    subprocess.check_call(get_toolchain_args)
  File "C:\Users\c\.electron_build_tools\third_party\depot_tools\bootstrap-2@3_8_10_chromium_19_bin\python3\bin\lib\subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\c\\.electron_build_tools\\third_party\\depot_tools\\bootstrap-2@3_8_10_chromium_19_bin\\python3\\bin\\python3.exe', 'C:\\Users\\c\\Desktop\\r\\electron\\src\\third_party\\depot_tools\\win_toolchain\\get_toolchain_if_necessary.py', '--output-json', 'C:\\Users\\c\\Desktop\\r\\electron\\src\\build\\win_toolchain.json', 'e146e01913', '--force']' returned non-zero exit status 1.

ERROR Error: Command failed: python C:\Users\c\.electron_build_tools\third_party\depot_tools\gclient.py sync --with_branch_heads --with_tags -vv
    at checkExecSyncError (child_process.js:643:11)
    at Object.execFileSync (child_process.js:661:15)
    at Object.depotExecFileSync [as execFileSync] (C:\Users\c\.electron_build_tools\src\utils\depot-tools.js:118:16)
    at runGClientSync (C:\Users\c\.electron_build_tools\src\e-sync.js:54:9)
    at Object.<anonymous> (C:\Users\c\.electron_build_tools\src\e-sync.js:76:3)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)

Hi, I am getting the above error when running e sync.

Anyone facing the same issue or can suggest a solution?

I am sure I have all the prerequisites installed. I tried a fresh installation following all the instructions from scratch on two different machines already.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 17 (4 by maintainers)

Most upvoted comments

I found the solution.

If you have already created the Visual Studio build environment manually Building Chromium for Windows

Next you can try this:

Check out your evn file at %USERPROFILE%\.electron_build_tools\configs\evm.xxxx.json

...
  "env": {
    "CHROMIUM_BUILDTOOLS_PATH": ".......",
    "GIT_CACHE_PATH": ".........",
    "DEPOT_TOOLS_WIN_TOOLCHAIN": 0 # <--  + Add this line!!!
  }
...

Build tools should now pull in the right toolchain. Please run e check-for-updates to get the latest build tools

@ChrisPei That’s not the right solution here, we do explicitly want the toolchain. Electron just hasn’t published the most recent one yet, we’re working on it. Hopefully we’ll have this updated tomorrow

I am having the same issue:

Applying: fix: -Wincompatible-pointer-types-discards-qualifiers error
Applying: fix: add v8_enable_reverse_jsargs defines in common.gypi
Applying: fix: allow preventing InitializeInspector in env
Applying: src: allow embedders to provide a custom PageAllocator to NodePlatform
Applying: fix crypto tests to run with bssl
Applying: fix: handle new ToString() behavior in v8 serdes test
Applying: src: remove extra semis from member fns
Applying: src: add NODE_USE_V8_PLATFORM in InitializeOncePerProcess
Applying: tls: tweak clientCertEngine argument parsing
Applying: src: add get/set pair for unhandled rejections mode
Applying: fix: account for debugger agent race condition
Applying: build: add GN config
Applying: fix: ensure that self is retained until the RACSignal is complete
Applying: Remove MTLManagedObjectAdapter.h
Applying: build: conditionally import EXT headers from framework or from relative path
Hook 'python3 src/electron/script/apply_all_patches.py src/electron/patches/config.json' took 361.42 secs
________ running 'python3 src/electron/script/patches-mtime-cache.py apply --cache-file src/electron/patches/mtime-cache.json' in 'C:\Users\A\Desktop\storme 1.0\electron\electron'
________ running 'python3 -c import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python3", "script/lib/npx.py", "yarn@1.15.2", "install", "--frozen-lockfile"]);' in 'C:\Users\A\Desktop\storme 1.0\electron\electron'
yarn install v1.15.2
$ node -e 'process.exit(0)'
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "win32" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.3: The platform "win32" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > eslint-config-standard@14.1.1" has unmet peer dependency "eslint-plugin-promise@>=4.2.1".
[4/4] Building fresh packages...
$ husky install
husky - Git hooks installed
Done in 40.72s.
Hook 'python3 -c 'import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python3", "script/lib/npx.py", "yarn@1.15.2", "install", "--frozen-lockfile"]);'' took 43.08 secs
________ running 'python3 src/build/landmines.py' in 'C:\Users\A\Desktop\storme 1.0\electron\electron'
________ running 'python3 src/third_party/depot_tools/update_depot_tools_toggle.py --disable' in 'C:\Users\A\Desktop\storme 1.0\electron\electron'
________ running 'python3 src/tools/remove_stale_pyc_files.py src/android_webview/tools src/build/android src/gpu/gles2_conform_support src/infra src/ppapi src/printing src/third_party/blink/renderer/build/scripts src/third_party/blink/tools src/third_party/catapult src/tools' in 'C:\Users\A\Desktop\storme 1.0\electron\electron'
________ running 'python3 src/build/vs_toolchain.py update --force' in 'C:\Users\A\Desktop\storme 1.0\electron\electron'
Windows toolchain out of date or doesn't exist, updating (Pro)...
  current_hashes:
  desired_hash: e146e01913
Traceback (most recent call last):
  File "C:\Users\A\Desktop\storme 1.0\electron\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 608, in <module>
    sys.exit(main())
  File "C:\Users\A\Desktop\storme 1.0\electron\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 547, in main
    DoTreeMirror(toolchain_target_dir, args.desired_hash)
  File "C:\Users\A\Desktop\storme 1.0\electron\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 363, in DoTreeMirror
    temp_dir, local_zip = DownloadUsingHttp(tree_sha1 + '.zip')
  File "C:\Users\A\Desktop\storme 1.0\electron\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 313, in DownloadUsingHttp
    import urlparse
ModuleNotFoundError: No module named 'urlparse'
Traceback (most recent call last):
  File "src/build/vs_toolchain.py", line 573, in <module>
    sys.exit(main())
  File "src/build/vs_toolchain.py", line 569, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "src/build/vs_toolchain.py", line 517, in Update
    subprocess.check_call(get_toolchain_args)
  File "C:\Users\A\.electron_build_tools\third_party\depot_tools\bootstrap-2@3_8_10_chromium_19_bin\python3\bin\lib\subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\A\\.electron_build_tools\\third_party\\depot_tools\\bootstrap-2@3_8_10_chromium_19_bin\\python3\\bin\\python3.exe', 'C:\\Users\\A\\Desktop\\storme 1.0\\electron\\electron\\src\\third_party\\depot_tools\\win_toolchain\\get_toolchain_if_necessary.py', '--output-json', 'C:\\Users\\A\\Desktop\\storme 1.0\\electron\\electron\\src\\build\\win_toolchain.json', 'e146e01913', '--force']' returned non-zero exit status 1.
Error: Command 'python3 src/build/vs_toolchain.py update --force' returned non-zero exit status 1 in C:\Users\A\Desktop\storme 1.0\electron\electron
Windows toolchain out of date or doesn't exist, updating (Pro)...
  current_hashes:
  desired_hash: e146e01913
Traceback (most recent call last):
  File "C:\Users\A\Desktop\storme 1.0\electron\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 608, in <module>
    sys.exit(main())
  File "C:\Users\A\Desktop\storme 1.0\electron\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 547, in main
    DoTreeMirror(toolchain_target_dir, args.desired_hash)
  File "C:\Users\A\Desktop\storme 1.0\electron\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 363, in DoTreeMirror
    temp_dir, local_zip = DownloadUsingHttp(tree_sha1 + '.zip')
  File "C:\Users\A\Desktop\storme 1.0\electron\electron\src\third_party\depot_tools\win_toolchain\get_toolchain_if_necessary.py", line 313, in DownloadUsingHttp
    import urlparse
ModuleNotFoundError: No module named 'urlparse'
Traceback (most recent call last):
  File "src/build/vs_toolchain.py", line 573, in <module>
    sys.exit(main())
  File "src/build/vs_toolchain.py", line 569, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "src/build/vs_toolchain.py", line 517, in Update
    subprocess.check_call(get_toolchain_args)
  File "C:\Users\A\.electron_build_tools\third_party\depot_tools\bootstrap-2@3_8_10_chromium_19_bin\python3\bin\lib\subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\A\\.electron_build_tools\\third_party\\depot_tools\\bootstrap-2@3_8_10_chromium_19_bin\\python3\\bin\\python3.exe', 'C:\\Users\\A\\Desktop\\storme 1.0\\electron\\electron\\src\\third_party\\depot_tools\\win_toolchain\\get_toolchain_if_necessary.py', '--output-json', 'C:\\Users\\A\\Desktop\\storme 1.0\\electron\\electron\\src\\build\\win_toolchain.json', 'e146e01913', '--force']' returned non-zero exit status 1.

ERROR Error: Command failed: python C:\Users\A\.electron_build_tools\third_party\depot_tools\gclient.py sync --with_branch_heads --with_tags -vv
    at checkExecSyncError (child_process.js:616:11)
    at Object.execFileSync (child_process.js:634:15)
    at Object.depotExecFileSync [as execFileSync] (C:\Users\A\.electron_build_tools\src\utils\depot-tools.js:118:16)
    at runGClientSync (C:\Users\A\.electron_build_tools\src\e-sync.js:54:9)
    at Object.<anonymous> (C:\Users\A\.electron_build_tools\src\e-sync.js:76:3)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)

OS Name: Microsoft Windows 10 Pro Version: 10.0.19042 Build 19042