octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.37k stars 961 forks source link

Robot-js, electron builder fail packaging for windows #598

Open clementvp opened 4 years ago

clementvp commented 4 years ago

Try to package my app fail for the windows platform. My App use RobotJs

Expected Behavior

Electron Builder repackage Robotjs with the correct Node js version, the correct Electron Version and The correct Abi Version

Current Behavior

I follow this guide And in the Node context, the app work great, but not in the packaging process for windows. Packaging for Mac is ok. I'm working with a MAc.

I have this Error:

rebuilding native dependencies dependencies=fsevents@1.2.12, robotjs@0.6.0 platform=win32 arch=x64 • install prebuilt binary name=robotjs version=0.6.0 platform=win32 arch=x64 ⨯ cannot build native dependency reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible cause=exit status 1 errorOut=prebuild-install info begin Prebuild-install version 5.3.5 prebuild-install WARN install prebuilt binaries enforced with --force! prebuild-install WARN install prebuilt binaries may be out of date! prebuild-install info looking for cached prebuild @ /Users/clement/.npm/_prebuilds/55da67-robotjs-v0.6.0-electron-v80-win32-x64.tar.gz prebuild-install http request GET https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v80-win32-x64.tar.gz prebuild-install http 404 https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v80-win32-x64.tar.gz prebuild-install WARN install No prebuilt binaries found (target=9.2.1 runtime=electron arch=x64 libc= platform=win32) command=/Users/clement/.nvm/versions/node/v14.4.0/bin/node /Users/clement/projects/perso/remote/remote-client/node_modules/prebuild-install/bin.js --platform=win32 --arch=x64 --target=9.2.1 --runtime=electron --verbose --force workingDir=/Users/clement/projects/perso/remote/remote-client/node_modules/robotjs • building embedded block map file=dist/remote-client-0.1.0-mac.zip npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! remote-client@0.1.0 package: electron-builder build --mac --win -c.extraMetadata.main=build/electron/main.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the remote-client@0.1.0 package script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Steps to Reproduce (for bugs)

My npm package command : "electron-builder build --mac --win -c.extraMetadata.main=build/electron/main.js", Electron builder is updated to the latest version.

Context

Try to package my app for the win32 platform.

Your Environment

kunyashaw commented 4 years ago

Try to package my app fail for the windows platform. My App use RobotJs

Expected Behavior

Electron Builder repackage Robotjs with the correct Node js version, the correct Electron Version and The correct Abi Version

Current Behavior

I follow this guide And in the Node context, the app work great, but not in the packaging process for windows. Packaging for Mac is ok. I'm working with a MAc.

I have this Error:

rebuilding native dependencies dependencies=fsevents@1.2.12, robotjs@0.6.0 platform=win32 arch=x64 • install prebuilt binary name=robotjs version=0.6.0 platform=win32 arch=x64 ⨯ cannot build native dependency reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible cause=exit status 1 errorOut=prebuild-install info begin Prebuild-install version 5.3.5 prebuild-install WARN install prebuilt binaries enforced with --force! prebuild-install WARN install prebuilt binaries may be out of date! prebuild-install info looking for cached prebuild @ /Users/clement/.npm/_prebuilds/55da67-robotjs-v0.6.0-electron-v80-win32-x64.tar.gz prebuild-install http request GET https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v80-win32-x64.tar.gz prebuild-install http 404 https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v80-win32-x64.tar.gz prebuild-install WARN install No prebuilt binaries found (target=9.2.1 runtime=electron arch=x64 libc= platform=win32) command=/Users/clement/.nvm/versions/node/v14.4.0/bin/node /Users/clement/projects/perso/remote/remote-client/node_modules/prebuild-install/bin.js --platform=win32 --arch=x64 --target=9.2.1 --runtime=electron --verbose --force workingDir=/Users/clement/projects/perso/remote/remote-client/node_modules/robotjs • building embedded block map file=dist/remote-client-0.1.0-mac.zip npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! remote-client@0.1.0 package: electron-builder build --mac --win -c.extraMetadata.main=build/electron/main.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the remote-client@0.1.0 package script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Steps to Reproduce (for bugs)

My npm package command : "electron-builder build --mac --win -c.extraMetadata.main=build/electron/main.js", Electron builder is updated to the latest version.

Context

Try to package my app for the win32 platform.

Your Environment

  • RobotJS version:0.6.0
  • Node.js version: 14.4.2
  • npm version: 6.14.5
  • Operating System: Mac Os

we hava same tips when build it can package success for mac dmg in mac;but can't build for windows exe in mac; according to the output tips ,it is caused by a link which can't find, hope author can focus on it! thanks

clementvp commented 4 years ago

package on a windows platform resolve my issue. @kunyashaw try to build and package your app on a windows 10. It works for me

Albert-ch commented 4 years ago

Try to package my app fail for the windows platform. My App use RobotJs

Expected Behavior

Electron Builder repackage Robotjs with the correct Node js version, the correct Electron Version and The correct Abi Version

Current Behavior

I follow this guide And in the Node context, the app work great, but not in the packaging process for windows. Packaging for Mac is ok. I'm working with a MAc. I have this Error: rebuilding native dependencies dependencies=fsevents@1.2.12, robotjs@0.6.0 platform=win32 arch=x64 • install prebuilt binary name=robotjs version=0.6.0 platform=win32 arch=x64 ⨯ cannot build native dependency reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible cause=exit status 1 errorOut=prebuild-install info begin Prebuild-install version 5.3.5 prebuild-install WARN install prebuilt binaries enforced with --force! prebuild-install WARN install prebuilt binaries may be out of date! prebuild-install info looking for cached prebuild @ /Users/clement/.npm/_prebuilds/55da67-robotjs-v0.6.0-electron-v80-win32-x64.tar.gz prebuild-install http request GET https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v80-win32-x64.tar.gz prebuild-install http 404 https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v80-win32-x64.tar.gz prebuild-install WARN install No prebuilt binaries found (target=9.2.1 runtime=electron arch=x64 libc= platform=win32) command=/Users/clement/.nvm/versions/node/v14.4.0/bin/node /Users/clement/projects/perso/remote/remote-client/node_modules/prebuild-install/bin.js --platform=win32 --arch=x64 --target=9.2.1 --runtime=electron --verbose --force workingDir=/Users/clement/projects/perso/remote/remote-client/node_modules/robotjs • building embedded block map file=dist/remote-client-0.1.0-mac.zip npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! remote-client@0.1.0 package: electron-builder build --mac --win -c.extraMetadata.main=build/electron/main.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the remote-client@0.1.0 package script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Steps to Reproduce (for bugs)

My npm package command : "electron-builder build --mac --win -c.extraMetadata.main=build/electron/main.js", Electron builder is updated to the latest version.

Context

Try to package my app for the win32 platform.

Your Environment

  • RobotJS version:0.6.0
  • Node.js version: 14.4.2
  • npm version: 6.14.5
  • Operating System: Mac Os

we hava same tips when build it can package success for mac dmg in mac;but can't build for windows exe in mac; according to the output tips ,it is caused by a link which can't find, hope author can focus on it! thanks

+1

miladmeidanshahi commented 3 years ago

same issue

  • electron-builder  version=22.9.1 os=5.9.11-200.fc33.x86_64
  • writing effective config  file=dist/electron/Packaged/builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=robotjs@0.6.0 platform=linux arch=x64
  • install prebuilt binary  name=robotjs version=0.6.0 platform=linux arch=x64
  • build native dependency from sources  name=robotjs
                                          version=0.6.0
                                          platform=linux
                                          arch=x64
                                          reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
                                          error=prebuild-install info begin Prebuild-install version 5.3.6
    prebuild-install WARN install prebuilt binaries enforced with --force!
    prebuild-install WARN install prebuilt binaries may be out of date!
    prebuild-install info looking for cached prebuild @ /home/ali/.npm/_prebuilds/97dcc3-robotjs-v0.6.0-electron-v85-linux-x64.tar.gz
    prebuild-install http request GET https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v85-linux-x64.tar.gz
    prebuild-install http 404 https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v85-linux-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=11.0.3 runtime=electron arch=x64 libc= platform=linux)

  ⨯ cannot execute  cause=exit status 1
                    out=
> robotjs@0.6.0 install /home/ali/Public/dist/electron/UnPackaged/node_modules/robotjs
> prebuild-install || node-gyp rebuild

                    errorOut=gyp WARN install got an error, rolling back install
    gyp ERR! configure error 
    gyp ERR! stack Error: 140364957427520:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:../deps/openssl/openssl/ssl/record/ssl3_record.c:677:
    gyp ERR! stack 
    gyp ERR! System Linux 5.9.11-200.fc33.x86_64
    gyp ERR! command "/home/ali/.nvm/versions/node/v14.15.1/bin/node" "/home/ali/.nvm/versions/node/v14.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/ali/Public/dist/electron/UnPackaged/node_modules/robotjs
    gyp ERR! node -v v14.15.1
    gyp ERR! node-gyp -v v5.1.0
    gyp ERR! not ok 
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! robotjs@0.6.0 install: `prebuild-install || node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the robotjs@0.6.0 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/ali/.npm/_logs/2020-12-07T13_17_45_216Z-debug.log

                    command=npm rebuild robotjs@0.6.0
                    workingDir=
AndreiSoroka commented 3 years ago

+1

prebuild-install http 404 https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v80-win32-x64.tar.gz

 INFO  Building app with electron-builder:
  • electron-builder  version=22.11.7 os=20.3.0
  • loaded configuration  file=/Users/andreisoroka/git/other/cpisn-ui/electron-builder.yml
  • writing effective config  file=dist_electron/builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=robotjs@0.6.0 platform=win32 arch=x64
  • install prebuilt binary  name=robotjs version=0.6.0 platform=win32 arch=x64 napi=
  ⨯ cannot build native dependency  reason=prebuild-install failed with error and build from sources not possible because platform or arch not compatible
                                    cause=exit status 1
                                    errorOut=prebuild-install info begin Prebuild-install version 5.3.6
    prebuild-install WARN install prebuilt binaries enforced with --force!
    prebuild-install WARN install prebuilt binaries may be out of date!
    prebuild-install info looking for cached prebuild @ /Users/andreisoroka/.npm/_prebuilds/55da67-robotjs-v0.6.0-electron-v80-win32-x64.tar.gz
    prebuild-install http request GET https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v80-win32-x64.tar.gz
    prebuild-install http 404 https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v80-win32-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=9.4.4 runtime=electron arch=x64 libc= platform=win32)

                                    command=/usr/local/bin/node /Users/andreisoroka/git/other/cpisn-ui/node_modules/prebuild-install/bin.js --platform=win32 --arch=x64 --target=9.4.4 --runtime=electron --verbose --force
                                    workingDir=/Users/andreisoroka/git/other/cpisn-ui/node_modules/robotjs
ExecError: /Users/andreisoroka/git/other/cpisn-ui/node_modules/app-builder-bin/mac/app-builder exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
    at ChildProcess.<anonymous> (/Users/andreisoroka/git/other/cpisn-ui/node_modules/builder-util/src/util.ts:249:14)
    at Object.onceWrapper (events.js:482:26)
    at ChildProcess.emit (events.js:375:28)
    at ChildProcess.emit (domain.js:470:12)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  exitCode: 2,
  alreadyLogged: true,
  code: 'ERR_ELECTRON_BUILDER_CANNOT_EXECUTE'
}

RobotJS version: 0.6.0 Node.js version: (in electron): 12.14.1, Electron version: 9.4.4 Operating System: MacOs Big Sur 11.2.3

ShuttleSpace commented 3 years ago

same issue

  • RobotJS: v0.6.0
  • Node.js: v14.15.1
  • Operating System: Fedora Linux
  • Electron: 11.0.3
  • electron-builder  version=22.9.1 os=5.9.11-200.fc33.x86_64
  • writing effective config  file=dist/electron/Packaged/builder-effective-config.yaml
  • rebuilding native dependencies  dependencies=robotjs@0.6.0 platform=linux arch=x64
  • install prebuilt binary  name=robotjs version=0.6.0 platform=linux arch=x64
  • build native dependency from sources  name=robotjs
                                          version=0.6.0
                                          platform=linux
                                          arch=x64
                                          reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
                                          error=prebuild-install info begin Prebuild-install version 5.3.6
    prebuild-install WARN install prebuilt binaries enforced with --force!
    prebuild-install WARN install prebuilt binaries may be out of date!
    prebuild-install info looking for cached prebuild @ /home/ali/.npm/_prebuilds/97dcc3-robotjs-v0.6.0-electron-v85-linux-x64.tar.gz
    prebuild-install http request GET https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v85-linux-x64.tar.gz
    prebuild-install http 404 https://github.com/octalmage/robotjs/releases/download/v0.6.0/robotjs-v0.6.0-electron-v85-linux-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=11.0.3 runtime=electron arch=x64 libc= platform=linux)

  ⨯ cannot execute  cause=exit status 1
                    out=
> robotjs@0.6.0 install /home/ali/Public/dist/electron/UnPackaged/node_modules/robotjs
> prebuild-install || node-gyp rebuild

                    errorOut=gyp WARN install got an error, rolling back install
    gyp ERR! configure error 
    gyp ERR! stack Error: 140364957427520:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:../deps/openssl/openssl/ssl/record/ssl3_record.c:677:
    gyp ERR! stack 
    gyp ERR! System Linux 5.9.11-200.fc33.x86_64
    gyp ERR! command "/home/ali/.nvm/versions/node/v14.15.1/bin/node" "/home/ali/.nvm/versions/node/v14.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/ali/Public/dist/electron/UnPackaged/node_modules/robotjs
    gyp ERR! node -v v14.15.1
    gyp ERR! node-gyp -v v5.1.0
    gyp ERR! not ok 
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! robotjs@0.6.0 install: `prebuild-install || node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the robotjs@0.6.0 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/ali/.npm/_logs/2020-12-07T13_17_45_216Z-debug.log

                    command=npm rebuild robotjs@0.6.0
                    workingDir=

same.

bbb169 commented 9 months ago

+1

bbb169 commented 9 months ago

I found another way to solve this I found a fork of robotjs, and I use this library to replace robotjs, https://github.com/hurdlegroup/robotjs