mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 07:55:51 +03:00
[GH-ISSUE #508] Manual upload of recording fails on Ubuntu 20.04 #894
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#894
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?
Originally created by @sskras on GitHub (Jun 23, 2022).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/508
It works if I upload the small recording (195 bytes), but fails when I try to upload the 100 kB:

The curl session return HTTP/2 500 code and says "Internal Server Error":
Any ideas on how to proceed?
@sskras commented on GitHub (Jun 23, 2022):
I must admit that the bigger recording comes from the Asciinema crash due to the filled disk space.
The file was truncated, maybe its structure (the JSON?) is damaged. Just a thought.
@sskras commented on GitHub (Jun 25, 2022):
OK, looks like it's supposed to be a multiline file containing JSONs separated by newlines:
https://blog.asciinema.org/#asciicast-v2-file-format
So I checked last line of the file:
So it really looks like it's truncated:
Now fixing end of the file and counting total lines:
... and doing a per-line check using jsonlint (from python3-demjson package):
So the problem seems to be in the last line only.
@sskras commented on GitHub (Jun 25, 2022):
Making a copy:
Trying to fix:
And voila, the error is gone:
@sskras commented on GitHub (Jun 25, 2022):
Now trying to upload the adjusted copy:
Voila – it's here, on the server!
It would be nice if
asciinemaclient had a functionality to fix the broken casts. Or at least to check their integrity.Can this bugreport be left open with the latter request?
@ku1ik commented on GitHub (Apr 15, 2023):
Glad you figured it out 👍
I don't think it's worth the extra work given user's full disk is not really asciinema's problem :)
@sskras commented on GitHub (Apr 19, 2023):
@sickill, I partially disagree. Asciinema should:
(1) not crash when disk is full but exit gracefully;
(2) when crashing, it should handle the signal & tell that the output file is incomplete (in the stdout).
Should I file new issues about these points?
Then (3) web-service should output the human readable form of the error it encountered.
Not sure where is its repository / issue tracker.
@ku1ik commented on GitHub (Apr 19, 2023):
In recently merged https://github.com/asciinema/asciinema/pull/545 I made it not crash, and instead show desktop notification "Write error, recording suspended". This should adress (1) and (2). It's doesn't immediately exit because you may be running some program whose interruption is undesired, so instead you get desktop notification and you can either continue your work / do cleanup, or just exit recorded program/shell immediately at your will.
Here's repo for the server component where we handle uploads: https://github.com/asciinema/asciinema-server/
@sskras commented on GitHub (Apr 20, 2023):
Thanks for the details!