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

Could not detect abi for version 12.0.0 and runtime electron. #632

Closed
lstolcman opened this issue Mar 2, 2021 · 7 comments
Closed

Could not detect abi for version 12.0.0 and runtime electron. #632

lstolcman opened this issue Mar 2, 2021 · 7 comments

Comments

@lstolcman
Copy link

lstolcman commented Mar 2, 2021

Hi
When I try to rebuild a module in newly released electron 12.0.0, it fails with an error:

An unhandled error occurred inside electron-rebuild
Could not detect abi for version 12.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 12.0.0 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
    at Object.getAbi (C:\dev\electron_test\node_modules\node-abi\index.js:30:9)
    at new Rebuilder (C:\dev\electron_test\node_modules\electron-rebuild\lib\src\rebuild.js:102:48)
    at rebuildWithOptions (C:\dev\electron_test\node_modules\electron-rebuild\lib\src\rebuild.js:253:23)
    at Object.doRebuild [as rebuild] (C:\dev\electron_test\node_modules\electron-rebuild\lib\src\rebuild.js:276:16)
    at C:\dev\electron_test\node_modules\electron-rebuild\lib\src\cli.js:119:33

how to reproduce:

npm init
npm i [email protected]
npm i electron-rebuild
npm install [email protected] --ignore-scripts
.\node_modules\.bin\electron-rebuild.cmd -f -w windows-process-tree

Throws an error

It is interesting, because older versions (e.g. 11.2.3), and electron v12 betas (the latest: 12.0.0-beta.31, released 20 hours ago), works:

npm init
npm i [email protected]
npm i electron-rebuild
npm install [email protected] --ignore-scripts
.\node_modules\.bin\electron-rebuild.cmd -f -w windows-process-tree

os: windows 10
node: 14.16.0

@Jujudo
Copy link

Jujudo commented Mar 2, 2021

Same for me..

@karniv00l
Copy link

Related issue: electron/node-abi#100

@malept
Copy link
Member

malept commented Mar 3, 2021

node-abi 2.20 was released about 3 hours ago.

@malept malept closed this as completed Mar 3, 2021
@maximborisov
Copy link

maximborisov commented Mar 18, 2021

node-abi 2.20 was released about 3 hours ago.

But current version of electron-rebuild 2.3.5 depend on node-abi ^2.19.2

We use node-abi version 2.19.3. Upgrading node-abi to versions 2.20.0 and 2.21.0 has no effect

We faced one problem after upgrade ours Electron app from version 11 to 12:

$ electron-rebuild --parallel --force --types prod,dev,optional --module-dir app
× Rebuild Failed

An unhandled error occurred inside electron-rebuild
Could not detect abi for version 12.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 12.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:\Users\max\Documents\work\post\PartPriem\offline_lk\ node_modules\electron-rebuild\node_modules\node-abi \index.js:30:9)
at Rebuilder.get ABI [as ABI] (D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\electron-rebuild\lib\src\rebuild.js:111:39)
at ModuleRebuilder.prebuildNativeModuleExists (D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\electron-rebuild\lib\src\module-rebuilder.js:129:146)
at Rebuilder.rebuildModuleAt (D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\electron-rebuild\lib\src\rebuild.js:170:35)
at async Promise.all (index 126)
at async Rebuilder.rebuild (D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\electron-rebuild\lib\src\rebuild.js:148:13)
at async D:\Users\max\Documents\work\post\PartPriem\offline_lk\node_modules\electron-rebuild\lib\src\cli.js:146:9
error Command failed with exit code 4294967295.

This error can be fixed when manually change abi_registry.json and replace target from "12.0.0-nightly.20201013" to "12.0.0"

@maximborisov
Copy link

Any news on this issue?

@lstolcman
Copy link
Author

Any news on this issue?

I guess we have to wait till new release

I solved the issue by forcing install specific version of node-abi before rebuilding:

npm install [email protected]
.\node_modules\.bin\electron-rebuild.cmd ....

@maximborisov
Copy link

@lstolcman, I found better solution from @jacobq, contributor of node-abi: https://github.com/lgeiger/node-abi/issues/102#issuecomment-831355695

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

5 participants