[bug] brick after media upload fail #339
Labels
No labels
a11y
Bug
Bug fix
cannot reproduce
CSS
Documentation
enhancement
Feature
Feature request
Held for next release cycle
Minor change
needs change/feedback
performance
priority: critical
priority: high
priority: low
priority: medium
priority: patch welcome
regression
Translation/Locale
WIP
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AkkomaGang/akkoma-fe#339
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version
e530c2bWhat were you trying to do?
Upload a media attachment
What did you expect to happen?
For it to appear in the media tray
What actually happened?
No attachment was added, this error is being thrown in the console
Trying to send the post, can cause two different errors.
media_ids[]set toundefinedIn either cases the FE displays following message:
Error: t.text is undefinedRefreshing the FE causes it to refuse to render the page with the TypeError mentioned before, thus being bricked.
If this was done while replying to someone, it becomes impossible to reopen or toggle the replying form again, with following error:
Severity
I cannot use it as easily as I'd like
Have you searched for this issue?
Hit that same error just now.
The only way to recover is deleting local storage from the Inspect tool.
For the record, this is in Firefox. I was able to upload the same attachment in Google Chrome.
was the attachment a bmp image? if not, can you upload the attachment somewhere and link it? this seems similar to #396
Sorry, it's been a while. I don't think I've had that issue happen since, and I don't have whatever I was trying to upload at the time on hand anymore.
This generally happened afairc when the upload failed with an error response. We fixed the issues in the backend (if any) leading to such responses, so e.g. BMP files work now.
However we left this open, becuase regardless of what the backend returns, the frontend shouldn’t save invalid data to its internal state in such a way it completely bricks itself. Instead it should display an erorr popup with any information and not modify the attachment state at all.
You can probably reproduce the bricking issue with a local dev server by stubbing out the upload endpoint to always return a HTTP 500 error.
oh, that's a very good point! I'll see if I can do anything tomorrow or so