Electron-packager: Starting Application built on Windows fails on MacOS Catalina

Created on 5 Feb 2020  路  4Comments  路  Source: electron/electron-packager

Preflight Checklist

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

Issue Details

  • Electron Packager Version:

    • 14.2.0

  • Electron Version:

    • 7.1.11

  • Operating System:

    • Windows 10 1909 / MacOS Catalina 10.15.2

  • Last Known Working Electron Packager version::

      *

Expected Behavior

Packing under Windows for MacOS

Actual Behavior

Packing under Windows 10 for MacOS works fine, but fails to start on an Apple computer. If I Pack directly on the Mac it works as expected.

To Reproduce

I took this Boilerplate and added electron-packager. Then packed with
electron-packager . Presentations --overwrite --asar --platform=darwin --arch=x64 --prune=true --out=dist --icon=./icon.icns
and copied to the Mac via USB-Stick.

Additional Information

The Issue has been addressed before but none of the given solutions (like using npm cache --force clean before building, or checking the access rights on MacOS) change anything.

The error on MacOS was the following:

Process: Presentations [1246]
Path: /Volumes/VOLUME//Presentations.app/Contents/MacOS/
Presentations
Identifier: com.electron.presentations
Version: 1.0.0 (1.0.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Presentations [1246]
User ID: 501
Date/Time: 2020-02-05 10:38:00.515 +0100
OS Version: Mac OS X 10.15.2 (19C57)
Report Version: 12
Anonymous UUID: XXXXXXXXXXXXXXXXXXXXX
Time Awake Since Boot: 13000 seconds
System Integrity Protection: disabled
Crashed Thread: 0
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: DYLD, [0x1] Library missing
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
Library not loaded: @rpath/Electron Framework.framework/Electron
Framework
Referenced from: /Volumes/VOLUME/
/Presentations.app/Contents/MacOS/
Presentations
Reason: no suitable image found. Did find:
/Volumes/Macintosh HD /Presentations-darwin-x64/Presentations.app/
Contents/MacOS/../Frameworks/Electron Framework.framework/Electron
Framework: file too short
/Volumes/Macintosh HD /Presentations-darwin-x64/Presentations.app/
Contents/MacOS/../Frameworks/Electron Framework.framework/Electron
Framework: stat() failed with errno=1

windows build-target question

All 4 comments

It's probably because the filesystem on the USB stick does not support symlinks. My suggestion is to use WSL to bundle and zip up the app (via the zip command or the electron-installer-zip module) and then copy that to the USB stick.

@malept it is not USB stick that doesn' support symlinks (lmao), it's Windows that does not have a concept of symlinks, except for junctions, that are similar but different. Any package built on Windows is broken on Mac.

Seems correct. After I tried a couple of things to get the package alive to the Mac (installing Ubuntu WSL, using tar archives...) I gave up and started building under MacOS directly.

Maybe it would be a good Idea to mention that in the ReadMe...

Still a problem. Anybody know a possible workaround? I tried rebuilding all of the symlinks on the target machine, but then I got a "trace/bpt trap: 5" error that's related to not being able to load a .dylib file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

quadrophobiac picture quadrophobiac  路  4Comments

dland512 picture dland512  路  5Comments

29e7e280-0d1c-4bba-98fe-f7cd3ca7500a picture 29e7e280-0d1c-4bba-98fe-f7cd3ca7500a  路  4Comments

Write-Guy picture Write-Guy  路  3Comments

NoahAndrews picture NoahAndrews  路  5Comments