dweymouth / supersonic

A lightweight and full-featured cross-platform desktop client for self-hosted music servers
GNU General Public License v3.0
879 stars 45 forks source link

Crash on Intel MacOS Mojave #87

Closed valterbarreira closed 1 year ago

valterbarreira commented 1 year ago

Process: supersonic [5926] Path: /Applications/Supersonic.app/Contents/MacOS/supersonic Identifier: com.example.Supersonic Version: 0.0.1 (1) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: supersonic [5926] User ID: 501

Date/Time: 2023-03-18 23:12:17.535 +0000 OS Version: Mac OS X 10.14.6 (18G9323) Report Version: 12 Anonymous UUID: 410E971E-0DA0-2F4D-CD71-562DDCD871F2

Sleep/Wake UUID: F598FA81-A89C-4030-9DE0-999487C2A5F6

Time Awake Since Boot: 100000 seconds Time Since Wake: 2800 seconds

System Integrity Protection: enabled

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: /usr/local/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/Python Referenced from: /Applications/Supersonic.app/Contents/Frameworks/libvapoursynth-script.0.dylib Reason: image not found

dweymouth commented 1 year ago

Hmm I thought the dylibbundler tool I'm using was pulling all of the dependencies into the app bundle, but I guess not.. I will have to look into this but in the meantime I'm guessing a simple brew install mpv will fix this. If you give this a try, and it works, please let me know as I'll mention it in the README for anyone else who runs into this.

I may need to look into building a custom stripped-down libmpv too, since libmpv is huge and this project likely doesn't need even a quarter of its functionality.

valterbarreira commented 1 year ago

I have mpv installed

dweymouth commented 1 year ago

Try brew install python@3.10

I was able to replicate this by brew uninstalling mpv, vapoursynth, and python@3.10 on my system. The latter 2 are dependencies of the homebrew mpv formula, so if you installed mpv via brew, they should be present.

Nonetheless I will definitely look into this as I intended to package all the needed dependencies in the app bundle.

edit: and if you don't have homebrew on your system, you can install it here: https://brew.sh/

valterbarreira commented 1 year ago

I don't remember how i installed mpv, it was needed by Feishin. I have brew, I'll try that

dweymouth commented 1 year ago

Did brew install python@3.10 fix it for you?

valterbarreira commented 1 year ago

No

dweymouth commented 1 year ago

Hmm how about brew install mpv? Maybe your homebrew install location is configured differently than the default? If you build from source as a last resort than it definitely should work since it would be referencing the library locations on your system. I hope to fix this in the next release though, but at the moment I don't know how to ensure all the dependencies are contained in the app bundle.

bbsixzz commented 1 year ago

Looking forward to the new app bundle as alpha 2 still gives Dyld Error and I don't want to use homebrew.

valterbarreira commented 1 year ago

Hmm how about brew install mpv? Maybe your homebrew install location is configured differently than the default? If you build from source as a last resort than it definitely should work since it would be referencing the library locations on your system. I hope to fix this in the next release though, but at the moment I don't know how to ensure all the dependencies are contained in the app bundle.

Installing mpv through brew gave me the error that xcode.app was necessary. Can't install through app center cause i'm 0n 10.14, so i'm trying to brew install xcode

Edit: gave error, xcode must be installed through app store I'm downloading xcode 11.3.1 from apple site

dweymouth commented 1 year ago

@valterbarreira or @bbsixzz could either of you download and test the new binary I added to the 0.0.1-alpha2 release and see if it works? I manually bundled the Python dependency that wasn't in the first release. It runs on my system but so did the original one so I would love for someone who doesn't have their mac set up for building from source to try it.

bbsixzz commented 1 year ago

I can finally launch it, works great!

Wonderful work, thank you.

macOS Ventura 13.2.1 (22D68)

dweymouth commented 1 year ago

Fixed by 34bcf7e56669ca699af3c55a5236addabce76ce2

dweymouth commented 1 year ago

Pushed new Intel mac binary to the 0.0.1-alpha2 release

valterbarreira commented 1 year ago

Even with xcode it gave an error installing mpv. This new binary still gives me error.

dweymouth commented 1 year ago

What is the error you see with the new binary? Also can you send more details about your machine (maybe a screenshot of the "About this Mac" screen)?

valterbarreira commented 1 year ago

imagem

imagem

valterbarreira commented 1 year ago

At work i have an iMac 2017 with MacOs Venture and it runs well

dweymouth commented 1 year ago

It looks like now it is crashing because it expects to find the Mac system framweork __NSDictionary0__struct which is not present on your Mac, likely because it was introduced (or upgraded) in a later Mac OS version.

Do note that Mac OS Mojave is old and is no longer receiving security updates from Apple since November 2021. If you can upgrade to Catalina it is recommended, and the release builds of Supersonic may run on your system. (I built the release builds in Mac OS 11.4 Big Sur). You also don't need the full Xcode installed to build from source, just the Xcode command line tools. If you are able to run xcode-select --install from the terminal with no errors than you can probably build from source and get it to work.

Unfortunately there's not much else I can do since the missing library you're seeing now is an Apple system library. I may just have to mark Supersonic as not supporting Mac OS versions before Big Sur.

valterbarreira commented 1 year ago

Don't worry, it's ok. I don't want to upgrade to Catalina to not loose the ability to run 32 bits apps, and to build from source maybe require some technical abilities that i don´t have. Thanks anyway

dweymouth commented 1 year ago

You're welcome. And if I do figure out how to support older MacOS with the release builds I'll post an update here. Which Subsonic server do you use? If you need a client on your Mojave mac you could try a web-based one, or maybe Submariner supports older OSes? No gapless playback though. (Of course if you're using Navidrome then you already have a builtin web client)

valterbarreira commented 1 year ago

I use navidrome. Sometimes on desktop i use it's webplayer or i also use SoniXD. I wasn't aware of Submariner.

valterbarreira commented 1 year ago

well Submariner doesn't work on Mojave, and i tested on Ventura and i prefer SoniXD

dweymouth commented 1 year ago

Thanks to @whorfin, Supersonic should now support back to Mac OS High Sierra! @valterbarreira I added a new build to the latest release that should be able to run on your Mojave mac. If you try it, let me know if it works or not! Bonus - you get a preview of new features not available in the other OS builds yet

valterbarreira commented 1 year ago

Just to say that version 0.2.0 works in Mojave. Thanks