Closed nc7s closed 5 months ago
Do you know how I could go about reproducing this behavior?
Oh sorry, forgot to include reproducing steps. Just disconnect your computer's network to make the download fail.
Same here
How often does this actually happen? Like, why are we using Fisher with a bad network to begin with?
Because we have no control over network conditions? Carrier QoS, network congestion, etc. That's why retries are a standard in many network facing applications.
For me it has nothing to do with network. I was setting up fisher with my dotfiles and it was failing if files of the plugins already existed
@cupcakearmy ...it was failing if files of the plugins already existed
See https://github.com/jorgebucaran/fisher/issues/624 for background. A --force flag has been proposed, but no one is currently working on it. Would that flag help in your case?
This doesn't appear to be a simple adjustment, but ideally, we would want to revert if the network goes down. If anyone has an elegant, streamlined solution, I'm all ears! Otherwise, we can address this in Fisher 5. Maintaining Fisher as small, concise, and simple is a core objective of the project, so there's no guarantee that I'll work on this, but I will certainly look into it. 🙌
With the existing files scenario this looks like a failure recovery in general, i.e. update/download to a temp dir and replace the old only when the new is verified to be usable. Still the verification needs a good concept and implementation.
if git is available on the system, we could git clone the repository into $XDG_STATE_HOME/fisher
and go from there
Is there any sort of temporary fix for this? I can work with a broken prompt but I really need nvm.fish for work. How would I go about uninstalling and reinstalling fisher along with all plugins?
A possible temporary solution is to minimize the use of Fisher when you're on an unreliable network. 😉
And you can probably fix all the issues by reinstalling:
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
I'm on a stable network now (I think before I was on train WiFi that wasn't very reliable), however when trying to reinstall using the command, it comes up with a similar error:
binoop@abels-air.lan /Users/binoop > curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
fisher install version 4.4.3
Fetching https://api.github.com/repos/jorgebucaran/fisher/tarball/HEAD
fish: No matches for wildcard '$temp/*/*'. See `help wildcards-globbing`.
command cp -Rf $temp/*/* /var/folders/73/hmmpx_4501b3_ty6sr7vkhm80000gn/T/tmp.5RFUOPp8
^~~~~~~~^
Installing jorgebucaran/fisher
Updated 1 plugin/s
And it doesn't do anything :/
Could you provide more details about your environment?
I'm running fisher 4.4.3 with fish 3.6.0 and iTerm2 3.4.20 on macOS Ventura 13.5. All running on M1 MacBook Air.
I'm not sure what the issue is. If Fisher is already installed, try removing everything first:
fisher ls | fisher remove
Well, fisher does let me remove everything, but the same error occurs when attempting to install fisher again. Is there any way to manually get rid of the command with all it's files altogether?
All plugins should be gone. Open a new terminal to check if fisher
is still there.
If the issue persists, cd into ~/.config/fish/functions
and delete the fisher.fish
file for good.
Hmm. I removed fisher with fisher remove
and opened a new terminal, but was still able to invoke the fisher
command. I went into ~/.config/fish/functions
and fisher.fish
isn't there, despite the fact that I'm still able to invoke it...
Maybe try type fisher
to see where it really comes from.
Okay, so for some reason I had installed fisher using homebrew? Uninstalled that but now the normal way to install isn't working:
binoop@abels-air ~> curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
fish: Unknown command: fisher
fish:
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
^~~~~^
I don't recommend installing Fisher using brew, but that's a different topic. Do you happen to have a .curlrc file? That could be the problem.
Honestly I don't even remember installing it via Homebrew at all, but oh well 🤷
I don't have a .curlrc file.
Does this print anything to your console?
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish
No, it gives a return code of 35. And yeah looking at the code for fisher.fish
I am beginning to see the issue now. I guess that's the problem then, I have been facing difficulty with curl recently, but not exactly sure how to fix it.
Well, curl is required for using Fisher, so you'll need to sort that out.
See here: https://curl.se/download.html#MacOSX
And while you're at it, double-check to make sure you don't have a .curlrc
file lurking in your home directory. Some people have good reasons for having one, but it doesn't look like that's the case for you.
curl code 35 is SSL/TLS error. You may want to add -vvv
after curl
to see what's going on (or not, if it already gave a clear explanation).
Anyway, this looks like another "bad network" scenario. Details of curl error is irrelevant for this issue.
Completely my bad, I hadn't realised a firewall program of mine was blocking curl 🤦 Sorry for wasting your time, it's working perfectly now, thank you!
if git is available on the system, we could git clone the repository into
$XDG_STATE_HOME/fisher
and go from there
This is actually a pretty viable solution I somehow overlooked.
Quite a few things just git clone to install and git pull to update: (n)vim plugin managers to name an example.
At least git handles failure recovery; a naive download & overwrite approach, hardly so.
This is a rare occurrence. Fisher generally performs well for most users, and direct downloads tend to be faster. Previously, we used git for handling downloads but switched to our current, more straightforward and minimal approach for its simplicity. It was a trade-off we decided to make.
Simplicity is great, I love it too, but the real world is unfortunately unreliable, sometimes ugly. To make things work reliably, often requires solutions not so "straightforward" or "minimal". You are lucky to have never encountered bad network conditions, I hope it keeps that way.
Closing since it's no more concern for me. Still, thanks for the fish.
I got your point. This is a trade-off. Look, if we can manage this more efficiently without adding significant complexity, then it's worth considering. PR welcome!
Sometimes with bad network,
fisher update
fails, and that leads to disappeared fisher and other installed plugins.When the update fails, fisher complains like this (you can see the prompt changed from tide to fish default because tide was gone):
My guess is that "old" copies were deleted regardless of the download, but haven't digged into that chunk of "eval" code to confirm it.
Using fisher 4.4.3 with kitty 0.26.5 on macOS 13.1.