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

MacOS: Crash on launch ("Library missing" - incorrect file permissions) #1

Open
soraxxo opened this issue Apr 21, 2020 · 10 comments
Open
Labels
bug Something isn't working

Comments

@soraxxo
Copy link

soraxxo commented Apr 21, 2020

OS Version: Mac OS X High Sierra 10.13.6 [17G6030]
Snapdrop-desktop Version: Release 1.0.0 (d1dd2fc)

Launching the application from immediately leads to a crash. It looks like MacOS is unable to find/load Electron the way it is currently referenced.

Relevant information from the Problem Report that was generated:

Termination Reason: DYLD, [0x1] Library missing

Dyld Error Message:
Library not loaded: @rpath/Electron Framework.framework/Electron Framework
Referenced from: /private/var/folders/*/snapdrop-desktop.app/Contents/MacOS/snapdrop-desktop
Reason: image not found

Binary Images:
0x10e18d000 - 0x10e1b5ff7 +com.electron.snapdrop-desktop (1.0.0 - 1.0.0) <3788637B-0A53-3737-B3B6-C827ABF3E314> /var/folders/*/snapdrop-desktop.app/Contents/MacOS/snapdrop-desktop
0x11931a000 - 0x119364acf dyld (551.5) <30B355CB-35BA-3112-AA76-4E46CD45F699> /usr/lib/dyld
0x7fff31224000 - 0x7fff31224fff com.apple.Cocoa (6.11 - 22) <8C1B3F7A-889A-3D71-A58C-C672665F9E78> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
0x7fff33b39000 - 0x7fff33effff3 com.apple.Foundation (6.9 - 1454.95) <0A759716-AD1C-3409-A8FD-D6C615FADB7F> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff34216000 - 0x7fff342b1fff com.apple.framework.IOKit (2.0.2 - 1445.71.5) <59191D07-0C8E-3823-A124-CE46F1A35935> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff3d840000 - 0x7fff3db6bfff com.apple.security (7.0 - 58286.70.13) <2AE4C057-B8D1-3DD0-A634-5C50C5146B49> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff3dfd3000 - 0x7fff3e043ff3 com.apple.SystemConfiguration (1.17 - 1.17) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration

Right-clicking on the application file and selecting Show Package Contents shows Electron Framework.framework is present in the bundle.

@soraxxo
Copy link
Author

soraxxo commented Apr 21, 2020

Cloning the repo and running npm run package-mac as instructed in the readme does build an app that will launch correctly, for the record.

The output from npm gives a warning that might be related:

Packaging app for platform darwin x64 using electron v5.0.2
WARNING: Found 'electron' but not as a devDependency, pruning anyway

npm -v is at 6.9.0

@alextwothousand
Copy link
Owner

Thanks for reporting, I haven't tested this on Mac otherwise I would've looked into the issue. Do you have any idea what could be causing this?

@soraxxo
Copy link
Author

soraxxo commented Apr 27, 2020

As best as I can tell, it seems to be a file permissions issue that is related to building the application package. When I was googling this problem the other day, I came across several other Electron projects that were receiving similar reports:

electron/packager#379

electron/electron#17581
electron/electron#17582

signalapp/Signal-Desktop#3245

Any idea what version of Electron you were using when you packaged your release? As mentioned in the reports linked above, Electron 4.1.2 fixed those file permission bugs affecting Darwin builds, and Electron 4.1.2 was released around the same time Snapdrop-desktop 1.0.0 was released (May 28, 2019 vs [email protected] on Mar 28, 2019), so it's conceivable that an older build of Electron was used to package Snapdrop-desktop; perhaps fixing this repo's MacOS binary release could be as simple as running npm run package-mac again with a newer Electron installed.

@alextwothousand
Copy link
Owner

alextwothousand commented Apr 28, 2020 via email

@soraxxo
Copy link
Author

soraxxo commented Apr 29, 2020 via email

@alextwothousand
Copy link
Owner

Hey pal, I was planning on getting the package up but I just decided to do a rewrite in Golang. Please check out the new go-rewrite branch, thanks! :)

@alextwothousand
Copy link
Owner

Can this issue be closed? As soon as I'm available, I will get started on releasing builds for each OS :)

@alextwothousand alextwothousand added the bug Something isn't working label Jul 25, 2020
@soraxxo
Copy link
Author

soraxxo commented Aug 9, 2020

Hi! Sorry for the delay - haven't set up Go on my Mac yet. I'll try to do that and test out the rewrite soon.

@alextwothousand
Copy link
Owner

No worries mate!

@alextwothousand
Copy link
Owner

Hi there,

I've rewritten the code for Snapdrop Desktop. At the moment, I have Linux builds functioning, however, the plan is to work on CI/CD for both Darwin and Windows/NT. This should be completed by the end of the day- thank you!

Alex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants