-
Notifications
You must be signed in to change notification settings - Fork 175
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
v3.2.8 breaks packaging electron app with ffi-napi dependency #1024
Comments
@t57ser Can you include the module that's breaking, or a repro of the break in Electron Fiddle? We're able to build a module with ff-napi without seeing this error, just want to try and get a repro for a deeper look 👀 |
@VerteDinde Here you go: https://gist.github.com/t57ser/3be2bc0d590690ece381f69e8c316edf
|
Sorry @t57ser, could you include the Mac/Linux arch you're using, and the version of Electron 20-beta? I've been trying to repro on Mac arm64 using your gist, and I haven't been able to hit this error. We have another maintainer on Linux who was also trying to repro on Ubuntu 22.04 / Xorg (using Electron 20.0.0-b13 and electron-rebuild 3.2.8) who is also not able to repro. Maybe this is specific to a Python version or arch? Just trying to get more details so we can try to fix this before Electron 20 stable for you 🤔 |
macOS Monterey 12.4. x86_64 |
Starting electron works, but packaging does not work, maybe that is the misunderstanding. |
I'm having the same issue, trying to compile for electron 16. https://github.com/headsetapp/headset-electron/runs/7615723093?check_suite_focus=true |
Here's my terminal output when trying to reproduce on an arm64 Mac (Monterey) with both E20.0.0-beta.11 and E20.0.0-beta.13, running The only change between 3.2.7 and 3.2.8 is this change, which doesn't force a config rebuild when using alpha and/or beta 🤔 : https://github.com/electron/electron-rebuild/pull/1023/files I'm not sure how this is affecting the python link, and it's interesting that this seems to be happening independent of the Electron version. I'll test a x64 Mac and see if this could be an architecture difference. |
That is not the only change introduce in this version, it's the only one reported on the Releases page. Here's the list of changes: v3.2.7...v3.2.8 |
@fcastilloec Thanks for the call-out, you're right! I think this may be the source of the issue: nodejs/node-gyp@b9ddcd5 We'll get this fixed |
Have never seen Python generate a |
The problem is the major version upgrade of node-gyp in a minor version, IMHO this should not permitted since it break the semantic versioning logic. A minor update should be safe. For some reason node-gyp developer added a link to the python interpreter inside the build directory, that electron applications try to pack in the bundle, and obviously a link to the filesystem inside an application bundle is not allowed... ... they have a PR for this on node-gyp, but maybe it's better to release a .10 release of electron-rebuild that fixes this as electron packager, asar and other did.... |
Please provide a code review on nodejs/node-gyp#2721 to encourage maintainers to merge it. |
Would love to see some sort of fix for this. |
I was finally able to work around this by adding a "resolutions": {
"**/**/fsevents": "^1.2.9",
"**/**/node-gyp": "^8.4.0"
} |
Thank you @jagthedrummer - I can confirm it works, finally fixed the issue:
|
Following error is thrown:
An unhandled rejection has occurred inside Forge:
Error: /m/i1/temp/buildTmp/electron-packager/linux-x64/test-x64/resources/app/node_modules/ffi-napi/build/node_gyp_bins/python3: file links out of the package
Using electron-forge 6.0.0-beta.64 with electron 20 beta and ffi-napi 4.0.3
Only happens on mac and linux
Once i revert back to 3.2.7 packaging the application is working again.
The text was updated successfully, but these errors were encountered: