-
Notifications
You must be signed in to change notification settings - Fork 193
Issue Building Keytar on M1 Mac #406
Comments
Hey, I think you can set asarUnpack in build option. in your package.json
electron-userland/electron-builder#3940 (comment) My versions are as following. Electron: 13.1.4 |
@xkenneth @yuikoito I have a similar issue, it builds on my M1 mac but runs into an error when the app starts, it says Any ideas? |
Did you do code-sign? I used
then set in package.json (I used electron-builder, and if you use another build packager, the code might be changed. But anyway you need to do code sign.)
|
@Wizdave97
in package.json
When you completely do code-sign and write the above lines in plist file, your app would be work. |
@yuikoito I'm working with @Wizdave97 Yes, we have those entitlements. We are code-signing and notarizing. I'm wondering if electron-rebuild is not picking up the binary for some reason. |
@maccman Hmm.. I see. Are you sure |
Hey this seems to be that the native module has been compiled for x86_64, but actually, it should have been done for arm64e which has got me also into a fix. |
Prerequisites
I could not access the message board. I read through these pre-reqs and they seem more relevant to Atom as a text editor than just to Keytar as a module.
Description
Steps to Reproduce
Expected behavior:
I would expect key tar to build and run when installed through NPM/yarn.
Actual behavior:
Some cryptic build error is produced that I am struggling to find out how to get around.
xkenneth@Bandley-M1 decode-lake-stats % yarn start yarn run v1.22.10 $ electron-forge start ✔ Checking your system ✔ Locating Application ⠦ Preparing native dependencies: 0 / 1gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python" ⠧ Preparing native dependencies: 0 / 1(node:685) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only. (Use
node --trace-deprecation ...` to show where the warning was created)gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args '/Users/xkenneth/Work/electron/decode-lake-stats/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/xkenneth/Work/electron/decode-lake-stats/node_modules/keytar/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/xkenneth/Work/electron/decode-lake-stats/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/xkenneth/.electron-gyp/13.1.7/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/xkenneth/.electron-gyp/13.1.7',
gyp info spawn args '-Dnode_gyp_dir=/Users/xkenneth/Work/electron/decode-lake-stats/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/xkenneth/.electron-gyp/13.1.7/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/xkenneth/Work/electron/decode-lake-stats/node_modules/keytar',
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 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
⠇ Preparing native dependencies: 0 / 1gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/keytar/src/async.o
⠹ Preparing native dependencies: 0 / 1In file included from ../src/async.cc:4:
In file included from ../../node-addon-api/napi.h:2725:
../../node-addon-api/napi-inl.h:1393:24: error: use of undeclared identifier 'napi_object_freeze'
napi_status status = napi_object_freeze(_env, _value);
^
../../node-addon-api/napi-inl.h:1399:24: error: use of undeclared identifier 'napi_object_seal'
napi_status status = napi_object_seal(_env, _value);
^
⠸ Preparing native dependencies: 0 / 12 errors generated.
make: *** [Release/obj.target/keytar/src/async.o] Error 1
✖ Preparing native dependencies: 0 / 1
An unhandled error has occurred inside Forge:
node-gyp failed to rebuild '/Users/xkenneth/Work/electron/decode-lake-stats/node_modules/keytar'.
Error:
make
failed with exit code: 2Error: node-gyp failed to rebuild '/Users/xkenneth/Work/electron/decode-lake-stats/node_modules/keytar'.
Error:
make
failed with exit code: 2error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
xkenneth@Bandley-M1 decode-lake-stats % npm test
npm ERR! Missing script: "test"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xkenneth/.npm/_logs/2021-08-07T20_48_01_486Z-debug.log
xkenneth@Bandley-M1 decode-lake-stats %
`
Reproduces how often:
Every Time
Versions
Atom : 1.58.0
Electron: 9.4.4
Chrome : 83.0.4103.122
Node : 12.14.1
macOS 11.4
Additional Information
I tried going to the suggest support forum and was met with an HTTP cert error that my browser brought up. I ignored it and still couldn't get to the forum. Any help would be much appreciated.
The text was updated successfully, but these errors were encountered: