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

[email protected] can't handle universal arch native node.js module correctly on macOS. #3447

Open
3 tasks done
ChrisChou-freeman opened this issue Dec 19, 2023 · 1 comment
Labels
bug native-modules package Issues related to the `package` command platform/macOS

Comments

@ChrisChou-freeman
Copy link

ChrisChou-freeman commented Dec 19, 2023

Pre-flight checklist

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

Electron Forge version

7.2.0

Electron version

28.0.0

Operating system

macOS 14.1.1

Last known working Electron Forge version

6.4.2

Expected behavior

run electron-forge make --arch=universal --platform=mas package successfully

Actual behavior

throw error message below, seems 7.2 version not handle osxUniversal config option correct.

(because when i remove this config option in 6.4 version, it will throw an error "leveldown.node" that's the same in both x64 and arm64 builds and not covered by the x64ArchFiles rule: "undefined", but it's not throw this error message until the error message below throw in version 7.2 when i remove osxUniversa config optionl).

An unhandled rejection has occurred inside Forge:
Error: Command failed with a non-zero return code (1):
lipo /private/var/folders/yp/_j1q49v91zj6vb42fzt6fcs40000gn/T/electron-universal-c5APVS/Tmp.app/Contents/Resources/app/.webpack/main/native_modules/build/Release/leveldown.node /private/var/folders/yp/_j1q49v91zj6vb42fzt6fcs40000gn/T/electron-packager/electron-packager-universal-X5PsiV/Simark-mas-arm64/Simark.app/Contents/Resources/app/.webpack/main/native_modules/build/Release/leveldown.node -create -output /private/var/folders/yp/_j1q49v91zj6vb42fzt6fcs40000gn/T/electron-universal-c5APVS/Tmp.app/Contents/Resources/app/.webpack/main/native_modules/build/Release/leveldown.node

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: /private/var/folders/yp/_j1q49v91zj6vb42fzt6fcs40000gn/T/electron-universal-c5APVS/Tmp.app/Contents/Resources/app/.webpack/main/native_modules/build/Release/leveldown.node and /private/var/folders/yp/_j1q49v91zj6vb42fzt6fcs40000gn/T/electron-packager/electron-packager-universal-X5PsiV/Simark-mas-arm64/Simark.app/Contents/Resources/app/.webpack/main/native_modules/build/Release/leveldown.node have the same architectures (x86_64) and can't be in the same fat output file
at ChildProcess.<anonymous> (/Users/chrischou/Developer/NodeJsProject/simark/node_modules/@malept/cross-spawn-promise/dist/src/index.js:101:24)
    at ChildProcess.emit (node:events:514:28)
    at ChildProcess.emit (node:domain:488:12)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:514:28)
    at Socket.emit (node:domain:488:12)
    at Pipe.<anonymous> (node:net:337:12)

Steps to reproduce

try to install any node.js package include native module, for example [email protected], then pack app in universal arch with [email protected] on macOS.

electron-forge make --arch=universal --platform=mas`

Additional information

No response

@ChrisChou-freeman
Copy link
Author

currently i decide to roll back to 6.4 version, and it's working fine.

@erickzhao erickzhao added native-modules platform/macOS package Issues related to the `package` command labels Feb 1, 2025
@erickzhao erickzhao added the bug label Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug native-modules package Issues related to the `package` command platform/macOS
Projects
None yet
Development

No branches or pull requests

2 participants