[bug] brick after media upload fail #339

Open
opened 2023-09-02 09:49:06 +00:00 by Crafti · 1 comment

Version

e530c2b

What 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

TypeError: t is undefined
    r file_type.service.js:9
    data attachment.js:57

Trying to send the post, can cause two different errors.

  1. Server returns 422 "Cannot post an empty status without attachments" because the post was empty
  2. Server returns 400 "Internal server error" because the FE tried to submit media_ids[] set to undefined

In either cases the FE displays following message: Error: t.text is undefined

Refreshing 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:

TypeError: e is null
    [...]
    tn status.js:90
    toggleReplying status.js:482
    [...]
    8948/Ot</e[0]< reply_button.vue:8
    [...]

Severity

I cannot use it as easily as I'd like

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Version e530c2b ### What 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 ``` TypeError: t is undefined r file_type.service.js:9 data attachment.js:57 ``` Trying to send the post, can cause two different errors. 1. Server returns 422 "Cannot post an empty status without attachments" because the post was empty 2. Server returns 400 "Internal server error" because the FE tried to submit `media_ids[]` set to `undefined` In either cases the FE displays following message: `Error: t.text is undefined` Refreshing 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: ``` TypeError: e is null [...] tn status.js:90 toggleReplying status.js:482 [...] 8948/Ot</e[0]< reply_button.vue:8 [...] ``` ### Severity I cannot use it as easily as I'd like ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
Mergan added the
Bug
label 2023-09-05 07:36:33 +00:00
Contributor

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.

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.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma-fe#339
No description provided.