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 9 builds are failing #1700

Closed
3 tasks done
Razviar opened this issue May 21, 2020 · 12 comments
Closed
3 tasks done

Electron 9 builds are failing #1700

Razviar opened this issue May 21, 2020 · 12 comments
Labels

Comments

@Razviar
Copy link

Razviar commented May 21, 2020

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

  • Electron Forge Version:
    • 6.0.0-beta.51
  • Electron Version:
    • 9.0.0
  • Operating System:
    • Windows 10 (2004)
  • Last Known Working Electron Forge version::
    • 6.0.0-beta.51 with Electron 8.2.5

Expected Behavior

Command "electron-forge start" launching the app

Actual Behavior

Command "electron-forge start" produces error:

An unhandled error has occurred inside Forge:
Could not detect abi for version 9.0.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron
Error: Could not detect abi for version 9.0.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron
at Object.getAbi (D:\mtgap\node_modules\node-abi\index.js:30:9)
at new Rebuilder (D:\mtgap\node_modules\electron-rebuild\src\rebuild.ts:124:24)
at rebuildWithOptions (D:\mtgap\node_modules\electron-rebuild\src\rebuild.ts:514:21)
at doRebuild (D:\mtgap\node_modules\electron-rebuild\src\rebuild.ts:567:12)
at asyncFn (D:\mtgap\node_modules@electron-forge\core\src\util\rebuild.ts:15:23)
at D:\mtgap\node_modules@electron-forge\async-ora\src\ora-handler.ts:35:5
at new Promise ()
at asyncOra (D:\mtgap\node_modules@electron-forge\async-ora\src\ora-handler.ts:34:10)
at _default (D:\mtgap\node_modules@electron-forge\core\src\util\rebuild.ts:14:9)
at _default (D:\mtgap\node_modules@electron-forge\core\src\api\start.ts:44:9)
at D:\mtgap\node_modules@electron-forge\cli\src\electron-forge-start.ts:59:19
npm ERR! code ELIFECYCLE
npm ERR! errno 1

To Reproduce

  1. Update Electron to 9
  2. electron-forge start

Additional Information

Looks like node-abi already have Electron 9 support added https://github.com/lgeiger/node-abi/commits/master

@Razviar Razviar added the bug label May 21, 2020
@malept
Copy link
Member

malept commented May 21, 2020

Please fill out the bug template. Once this happens and we determine it's a bug, I'll reopen this.

@malept malept closed this as completed May 21, 2020
@Razviar
Copy link
Author

Razviar commented May 21, 2020

Here you go, feel free to re-open and, most importantly, make Forge forging again :)

@malept
Copy link
Member

malept commented May 21, 2020

Use npm update --depth 100 node-abi

node-abi is a transitive dependency of Electron Forge, so there's nothing that can be changed in Forge itself.

@Razviar
Copy link
Author

Razviar commented May 24, 2020

"npm update --depth 100 node-abi" didn't worked for me, since process was just hanging when I tried to run this command. Then I installed node-abi as dependency and was able to launch app in dev mode with "electron-forge start" commant. BUT "electron-forge make" still failing with the same error:

"Could not detect abi for version 9.0.0 and runtime electron." on "Preparing native dependencies" step. As I recall, last time when Electron had major update, Electron forge was giving the same error and after Forge update it was fixed. So it's weird you don't admit this to be forge issue, since obviously that without deps update forge is unable to make Electron 9 apps, isn't it?

@malept
Copy link
Member

malept commented May 24, 2020

The point is that node-abi is not a direct dependency, but rather a dependency of a dependency, so Electron Forge cannot force a version update of node-abi, especially since you're using NPM. If the depth option isn't working for you, you'll probably have to remove and reinstall @electron-forge/core from devDependencies.

@Razviar
Copy link
Author

Razviar commented May 24, 2020

Weird. I deleted all node_modules, made clean reinstall and after " npm update --depth 100 node-abi " i got hanging console + NodeJS working in the background with consumption of 100% of 1 CPU core. I kept it running for 30 minutes (!) and it never finished. So probably I'll have to wait until that dependency of Electron forge which has node-abi dependency will get updated, then Forge will get updated and only then my app will get updated :D

@asiercamara
Copy link

I got the same error.
I fixed it following this advice
#667 (comment)

For anyone else that runs into this problem and if you're using yarn: go into yarn.lock file, find entry for node-abi, delete it, then re-run yarn.

Good luck

@Razviar
Copy link
Author

Razviar commented May 26, 2020

@asiercamara thanks for sharing. That advice helped me to get things running in dev mode, but "electron-forge make" still failing with the same error.

@asiercamara
Copy link

@Razviar I can't replicate, yarn make (script for "electron-forge make") works for me. I'm using only @electron-forge/maker-squirrel in my electron.config.js

@malept
Copy link
Member

malept commented May 26, 2020

If you're literally running electron-forge make in the shell, then the npm update command (or the equivalent yarn upgrade node-abi) won't work, because you're using the global electron-forge (which you shouldn't be doing, it should be scoped to your project).

@Razviar
Copy link
Author

Razviar commented May 27, 2020

@malept thank you so much for pointing me to the right direction. After switching to local forge scoped into the project, all is making fine now and "npm run make" works as a charm. Thanks again for help

@SamadKhafi
Copy link

Weird. I deleted all node_modules, made clean reinstall and after " npm update --depth 100 node-abi " i got hanging console + NodeJS working in the background with consumption of 100% of 1 CPU core. I kept it running for 30 minutes (!) and it never finished. So probably I'll have to wait until that dependency of Electron forge which has node-abi dependency will get updated, then Forge will get updated and only then my app will get updated :D

Using npm update --depth 100 node-abi didn't work for me, too. CPU usage was very high. I tried using npm update --depth 10 node-abi , which worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants