Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gclient sync fails in local workspace (Windows 10 & linux) at electron_npm_deps #21835

Closed
muraliran opened this issue Jan 19, 2020 · 3 comments
Closed

Comments

@muraliran
Copy link

Preflight Checklist

  • [x ] I have read the Contributing Guidelines for this project.
  • [x ] I agree to follow the Code of Conduct that this project adheres to.
  • [x ] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:

    • v8.0.0-beta.7
  • Operating System:

    • Windows 10
  • Last Known Working Electron version:

    • n/a

Expected Behavior

The initial gclient sync from electron-gn folder worked fine. Subsequently the generation of out/Testing also worked as expected. Then attempted to generate out/Release using
gn gen out/Release --args="import("//electron/build/args/release.gn")"
It failed

Actual Behavior

Get the following error:
$ gn gen out/Testing --args="import("//electron/build/args/testing.gn")"
Done. Made 11628 targets from 2093 files in 24802ms

muralir-hf@AWare14 MINGW64 ~/sdev/opensource/electron-gn/src ((390f7c2015bd...))
$ gn gen out/Release --args="import("//electron/build/args/release.gn")"
ERROR at //tools/resources/generate_resource_whitelist.gni:44:16: Assignment had no effect.
metadata = {
^
You set the variable "metadata" here and it was unused before it went
out of scope.
See //chrome/BUILD.gn:1811:3: whence it was called.
generate_resource_whitelist("resource_whitelist") {
^--------------------------------------------------
See //BUILD.gn:102:7: which caused the file to be included.
"//chrome",
^---------

To Reproduce

It should repro with current electron repo. My fork is this:
https://github.com/muraliran/electron

Screenshots

Additional Information

Then if I go back to electron-gn folder and try do gclient sync, it gives the following error
..
...
Applying: fix: call InitializeContextRuntime in InitializeContext
Applying: refactor: TransferrableModule is deprecated, use CompiledWasmModule instead
Hook 'vpython.bat src/electron/script/apply_all_patches.py src/electron/patches/config.json' took 64.42 secs
Running hooks: 3% ( 3/87) electron_npm_deps
________ running 'vpython.bat -c import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python", "script/lib/npx.py", "yarn@1.15.2", "install", "--frozen-lockfile"]);' in 'C:\Users\muralir-hf\sdev\opensource\electron-gn'
Traceback (most recent call last):
File "script/lib/npx.py", line 18, in
npx(*sys.argv[1:])
File "script/lib/npx.py", line 7, in npx
subprocess.check_call(call_args)
File "C:\Users\muralir-hf\sdev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\subprocess.py", line 185, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Users\muralir-hf\sdev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "C:\Users\muralir-hf\sdev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\subprocess.py", line 394, in init
errread, errwrite)
File "C:\Users\muralir-hf\sdev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\muralir-hf\sdev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', 'script/lib/npx.py', 'yarn@1.15.2', 'install', '--frozen-lockfile']' returned non-zero exit status 1
Error: Command 'vpython.bat -c import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python", "script/lib/npx.py", "yarn@1.15.2", "install", "--frozen-lockfile"]);' returned non-zero exit status 1 in C:\Users\muralir-hf\sdev\opensource\electron-gn

My environment has "python" configured as python2.7 and "python3" call is configured for python 3.8.1

@muraliran
Copy link
Author

muraliran commented Jan 20, 2020

Just doing gclient sync on electron/electron master branch also fails:

Applying: refactor: TransferrableModule is deprecated, use CompiledWasmModule instead Applying: enable 31 bit smis on 64bit arch and ptr compression Applying: fix: remove unused llhttp variables Applying: fix: include libuv header in node_binding Applying: remove deprecated task API override removed in latest v8 Hook 'vpython.bat src/electron/script/apply_all_patches.py src/electron/patches/config.json' took 83.24 secs Running hooks: 2% ( 2/89) electron_external_binaries ________ running 'python3 src/electron/script/update-external-binaries.py' in 'C:\Users\muralir-hf\sdev\osdev\electron-gn' Downloading https://github.com/electron/electron-frameworks/releases/download/v1.4.1/directxsdk-x64.zip to C:\Users\MURALI~1\AppData\Local\Temp\electron-b13w1am7\directxsdk-x64.zip Download directxsdk-x64.zip 1806291 [180629100.0%] Downloading https://github.com/electron/electron-frameworks/releases/download/v1.4.1/sccache-win32-x64.zip to C:\Users\MURALI~1\AppData\Local\Temp\electron-w7xq52px\sccache-win32-x64.zip Download sccache-win32-x64.zip 4151947 [103798675.0%] Downloading https://github.com/electron/electron-frameworks/releases/download/v1.4.1/goma-win.zip to C:\Users\MURALI~1\AppData\Local\Temp\electron-09ks03uq\goma-win.zip Download goma-win.zip 52486903 [1049738060.0%] Hook 'python3 src/electron/script/update-external-binaries.py' took 10.48 secs Running hooks: 3% ( 3/89) electron_npm_deps ________ running 'vpython.bat -c import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python", "script/lib/npx.py", "yarn@1.15.2", "install", "--frozen-lockfile"]);' in 'C:\Users\muralir-hf\sdev\osdev\electron-gn' Traceback (most recent call last): File "script/lib/npx.py", line 18, in <module> npx(*sys.argv[1:]) File "script/lib/npx.py", line 7, in npx subprocess.check_call(call_args) File "C:\Users\muralir-hf\sdev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\subprocess.py", line 185, in check_call retcode = call(*popenargs, **kwargs) File "C:\Users\muralir-hf\sdev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\subprocess.py", line 172, in call return Popen(*popenargs, **kwargs).wait() File "C:\Users\muralir-hf\sdev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\subprocess.py", line 394, in __init__ errread, errwrite) File "C:\Users\muralir-hf\sdev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\subprocess.py", line 644, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\muralir-hf\sdev\depot_tools\bootstrap-3_8_0_chromium_8_bin\python\bin\Lib\subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['python', 'script/lib/npx.py', 'yarn@1.15.2', 'install', '--frozen-lockfile']' returned non-zero exit status 1 Error: Command 'vpython.bat -c import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python", "script/lib/npx.py", "yarn@1.15.2", "install", "--frozen-lockfile"]);' returned non-zero exit status 1 in C:\Users\muralir-hf\sdev\osdev\electron-gn

@muraliran muraliran changed the title gclient sync fails in local workspace gclient sync fails in local workspace (Windows 10) Jan 21, 2020
@codebytere
Copy link
Member

Please use https://github.com/electron/build-tools and open further issues there!

@muraliran muraliran changed the title gclient sync fails in local workspace (Windows 10) gclient sync fails in local workspace (Windows 10) at electron_npm_deps Jan 21, 2020
@muraliran muraliran changed the title gclient sync fails in local workspace (Windows 10) at electron_npm_deps gclient sync fails in local workspace (Windows 10 & linux) at electron_npm_deps Jan 21, 2020
@muraliran
Copy link
Author

This is not a build tools issue. It is the layout of the files in recent history.

(both windows and linux):
There is no path to npx.cmd which is at ./third_party/electron_node/deps/npm/bin/npx.cmd

If the path is forcefully set in the shell it runs, then the file npm-cli.js is in wrong location.
It is NOT at ./third_party/electron_node/deps/npm/bin/node_modules/npm/bin/npm-cli.js
but it is at ./third_party/electron_node/deps/npm/bin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants