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

Electron-rebuild error on Theia 1.15.0 #9816

Closed
cenkce opened this issue Aug 2, 2021 · 8 comments
Closed

Electron-rebuild error on Theia 1.15.0 #9816

cenkce opened this issue Aug 2, 2021 · 8 comments
Labels
electron issues related to the electron target

Comments

@cenkce
Copy link

cenkce commented Aug 2, 2021

Bug Description:,

I received an error when build using [email protected]

Steps to Reproduce:

  1. Upgrade theia modules to 1.5.0
  2. install modules
  3. Run theia rebuild:electron
Log
An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.9.6 found at "C:\Python39\python.exe"
gyp info find VS using VS2019 (16.10.31424.327) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python39\python.exe
gyp info spawn args [
gyp info spawn args   'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\elect
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\keyta
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\elect
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\90532\\.electron-gyp\\9.3.2\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\90532\\.electron-gyp\\9.3.2',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\90532\\Documents\\smartface-electron-ide\\node
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\90532\\\\.electron-gyp\\\\9.3.2\\\\<(targ
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\90532\\Documents\\smartface-electron-ide\\n
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\keyta
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\B
gyp info spawn args [
gyp info spawn args   'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
Building the projects in this solution one at a time. To enable parallel build, please add the 
  async.cc
  main.cc
  keytar_win.cc
  win_delay_load_hook.cc
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electro
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apiifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elec
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apitifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-ele
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electr
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apiifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-ele
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apitifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-el
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\C
gyp ERR! stack     at ChildProcess.onExit (C:\Users\90532\Documents\smartface-electron-ide\node
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\90532\\Documents\\smartface-in\\node-gyp.js" "rebuild" "--target=9.3.2" "--arch=x64" "--dist-url=https://www.electronjs.org
gyp ERR! cwd C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar
gyp ERR! node -v v12.20.2
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok

Failed with exit code: 1

Error: gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.9.6 found at "C:\Python39\python.exe"
gyp info find VS using VS2019 (16.10.31424.327) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Python39\python.exe
gyp info spawn args [
gyp info spawn args   'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\elect
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\keyta
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\elect
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\90532\\.electron-gyp\\9.3.2\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\90532\\.electron-gyp\\9.3.2',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\90532\\Documents\\smartface-electron-ide\\node
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\90532\\\\.electron-gyp\\\\9.3.2\\\\<(targ
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\90532\\Documents\\smartface-electron-ide\\n
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\90532\\Documents\\smartface-electron-ide\\node_modules\\keyta
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\B
gyp info spawn args [
gyp info spawn args   'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64'
gyp info spawn args ]
Building the projects in this solution one at a time. To enable parallel build, please add the 
  async.cc
  main.cc
  keytar_win.cc
  win_delay_load_hook.cc
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electro
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apiifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elec
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-elect
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apitifier not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-ele
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\main.cc) [C:\Users\90532\Documents\smartface-electron
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electr
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apiifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-ele
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-elec
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apitifier not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-el
C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar\node_modules\node-addon-apir not found (compiling source file ..\src\async.cc) [C:\Users\90532\Documents\smartface-electro
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\C
gyp ERR! stack     at ChildProcess.onExit (C:\Users\90532\Documents\smartface-electron-ide\node
gyp ERR! stack     at ChildProcess.emit (events.js:314:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\90532\\Documents\\smartface-in\\node-gyp.js" "rebuild" "--target=9.3.2" "--arch=x64" "--dist-url=https://www.electronjs.org
gyp ERR! cwd C:\Users\90532\Documents\smartface-electron-ide\node_modules\keytar
gyp ERR! node -v v12.20.2
gyp ERR! node-gyp -v v6.1.0
gyp ERR! not ok

Additional Information

  • Operating System: Windows 10
  • Theia Version: 1.5.0
  • Nodejs: 12.20.2
@vince-fugnitto
Copy link
Member

@cenkce can you confirm if 1.16.0 had the same error? In 1.16.0 we downgraded the version of keytar for broader compatibility:

Alternatively you can add a resolution to pin the version of keytar being used.

@vince-fugnitto vince-fugnitto added the electron issues related to the electron target label Aug 2, 2021
@cenkce
Copy link
Author

cenkce commented Aug 2, 2021

yarn also gives an error for 1.16.0

error https://registry.yarnpkg.com/@theia/cli/-/cli-1.16.0.tgz: Integrity check failed for "@theia/cli" (computed integrity doesn't match our records, got "sha512-biIq7Pjl7MGO3nV7G5aJ1uymTDnJOJZtK4Z0IMWSqL59mD+PUvqvTBpPa7nyr1RJdcmPWWs2x9PG8Qube5pSvg== sha1-NMV0DQ4fhmusQLA56tAss/MMUB0=")
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@vince-fugnitto
Copy link
Member

yarn also gives an error for 1.16.0

error https://registry.yarnpkg.com/@theia/cli/-/cli-1.16.0.tgz: Integrity check failed for "@theia/cli" (computed integrity doesn't match our records, got "sha512-biIq7Pjl7MGO3nV7G5aJ1uymTDnJOJZtK4Z0IMWSqL59mD+PUvqvTBpPa7nyr1RJdcmPWWs2x9PG8Qube5pSvg== sha1-NMV0DQ4fhmusQLA56tAss/MMUB0=")
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

The error seems unrelated to the actual problem, can you try:

  • upgrade the deps to 1.16.0
  • git clean -ffdx
  • perform yarn (ensure the yarn.lock is properly updated to 1.16.0)
  • yarn rebuild:electron or yarn rebuild:browser should work

I verified myself using master and everything seems to work correctly.

@cenkce
Copy link
Author

cenkce commented Aug 2, 2021

It's caused by yarn-lock clear it then installed all modules

@cenkce
Copy link
Author

cenkce commented Aug 2, 2021

Rebuild success on 1.16.0

@vince-fugnitto
Copy link
Member

Rebuild success on 1.16.0

Thanks for the follow-up! As for 1.15.0 it might just be that keytar needs a resolution like so:

"resolutions": {
  "**/keytar": "7.6.0",
}

@cenkce
Copy link
Author

cenkce commented Aug 2, 2021

Thanks

@vince-fugnitto
Copy link
Member

@cenkce please feel free to close the issue if its resolved, or comment if the problems persist 👍

@cenkce cenkce changed the title Electron-rebuild error on Theia 1.5.0 Electron-rebuild error on Theia 1.15.0 Aug 2, 2021
@cenkce cenkce closed this as completed Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target
Projects
None yet
Development

No branches or pull requests

2 participants