-
-
Notifications
You must be signed in to change notification settings - Fork 53
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] Ass considers an ID as valid, and crashes when it tries to load the corresponding file since it does not exist #103
Comments
As a solution, I manually removed this particular upload from the data.json file, and restarted ass. |
Re-read the issue and this doesn't apply, writing new comment |
I'm not sure what you mean by this. The upload process saves the file to disk/wherever first, then generates the ID after. If the file save failed, the upload is
My main reply to this is simply that hosts should not be touching the uploads folder (I know it's not a great solution but you can delete using the ShareX program by right-clicking an image -> Open -> Deletion URL). With that said, this definitely should not crash and I will look into this.
I get the idea but because of my prior notes this wouldn't apply.
Based on the Issue and how ass operates internally I think this must be what happened, though I'm not sure what would have caused it to fail. |
Is there an existing Issue for this bug?
Expected behavior
This unhandled error should be handled to avoid ass crashing and making the instance reboot.
Actual behavior
ass restarts and is therefore down for a few seconds.
Steps to reproduce
I don't exactly know how the bug occured, but this specific URL seems to throw an unhandled error (see logs).
If I try to go to
https://domain.tld/whatever
, I get the "Not Found" error message, but if I go tohttps://domain.tld/FjwUGE0WuanH
, ass crashes (and restarts) and I get a 502 from my reverse proxy.My guess is that at some point in November (see logs), an upload failed, and ass considers the ID passed in the URL as valid, and when it tries to upload the file corresponding to this ID, it fails, because the file does not exist (I checked just to make sure and yes, the file
f8f0d045205bf5dd7cc9abdaf6ec4b2cfdd66e31
does not exist in the given path.To begin with, it may be a good idea to handle this error in case the file does not exist (or no longer exists), as it may occur if you mistakenly delete the files in the uploads folder, and may therefore cause some trouble (an instance that restarts in a loop if many requests are made to previously existing IDs).
Then, maybe double check the upload process, in order to remove from the database an upload that did not finish correctly and did not create a file.
Logs (optional)
ass version
0.9.1
Deployment
Docker
File storage
Local
Operating system
Debian 10
Node version
Node v12.22.8
Storage method
Papito
Reverse proxy
Reverse proxy software
Nginx 1.20.2
Cloudflare
The text was updated successfully, but these errors were encountered: