jannis-baum / Vivify

Live Markdown viewer
GNU General Public License v3.0
42 stars 6 forks source link

macOS 15.1 problems #191

Open richard-autry opened 1 day ago

richard-autry commented 1 day ago

Description

viv does not appear on path after installing with brew. May also be related to recent upgrade to macOS Sequoia 15.1.1.

Adding viv and vivify-server directly to PATH in .zshrc also did not resolve problem.

This of course breaks the vivify.vim plugin (which I was using before).

To Reproduce

brew upgrade jannis-baum/tap/vivify
...
viv
zsh: command not found: viv

Context

My operating system is: macOS Sequoia 15.1.1

Running viv --version outputs:

viv --version
zsh: command not found: viv

If I run directly from brew install location:


cd /opt/homebrew/Cellar/vivify/0.6.2.reinstall/bin/
./viv --version
Fatal: "/opt/homebrew/Cellar/vivify/0.6.2.reinstall/bin/vivify-server" crashed.
Please use the link below to submit a bug report.

The bug report template will help you provide the necessary information and maybe even find a solution yourself.

https://github.com/jannis-baum/Vivify/issues/new?labels=type%3Abug&template=bug-report.md

./viv: line 97: 7576 Abort trap: 6 nohup "$vivify_server" "$@" > "$output" 2> /dev/null


> I installed Vivify in the following way (e.g. name of the package manager, self-compiled or development mode):

brew upgrade jannis-baum/tap/vivify


> This is what happens when I kill any running instance of Vivify with `killall vivify-server` and then run `vivify-server` at the absolute installation path (e.g. at `command -v vivify-server`) instead of `viv` and try to reproduce the problem:

killall vivify-server No matching processes belonging to you were found



> In the following I specify if I use any custom configuration, and if so provide it in its entirety including any additional files referenced there (e.g. CSS or JavaScript):
jannis-baum commented 1 day ago

Hey there! Did this start happening when you upgraded your macOS or when you upgraded Vivify?

Another question, could you let me know what your $PATH is? E.g. by echo $PATH

richard-autry commented 1 day ago

Technically, I updated macOS first (to latest version).

This broke the command :Vivify in nvim (it stopped working), so I decided to upgrade vivify.

The PATH issues started after the brew upgrade.

PATH output:

echo $PATH
/Users/richardautry/.nvm/versions/node/v16.20.2/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/richardautry/.local/bin:/Users/richardautry/.local/bin:/Users/richardautry/istio-1.22.0/bin

I had added viv and vivify to that PATH (to the Cellar install), but that didn't change anything on my end.

jannis-baum commented 1 day ago

Okay, strange. I'm not on 15.1.1 yet so it's a bit hard to debug, I might try and upgrade in the next days.

Does your opt/homebrew/bin have executable viv and vivify-server files? E.g. if you run ls -l /opt/homebrew/bin | grep viv

jannis-baum commented 1 day ago

Ah and also from your first description it seems you can't even run vivify-server at all, right? Can you try and download the executables from the release page and directly execute ./vivify-server in there and see what happens?

richard-autry commented 1 day ago

No results for

ls -a -l /opt/homebrew/bin | grep viv

Will try download from release page next

richard-autry commented 1 day ago

So a couple things.

I got a pop-up saying macos could not verify that the program does not contain malware. It suggested trashing the file and clicking "Done" didn't do anything.

I had to set special privileges in Privacy & Security settings to allow for vivify-server

When I finally got it to run, I got this error:

./vivify-server
dyld[11759]: Library not loaded: /opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib
  Referenced from: <C3E8D59C-11C6-3F3D-8D0B-4BF67EDF8C3F> /Users/richardautry/Downloads/vivify-macos/vivify-server
  Reason: tried: '/opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib' (no such file), '/opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib' (no such file)
[1]    11759 abort      ./vivify-server
jannis-baum commented 1 day ago

No results for

ls -a -l /opt/homebrew/bin | grep viv

Ah then Homebrew never installed the executables into the bin directory which explains why it's not on your path. I think Homebrew calls that "linking". Maybe you can try and fully uninstall Vivify, run Homebrew cleanup, and then reinstall, that should link it properly.

brew uninstall vivify
brew cleanup

Then check that there's nothing Vivify-related left in /opt/homebrew, and finally brew install vivify. That should hopefully do it, seems like Homebrew just somehow got confused.

I got a pop-up saying macos could not verify that the program does not contain malware. It suggested trashing the file and clicking "Done" didn't do anything.

Ah, that suggests that Apple decided to change their super useful security stuff yet again... I'll look into that but it'll probably take a while, might be that GH needs to update their runners to the newest macOS for this to work, which is something they are usually super slow with.

When I finally got it to run, I got this error:

This part is a bit strange because it should be using icu4c@76, not icu4c@75 as it says in your error message. Does

test /opt/homebrew/opt/icu4c@76/lib/libicui18n.76.dylib && echo exists || echo missing

say exists or missing?

jannis-baum commented 1 day ago

All that said, I can't promise I'll be able to fix things soon. What you can do to use Vivify anyways in the meantime is building yourself, that should definitely work. I'll give you quick instructions here so you don't have to read too much:

  1. brew install node yarn
  2. git clone https://github.com/jannis-baum/Vivify.git; cd Vivify
  3. yarn
  4. run ./configure <directory> with the <directory> you want to install to (this should be on your $PATH)
  5. make install

This way it will use your installed node with working linked libraries and the security thing isn't an issue either because macOS knows you built it yourself and assumes it to be safe.

richard-autry commented 1 day ago

brew uninstall vivify brew cleanup Then check that there's nothing Vivify-related left in /opt/homebrew, and finally brew install vivify. That should hopefully do it, seems like Homebrew just somehow got confused.

Running these commands didn't change anything. However, running

brew link vivify

finally got viv on my PATH.

richard-autry commented 1 day ago
test /opt/homebrew/opt/icu4c@76/lib/libicui18n.76.dylib && echo exists || echo missing
exists
richard-autry commented 1 day ago

After linking, this error still persists

vivify-server
dyld[19037]: Library not loaded: /opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib
  Referenced from: <C3E8D59C-11C6-3F3D-8D0B-4BF67EDF8C3F> /opt/homebrew/Cellar/vivify/0.6.2.reinstall/bin/vivify-server
  Reason: tried: '/opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib' (no such file), '/opt/homebrew/opt/icu4c@75/lib/libicui18n.75.dylib' (no such file)
[1]    19037 abort      vivify-server
jannis-baum commented 1 day ago

Actually, the issue with the icu library is probably that the runner uses an older Node version. I'll try and fix it now.

richard-autry commented 1 day ago

All that said, I can't promise I'll be able to fix things soon. What you can do to use Vivify anyways in the meantime is building yourself, that should definitely work. I'll give you quick instructions here so you don't have to read too much:

brew install node yarn git clone https://github.com/jannis-baum/Vivify.git; cd Vivify yarn run ./configure with the you want to install to (this should be on your $PATH) make install This way it will use your installed node with working linked libraries and the security thing isn't an issue either because macOS knows you built it yourself and assumes it to be safe.

Followed instructions with manual build and everything is working. I had to install node v20 (was using 16 via nvm, not sure that matters).


No problem on a quick fix. Will be great to see this updated via brew when ready so let me know!

Thanks for the quick reply. Glad I could help debug Apple's "super useful security stuff" 😄 . Let me know if you want me to try more stuff so you don't have to risk an upgrade.

🍻

jannis-baum commented 1 day ago

Awesome, thank you for all the help! I'm trying to get the CI to make a working build now, I'll let you know if I'm successful ^^ If the library stuff works I'll message you here and ask you to check if the security thing is still an issue :)

jannis-baum commented 1 day ago

Hey again! I think I have finally fixed the library issue for good now. The security issue probably not though, from what I have read in brief research it seems that the only way to avoid this is to sign the executables with a paid 100$/year Apple Developer account... I'll look into that.

Would you be so kind and verify that the build downloaded from the CI run here works for you? You can go to the page, scroll down to Artifacts and download vivify-macos. Then unpack it and execute ./vivify-server --version. I would expect that it will still have the security problem (right?), but if you allow that through the settings like you did it should at least run.

EDIT: There seem to be no good resources about the security thing so I've contacted Apple support, let's see if/what they reply.

richard-autry commented 1 day ago

Right, I get the same security prompts:

First run:

./vivify-server --version

Screenshot 2024-11-21 at 12 03 52 PM

Output:

[1]    30307 killed     ./vivify-server --version

Then navigating to settings and allowing:

Screenshot 2024-11-21 at 12 04 11 PM

Then second run:

./vivify-server --version

Screenshot 2024-11-21 at 12 04 24 PM

Selected "Open Anyway"

Final output:

dyld[30404]: Library not loaded: /opt/homebrew/opt/c-ares/lib/libcares.2.dylib
  Referenced from: <10B905AF-0642-3501-AFB3-4A21FA6FF698> /Users/richardautry/Downloads/vivify-macos/vivify-server
  Reason: tried: '/opt/homebrew/opt/c-ares/lib/libcares.2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/c-ares/lib/libcares.2.dylib' (no such file), '/opt/homebrew/opt/c-ares/lib/libcares.2.dylib' (no such file)
[1]    30404 abort      ./vivify-server --version
richard-autry commented 1 day ago

I notice the c-ares library referenced there. I'll note that I no longer have vivify installed via brew, so not sure if that library was removed.

jannis-baum commented 1 day ago

Thanks! Right, that's another dependency. The release notes will include this in the future and the Brew package automatically installs them. These are the dependencies:

brotli
c-ares
icu4c@76
libnghttp2
libuv
openssl@3

Could you try again after having installed all of those?

richard-autry commented 1 day ago

After brew install, command worked:

brew install brotli c-ares icu4c@76 libnghttp2 libuv openssl@3
==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################################################################################################################################################# 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
############################################################################################################################################################################################################################# 100.0%
Warning: brotli 1.1.0 is already installed and up-to-date.
To reinstall 1.1.0, run:
  brew reinstall brotli
Warning: icu4c@76 76.1_1 is already installed and up-to-date.
To reinstall 76.1_1, run:
  brew reinstall icu4c@76
Warning: libnghttp2 1.64.0 is already installed and up-to-date.
To reinstall 1.64.0, run:
  brew reinstall libnghttp2
Warning: libuv 1.49.2 is already installed and up-to-date.
To reinstall 1.49.2, run:
  brew reinstall libuv
Warning: openssl@3 3.4.0 is already installed and up-to-date.
To reinstall 3.4.0, run:
  brew reinstall openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/c-ares/manifests/1.34.3
Already downloaded: /Users/richardautry/Library/Caches/Homebrew/downloads/a7247aee29b6c331ce6ec6227ce4c11ab5aa34f2073cbcaa5977bdafe8c996b4--c-ares-1.34.3.bottle_manifest.json
==> Fetching c-ares
==> Downloading https://ghcr.io/v2/homebrew/core/c-ares/blobs/sha256:e0a8f161010f3f7ea690a32812121acf1fe2fd5f9f61dee32ed19fbe9677222a
Already downloaded: /Users/richardautry/Library/Caches/Homebrew/downloads/97807591520030cf61417118d836dd718463f2ea69cc8331d7074223e8645b35--c-ares--1.34.3.arm64_sequoia.bottle.tar.gz
==> Pouring c-ares--1.34.3.arm64_sequoia.bottle.tar.gz
🍺  /opt/homebrew/Cellar/c-ares/1.34.3: 176 files, 1MB
==> Running `brew cleanup c-ares`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/richardautry/Library/Caches/Homebrew/c-ares_bottle_manifest--1.33.1... (8.9KB)

./vivify-server --version
vivify-server 192/merge
STARTUP COMPLETE
(node:33771) ExperimentalWarning: Single executable application is an experimental feature and might change at any time
(Use `vivify-server --trace-warnings ...` to show where the warning was created)
jannis-baum commented 1 day ago

Great, thanks! That will be it for now, let's see what Apple support says