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
BUG: error An unexpected error occurred: Request failed 404 Not Found. #3530
Comments
cc @juanpicado |
You might need to define specific steps with a vanilla npmjs installation that I can follow to reproduce because at first glance I cannot know if this is a bug on verdaccio or not. Also try out the latest and the version you are using, please.
Could you elaborate on what actually means multiple version? 🤔 |
The BUG is that verdaccio can't resolve the package because its missing from the cache. At first, verdaccio is creating a folder in the cache and download the package, but if the folder already exists and the requested package is a different version that the cache holds, then it returns 404. This is 100% a BUG. |
Thanks, I will try to reproduce it locally and if I confirm might be fixed on the next patch. |
@juanpicado Friendly reminder... Any updates? |
On holidays mode :) will back soon few days |
is there any update on this issue @juanpicado |
@juanpicado Any news? My team is planning to stop using Verdaccio because of this issue. Please share a solution if there is any. |
Nop, things takes time but eventually are done, be patience and be aware I am not having much help (so if someone wants to contribute to speed up I´m happy to review fast). Whenever I have an update I always post on tickets, if I don´t well, there is no much to say 🙃 |
@juanpicado Same problem with Error:
Here is my cache:
As you can see the I am guessing that verdaccio finds the |
@juanpicado Can you prioritize this issue, since its a critical BUG and a big blocker for us and I assume for many others that are using the verdaccio as cache too? |
Why you have In any case, I cannot reproduce locally with a simple npm installation, I see you insist this is a BUG, if that the case, please provide reproducible steps, simple ones, because I can't myself with the info provided. |
@juanpicado You can check #3530 (comment). Reproducing it is simple, let the cache download a specific version of a package, and then try again with a different version of the same package. You will get 404. Do you think that this is caused by |
I don't recommend such high value, package managers also have it own cache system. Why would you need 180 days ? I think invalid cache every week is more than enough, try out. Regarding the steps I followed them and I can't, happy to fix it but due my limited time I need the exact steps otherwise the time for fox the bug is invested only in debugging. |
Ok! Let me try this out and see if the problem persists! I will keep you updated. Thanks. |
@juanpicado Do you have any recommended value? Also, how the cache is being invalidated, and after how many days? For the record our package manager doesn't have any cache. |
On CI yes, pkg manager cache is useless since is discarded (not always in Jenkins you can save it between builds in the same branch). But local does not, so for reproduce mode is something to keep on mind. What value ? Well depends, the tarballs are not invalidated only the metadata (package.Json file) and the value might vary based in your our own needs, how often your devs upgrade? Do you use automation dep managers (renovate)? If is too low you pay a penalty of performance if is to high you get into 404 because verdaccio won't download new metadata upgrades (this might be your error). Npm has 2 min by default, but for CI is to low, so 1 day or 4 days (7 is ok because weekends usually no builds happening) too would be enough to don't get 404 but might happens for such gap of time. You need to do your own math. |
@juanpicado Same problem with |
@juanpicado Any updates? |
Another example of the problem's replication: /verdaccio/storage/data/@types/node $ ls -lrt
total 12692
-rw-r--r-- 1 verdacci node 701331 Jun 30 10:04 node-20.3.2.tgz
-rw-r--r-- 1 verdacci node 634774 Jun 30 10:05 node-16.18.37.tgz
-rw-r--r-- 1 verdacci node 667592 Jun 30 10:06 node-18.15.1.tgz
-rw-r--r-- 1 verdacci node 631992 Jun 30 10:06 node-16.18.23.tgz
-rw-r--r-- 1 verdacci node 677014 Jun 30 10:09 node-18.16.18.tgz
-rw-r--r-- 1 verdacci node 9673282 Jun 30 10:09 package.json But when we are trying to get the error An unexpected error occurred: "http://verdaccio.verdaccio:4873/@types/node/-/node-20.3.3.tgz: Request failed \"404 Not Found\"". This looks like a BUG from Verdaccio side, since the only solution for us is to delete the cache and force verdaccio to re-download the packages. For some reason, Verdaccio sees that the |
we are getting the same problem? is there a fix for that? |
@tomer555 I haven't found any solution. I guess @juanpicado should have to take a look as this looks like a bug in verdaccio. |
got the same problem, looking forward to updates verdaccio version: 5.29.0 |
Version: 5.15.4
This happened when we are trying to change the version of a specific package. Our older package is already cached, and when verdaccio tries to get the tarball from the cache it gets 404 because of the version change.
The solution is to manually delete the folder of the package from the cache and try again. That means that Verdaccio can't support multiple versions in the cache. This is a big blocker.
Config:
To support multiple version, do we have to enable this somehow in the configuration?
The text was updated successfully, but these errors were encountered: