build-tools
build-tools copied to clipboard
Error when running 'e init --root=~/electron --bootstrap testing'
I've retried the command after rm -rf
ing the generated electron folder and removing the evm.testing.json
about 3 times and it's returned the same result.
I installed @electron/build-tools
using yarn global
and my python version is 3.9.1.
I've tried restarting my machine and re-running the command.
Any help?
Done. Made 16268 targets from 2597 files in 7594ms
Running "ninja -j 200 electron" in $HOME/electron/src/out/Testing
[2179/40047] ACTION //third_party/electron_node/src/inspector:node_protocol_json(//build/toolchain/mac:clang_x64)
FAILED: gen/third_party/electron_node/src/inspector/src/node_protocol.json
python ../../v8/third_party/inspector_protocol/convert_protocol_to_json.py gen/third_party/electron_node/src/inspector/node_protocol.pdl gen/third_party/electron_node/src/inspector/src/node_protocol.json
Traceback (most recent call last):
File "$HOME/electron/src/out/Testing/../../v8/third_party/inspector_protocol/convert_protocol_to_json.py", line 35, in <module>
sys.exit(main(sys.argv[1:]))
File "$HOME/electron/src/out/Testing/../../v8/third_party/inspector_protocol/convert_protocol_to_json.py", line 30, in main
json.dump(protocol, output_file, indent=4, separators=(',', ': '))
File "$HOME/.pyenv/versions/3.9.1/lib/python3.9/json/__init__.py", line 180, in dump
fp.write(chunk)
TypeError: a bytes-like object is required, not 'str'
[2378/40047] CC obj/third_party/libvpx/libvpx/intrapred.o
ninja: build stopped: subcommand failed.
ERROR Error: Command failed: ninja -j 200 electron
at checkExecSyncError (node:child_process:636:11)
at Object.execFileSync (node:child_process:654:15)
at Object.depotExecFileSync [as execFileSync] ($HOME/.electron_build_tools/src/utils/depot-tools.js:117:16)
at runNinja ($HOME/.electron_build_tools/src/e-build.js:78:9)
at Object.<anonymous> ($HOME/.electron_build_tools/src/e-build.js:136:3)
at Module._compile (node:internal/modules/cjs/loader:1083:30)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
at Module.load (node:internal/modules/cjs/loader:948:32)
at Function.Module._load (node:internal/modules/cjs/loader:789:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
ERROR Error: Command failed: /usr/local/Cellar/node/15.0.1/bin/node $HOME/.electron_build_tools/src/e build
at checkExecSyncError (node:child_process:636:11)
at Object.execFileSync (node:child_process:654:15)
at Object.<anonymous> ($HOME/.electron_build_tools/src/e-init.js:211:18)
at Module._compile (node:internal/modules/cjs/loader:1083:30)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
at Module.load (node:internal/modules/cjs/loader:948:32)
at Function.Module._load (node:internal/modules/cjs/loader:789:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
at node:internal/main/run_main_module:17:47
So re-reading the build instructions
I realized maybe I'm supposed to use python2.7.
I didn't even get to 2378 after I switched to using pyenv, so I used both versions by pyenv global 3.9.1 2.7.17
I ended up with an error related to not having python2.7
command.
I added the following line to my .zshrc
alias python2.7='~/.pyenv/versions/2.7.17/bin/python2.7'
and I had high hopes when it got passed 2378 but I got the next error and I'm stuck again.
[0/1] Regenerating ninja files
[3523/34882] ACTION //third_party/electron_node/src/inspector:node_protocol_json(//build/toolchain/mac:clang_x64)
FAILED: gen/third_party/electron_node/src/inspector/src/node_protocol.json
python ../../v8/third_party/inspector_protocol/convert_protocol_to_json.py gen/third_party/electron_node/src/inspector/node_protocol.pdl gen/third_party/electron_node/src/inspector/src/node_protocol.json
Traceback (most recent call last):
File "$HOME/electron/src/out/Testing/../../v8/third_party/inspector_protocol/convert_protocol_to_json.py", line 35, in <module>
sys.exit(main(sys.argv[1:]))
File "$HOME/electron/src/out/Testing/../../v8/third_party/inspector_protocol/convert_protocol_to_json.py", line 30, in main
json.dump(protocol, output_file, indent=4, separators=(',', ': '))
File "$HOME/.pyenv/versions/3.9.1/lib/python3.9/json/__init__.py", line 180, in dump
fp.write(chunk)
TypeError: a bytes-like object is required, not 'str'
[3720/34882] CXX obj/buildtools/third_party/libc++abi/libc++abi/cxa_demangle.o
ninja: build stopped: subcommand failed.
ERROR Error: Command failed: ninja -j 200 electron
at checkExecSyncError (node:child_process:636:11)
at Object.execFileSync (node:child_process:654:15)
at Object.depotExecFileSync [as execFileSync] ($HOME/.electron_build_tools/src/utils/depot-tools.js:117:16)
at runNinja ($HOME/.electron_build_tools/src/e-build.js:78:9)
at Object.<anonymous> ($HOME/.electron_build_tools/src/e-build.js:136:3)
at Module._compile (node:internal/modules/cjs/loader:1083:30)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
at Module.load (node:internal/modules/cjs/loader:948:32)
at Function.Module._load (node:internal/modules/cjs/loader:789:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
ERROR Error: Command failed: /usr/local/Cellar/node/15.0.1/bin/node $HOME/.electron_build_tools/src/e build
at checkExecSyncError (node:child_process:636:11)
at Object.execFileSync (node:child_process:654:15)
at Object.<anonymous> ($HOME/.electron_build_tools/src/e-init.js:211:18)
at Module._compile (node:internal/modules/cjs/loader:1083:30)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
at Module.load (node:internal/modules/cjs/loader:948:32)
at Function.Module._load (node:internal/modules/cjs/loader:789:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
at node:internal/main/run_main_module:17:47
Any help?
So after pretty much fiddling around the configuration I ended up with the exact same config as the one above but ended up with different results. I tried installing gclient using the depot_tools from chromium but I uninstalled it before trying the command again - but somehow ended up at a higher number. I noticed that keeping multiple applications open while installing possibly deters the installation so maybe that was the difference - I honestly have no idea
[0/1] Regenerating ninja files
[11547/39745] ACTION //electron:electron_xibs_compile_ibtool(//build/toolchain/mac:clang_x64)
FAILED: gen/electron/electron_xibs_compile_ibtool/MainMenu.nib
python ../../build/config/ios/compile_ib_files.py --input ../../electron/shell/common/resources/mac/MainMenu.xib --output gen/electron/electron_xibs_compile_ibtool/MainMenu.nib --minimum-deployment-target 10.11.0
2021-02-05 16:37:19.788 ibtoold[35393:987415] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition for extension Xcode.IBCocoaTouchBuildSupport.PlatformDefinition.MacCatalyst of plug-in com.apple.dt.IDE.IBCocoaBuildSupport
2021-02-05 16:37:19.788 ibtoold[35393:987415] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition for extension Xcode.IBCocoaBuildSupport.PlatformDefinition.Cocoa of plug-in com.apple.dt.IDE.IBCocoaBuildSupport
2021-02-05 16:37:19.873 ibtoold[35393:987415] [MT] DVTPlugInLoading: Failed to load code for plug-in com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration ($HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework), error = Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight($HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
Referenced from: $HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/Versions/A/IDEInterfaceBuilderCocoaTouchIntegration
Reason: image not found" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=$HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, NSDebugDescription=dlopen_preflight($HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
Referenced from: $HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/Versions/A/IDEInterfaceBuilderCocoaTouchIntegration
Reason: image not found, NSBundlePath=$HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework, NSLocalizedDescription=The bundle “IDEInterfaceBuilderCocoaTouchIntegration” couldn’t be loaded because it is damaged or missing necessary resources.}, dyldError = dlopen($HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, 0): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
Referenced from: $HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/Versions/A/IDEInterfaceBuilderCocoaTouchIntegration
Reason: image not found
2021-02-05 16:37:19.873 ibtoold[35393:987415] [MT] DVTPlugInExtensionFaulting: Failed to fire fault for extension Xcode.InterfaceBuilderKit.iOSIntegration.Singletons: Error Domain=DVTPlugInErrorDomain Code=2 "Loading a plug-in failed." UserInfo={DVTPlugInIdentifierErrorKey=com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration, DVTPlugInExecutablePathErrorKey=$HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, NSLocalizedRecoverySuggestion=The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled., DVTPlugInDYLDErrorMessageErrorKey=dlopen($HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, 0): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
Referenced from: $HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/Versions/A/IDEInterfaceBuilderCocoaTouchIntegration
Reason: image not found, NSLocalizedDescription=Loading a plug-in failed., NSFilePath=$HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework, NSLocalizedFailureReason=The plug-in “com.apple.dt.IDE.IDEInterfaceBuilderCocoaTouchIntegration” at path “$HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework” could not be loaded. The plug-in or one of its prerequisite plug-ins may be missing or damaged., NSUnderlyingError=0x7fe43f6b5420 {Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight($HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
Referenced from: $HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/Versions/A/IDEInterfaceBuilderCocoaTouchIntegration
Reason: image not found" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=$HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration, NSDebugDescription=dlopen_preflight($HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/IDEInterfaceBuilderCocoaTouchIntegration): Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
Referenced from: $HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework/Versions/A/IDEInterfaceBuilderCocoaTouchIntegration
Reason: image not found, NSBundlePath=$HOME/.electron_build_tools/third_party/Xcode/Xcode-12.2.0.app/Contents/PlugIns/IDEInterfaceBuilderCocoaTouchIntegration.framework, NSLocalizedDescription=The bundle “IDEInterfaceBuilderCocoaTouchIntegration” couldn’t be loaded because it is damaged or missing necessary resources.}}}
2021-02-05 16:37:19.876 ibtoold[35393:987415] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error getting value for parameter key 'name' of extension 'Xcode.InterfaceBuilderKit.iOSIntegration.Singletons' in plug-in 'com.apple.dt.IDE.IDEInterfaceBuilderiOSIntegration''
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2060e6af __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff203463c9 objc_exception_throw + 48
2 DVTFoundation 0x0000000109bd0893 -[DVTExtensionParameter valueForKey:error:] + 0
3 IDEInterfaceBuilderKit 0x0000000109296522 -[IBScopedSingletonRegistry init] + 698
4 IDEInterfaceBuilderKit 0x0000000109296253 __43+[IBScopedSingletonRegistry sharedInstance]_block_invoke + 16
5 libdispatch.dylib 0x00007fff202f17c7 _dispatch_client_callout + 8
6 libdispatch.dylib 0x00007fff202f296b _dispatch_once_callout + 20
7 IDEInterfaceBuilderKit 0x0000000109296241 +[IBScopedSingletonRegistry sharedInstance] + 46
8 IDEInterfaceBuilderKit 0x00000001090a09ea -[IBInterfaceBuilderPlugin init] + 134
9 IDEInterfaceBuilderKit 0x00000001090a094a +[IBInterfaceBuilderPlugin ide_initializeWithOptions:error:] + 11
10 IDEFoundation 0x000000010a68bbad _IDEInitializeOnePlugInAndPrerequisites + 2251
11 IDEFoundation 0x000000010a68b50f _IDEInitializeOnePlugInAndPrerequisites + 557
12 IDEFoundation 0x000000010a68a3d7 _IDEInitializePlugIns + 1417
13 IDEFoundation 0x000000010a68936a IDEInitialize + 9716
14 ibtoold 0x0000000108d74dc5 IBIDEInitialize + 52
15 ibtoold 0x0000000108d73fbf main + 1622
16 libdyld.dylib 0x00007fff204b7621 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Traceback (most recent call last):
File "../../build/config/ios/compile_ib_files.py", line 57, in <module>
sys.exit(main())
File "../../build/config/ios/compile_ib_files.py", line 40, in main
stdout = subprocess.check_output(ibtool_args)
File "$HOME/.pyenv/versions/2.7.17/lib/python2.7/subprocess.py", line 223, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['xcrun', 'ibtool', '--errors', '--warnings', '--notices', '--output-format', 'human-readable-text', '--minimum-deployment-target', '10.11.0', '--compile', '$HOME/electron/src/out/Testing/gen/electron/electron_xibs_compile_ibtool/MainMenu.nib', '$HOME/electron/src/electron/shell/common/resources/mac/MainMenu.xib']' returned non-zero exit status -6
[11746/39745] CXX obj/components/safe_browsing/core/csd_proto/csd.pb.o
ninja: build stopped: subcommand failed.
ERROR Error: Command failed: ninja -j 200 electron
at checkExecSyncError (node:child_process:636:11)
at Object.execFileSync (node:child_process:654:15)
at Object.depotExecFileSync [as execFileSync] ($HOME/.electron_build_tools/src/utils/depot-tools.js:117:16)
at runNinja ($HOME/.electron_build_tools/src/e-build.js:78:9)
at Object.<anonymous> ($HOME/.electron_build_tools/src/e-build.js:136:3)
at Module._compile (node:internal/modules/cjs/loader:1083:30)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
at Module.load (node:internal/modules/cjs/loader:948:32)
at Function.Module._load (node:internal/modules/cjs/loader:789:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
ERROR Error: Command failed: /usr/local/Cellar/node/15.0.1/bin/node $HOME/.electron_build_tools/src/e build
at checkExecSyncError (node:child_process:636:11)
at Object.execFileSync (node:child_process:654:15)
at Object.<anonymous> ($HOME/.electron_build_tools/src/e-init.js:211:18)
at Module._compile (node:internal/modules/cjs/loader:1083:30)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:10)
at Module.load (node:internal/modules/cjs/loader:948:32)
at Function.Module._load (node:internal/modules/cjs/loader:789:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:72:12)
at node:internal/main/run_main_module:17:47
There should be a version of Python 2 included.
Adding script_executable = "vpython"
to the end of src/.gn
should fix things.
Since this is an old issue, and the usage of Python in build-tools
has changed significantly since this issue was opened, I'm going to go ahead and close it.