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

Fails to build on Mac and Windows Machines [electron-builder] [electron] #91

Open
kamalbennani opened this issue Feb 16, 2021 · 1 comment

Comments

@kamalbennani
Copy link

Context

We are using this library in order to intercept the Jabra physical button clicks. It's used inside of an electron wrapper and locally everything seems to be working as expected.

But, once we try to build the dmg or exe file, the build process fails every single time with this error:

  • electron-builder  version=22.10.4 os=19.4.0
  • rebuilding native dependencies  dependencies=@gnaudio/[email protected] platform=darwin arch=x64
  • rebuilding native dependency  name=@gnaudio/jabra-node-sdk version=3.2.1
  • rebuilding native dependencies  dependencies=@gnaudio/[email protected] platform=darwin arch=x64
  • rebuilding native dependency  name=@gnaudio/jabra-node-sdk version=3.2.1
  ⨯ cannot execute  cause=exit status 1
                    out=$ node-gyp rebuild
      COPY Release/libjabra.dylib
      CXX(target) Release/obj.target/sdkintegration/src/main/app.o
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    
                    errorOut=warning ../../../package.json: No license field
    gyp info it worked if it ends with ok
    gyp info using [email protected]
    gyp info using [email protected] | darwin | x64
    gyp 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"
    gyp http GET https://electronjs.org/headers/v11.2.3/node-v11.2.3-headers.tar.gz
    gyp http 200 https://electronjs.org/headers/v11.2.3/node-v11.2.3-headers.tar.gz
    gyp http GET https://electronjs.org/headers/v11.2.3/SHASUMS256.txt
    gyp http 200 https://electronjs.org/headers/v11.2.3/SHASUMS256.txt
    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   '/usr/local/Cellar/node/14.2.0/libexec/lib/node_modules/npm/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/distiller/electron/node_modules/@gnaudio/jabra-node-sdk/build/config.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/usr/local/Cellar/node/14.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/Users/distiller/.electron-gyp/11.2.3/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/distiller/.electron-gyp/11.2.3',
    gyp info spawn args   '-Dnode_gyp_dir=/usr/local/Cellar/node/14.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
    gyp info spawn args   '-Dnode_lib_file=/Users/distiller/.electron-gyp/11.2.3/<(target_arch)/node.lib',
    gyp info spawn args   '-Dmodule_root_dir=/Users/distiller/electron/node_modules/@gnaudio/jabra-node-sdk',
    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 ]
    gyp info spawn make
    gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    rm: ./Release/.deps/Release/obj.target/sdkintegration/src/main/app.o.d.raw: No such file or directory
    make: *** [Release/obj.target/sdkintegration/src/main/app.o] Error 1
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/usr/local/Cellar/node/14.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
    gyp ERR! System Darwin 19.4.0
    gyp ERR! command "/usr/local/Cellar/node/14.2.0/bin/node" "/usr/local/Cellar/node/14.2.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /Users/distiller/electron/node_modules/@gnaudio/jabra-node-sdk
    gyp ERR! node -v v14.2.0
    gyp ERR! node-gyp -v v5.1.0
    gyp ERR! not ok 
    error Command failed with exit code 1.
    
                    command=/usr/local/Cellar/node/14.2.0/bin/node /usr/local/Cellar/yarn/1.22.4/libexec/bin/yarn.js run install
                    workingDir=/Users/distiller/electron/node_modules/@gnaudio/jabra-node-sdk
(node:746) UnhandledPromiseRejectionWarning: Error: /Users/distiller/electron/node_modules/app-builder-bin/mac/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
    at ChildProcess.<anonymous> (/Users/distiller/electron/node_modules/builder-util/src/util.ts:243:14)
    at Object.onceWrapper (events.js:422:26)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1051:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:746) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:746) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Versions:

Electron: 11.2.3
Electron builder: 22.10.4
@gnaudio/jabra-node-sdk: 3.2.1
OS: VM with xcode:11.5.0 image
Node: 14.2.0
Node-gyp: 5.1.0

We tried downgrading the node version and nothing has changed basically :( do you happen to know what's going on here?

Here a link to a reproducible repo: https://github.com/kamalbennani/jabra-sdk-example

You basically just need to run: yarn dist on your local machine and you will see the same error as the one above.

@ielektronick
Copy link

ielektronick commented Jan 3, 2023

Can confirm that bug is reproducible with:

  • @gnaudio/jabra-node-sdk: 3.6.2
  • Electron: 22.0.0
  • Electron builder: 23.6.0
  • Node: 16.17.0
  • Node-gyp: 8.4.1

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