-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Corrupted uploads with ActiveStorageAdapter crash the store #4095
Comments
Thank you for bringing this up! Is there any information on what the user might be editing through the API? I am looking into reproducing the error. |
I have updated pretty much every option I can think of. At the beginning of your post, you mentioned the url was |
Can I please get your Active Storage settings? Any modifications to the module or adapter? What service are you using, local? |
I'm using a minio running in my own k8s cluster. Not sure if and how it can be related to the Fastly crash, but even if it was, it should not have left the system in such a corrupted state. My storage config is nothing special:
|
Just trying to figure out if there could have been some interruption with data transfer that may have lead to the corruption. Still working on recreating the bug. If you have any other information, please let me know and thank you. |
I reached out to @kennyadsl and we agree that the changes you suggested should be made as image.attachment.url bypasses the earlier fix to catch when an attachment image is corrupted.
Additionally, I will put out a PR for this, however, the patch will most likely not reach the underlying issue of why your image was corrupted in the first place. If you and your team happen to reproduce the bug please let us know (or even breaking the image after the PR). We will keep this issue open for a while. |
Closed by #4103 |
I'm having a situation with attachments once again.
I've once opened a discussion about corrupted uploads, and the solution that I offered there has already been PR'd and merged into master.
But now I've encountered a slightly different case. Turns out the user uploaded an image successfully, and then tried to do something with the stock – the URL was
/api/stock_locations/1/stock_items/58
and there'sStockItemsController
in the backtrace. And it caused some exception inActiveStorage
(as seen in the Airbrake error notification email):And all this resulted in a situation where, again, every page which contains images of this product crashes with an exception (admin pages too). The exception is raised here:
So
@attachment
itself is not nil (otherwise.variant()
would not have be called in the first place), but.variant()
returnsnil
.So the question is, how come? What could cause such a corruption? Can it be fixed? Where?
Solidus Version: 3.0.1
To Reproduce
No idea.
Current behavior
Corrupted attachment causes all pages containing it to crash. Impossible to fix from the UI.
Expected behavior
I expect this situation to be admin-recoverable. If something's gone wrong during attachment manipulation the admin should be able to remove/reupload the corrupted one.
The text was updated successfully, but these errors were encountered: