[GH-ISSUE #353] Cannot upload recording - but works via curl #840

Closed
opened 2026-03-15 10:41:09 +03:00 by kerem · 11 comments
Owner

Originally created by @bashfulrobot on GitHub (May 3, 2019).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/353

Hi there,

For some reason, the asciinema cannot upload the recording.

  • I attempted the retry command - but that does not work either.
  • I can play back the local file with the asciinema play command.
  • I can upload via curl (command came from the IRC channel, but cannot remember the command currently).
  • I have asciinema installed via a snap package.
/snap/bin/asciinema

Error

$ asciinema upload /tmp/tmpc5xmedw5-ascii.cast
asciinema: upload failed: The server is having temporary problems. Try again in a minute.
asciinema: retry later by running: asciinema upload /tmp/tmpc5xmedw5-ascii.cast

System

  Host: bashfulrobot Kernel: 5.0.0-13-generic x86_64 bits: 64 
  Desktop: i3 4.16.1 Distro: Ubuntu 19.04 (Disco Dingo)

Asciinema Version

asciinema 2.0.2

Python Versions

python --version
Python 2.7.16

python3 --version
Python 3.7.3

Thank you.

Originally created by @bashfulrobot on GitHub (May 3, 2019). Original GitHub issue: https://github.com/asciinema/asciinema/issues/353 Hi there, For some reason, the `asciinema` cannot upload the recording. * I attempted the retry command - but that does not work either. * I can play back the local file with the `asciinema play` command. * I can upload via curl (command came from the IRC channel, but cannot remember the command currently). * I have asciinema installed via a snap package. ``` $ which asciinema /snap/bin/asciinema ``` ## Error ``` $ asciinema upload /tmp/tmpc5xmedw5-ascii.cast asciinema: upload failed: The server is having temporary problems. Try again in a minute. asciinema: retry later by running: asciinema upload /tmp/tmpc5xmedw5-ascii.cast ``` ## System ``` Host: bashfulrobot Kernel: 5.0.0-13-generic x86_64 bits: 64 Desktop: i3 4.16.1 Distro: Ubuntu 19.04 (Disco Dingo) ``` ## Asciinema Version ``` asciinema 2.0.2 ``` ## Python Versions ``` python --version Python 2.7.16 python3 --version Python 3.7.3 ``` Thank you.
kerem closed this issue 2026-03-15 10:41:14 +03:00
Author
Owner

@vranystepan commented on GitHub (May 12, 2019):

@bashfulrobot I suppose it's caused by Disco Dingo :) I have the same issue with Xubuntu 19.04.

<!-- gh-comment-id:491618236 --> @vranystepan commented on GitHub (May 12, 2019): @bashfulrobot I suppose it's caused by Disco Dingo :) I have the same issue with Xubuntu 19.04.
Author
Owner

@bashfulrobot commented on GitHub (May 13, 2019):

@vranystepan Thank you for confirming the issue and that I am not the only one.

<!-- gh-comment-id:491946006 --> @bashfulrobot commented on GitHub (May 13, 2019): @vranystepan Thank you for confirming the issue and that I am not the only one.
Author
Owner

@ku1ik commented on GitHub (May 14, 2019):

Can you try uploading with curl as shown here? https://gist.github.com/sickill/514860f60d01ed9218be4ede51a33887

This will show us wether this is some OS specific issue (SSL certs) or maybe Ubuntu's Python 3 build issue.

<!-- gh-comment-id:492102400 --> @ku1ik commented on GitHub (May 14, 2019): Can you try uploading with `curl` as shown here? https://gist.github.com/sickill/514860f60d01ed9218be4ede51a33887 This will show us wether this is some OS specific issue (SSL certs) or maybe Ubuntu's Python 3 build issue.
Author
Owner

@bashfulrobot commented on GitHub (May 21, 2019):

@sickill This works without issue via curl (mentioned in the original post). :-) But I just ran again with the command - no issues via curl at all. In fact, my temp workaround is a shell alias.

<!-- gh-comment-id:494514659 --> @bashfulrobot commented on GitHub (May 21, 2019): @sickill This works without issue via curl (mentioned in the original post). :-) But I just ran again with the command - no issues via curl at all. In fact, my temp workaround is a shell alias.
Author
Owner

@ku1ik commented on GitHub (May 29, 2019):

I found the problem, and it's not something I expected :)

On Ubuntu Disco the User-Agent string that is sent is something like:
asciinema/2.0.2 CPython/3.7.3 Linux/4.9.125-linuxkit-x86_64-with-Ubuntu-19.04-disco

The final part is the result of platform.platform() which is basically a uname.

So far so good.

Now, the nginx on asciinema.org uses "bad bots" blocking list from https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker which matches user agent string against a list of bots known for bad behavior.

It appeared that this block list contains regexp ~*\bDisco\b...

🤦‍♂

I've removed it from the block list, tested on Ubuntu Disco, seems to be working ok now.

Sorry about that!

<!-- gh-comment-id:497114867 --> @ku1ik commented on GitHub (May 29, 2019): I found the problem, and it's not something I expected :) On Ubuntu Disco the User-Agent string that is sent is something like: `asciinema/2.0.2 CPython/3.7.3 Linux/4.9.125-linuxkit-x86_64-with-Ubuntu-19.04-disco` The final part is the result of `platform.platform()` which is basically a `uname`. So far so good. Now, the nginx on asciinema.org uses "bad bots" blocking list from https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker which matches user agent string against a list of bots known for bad behavior. It appeared that this block list contains regexp `~*\bDisco\b`... 🤦‍♂ I've removed it from the block list, tested on Ubuntu Disco, seems to be working ok now. Sorry about that!
Author
Owner

@bashfulrobot commented on GitHub (May 29, 2019):

Confirmed as working! Hopefully, nothing changes in 19.10 (we just started working on it).

Thank you for your time!

<!-- gh-comment-id:497137757 --> @bashfulrobot commented on GitHub (May 29, 2019): Confirmed as working! Hopefully, nothing changes in 19.10 (we just started working on it). Thank you for your time!
Author
Owner

@vranystepan commented on GitHub (Jun 5, 2019):

Great! Thank you so much!

<!-- gh-comment-id:498941670 --> @vranystepan commented on GitHub (Jun 5, 2019): Great! Thank you so much!
Author
Owner

@stefanv commented on GitHub (Sep 27, 2019):

This seems to be the same issue I am experiencing on Debian; curl upload works, Python client fails.

$ uname -a
Linux carbo 4.19.0-5-amd64 #1 SMP Debian 4.19.37-6 (2019-07-18) x86_64 GNU/Linux

$ python -V
Python 3.7.4+

$ pip list | grep asciinema
asciinema                     2.0.2
<!-- gh-comment-id:536029826 --> @stefanv commented on GitHub (Sep 27, 2019): This seems to be the same issue I am experiencing on Debian; curl upload works, Python client fails. ``` $ uname -a Linux carbo 4.19.0-5-amd64 #1 SMP Debian 4.19.37-6 (2019-07-18) x86_64 GNU/Linux $ python -V Python 3.7.4+ $ pip list | grep asciinema asciinema 2.0.2 ```
Author
Owner

@rlue commented on GitHub (Oct 30, 2019):

Seconding @stefanv's comment. curl upload works and official Debian package fails on Debian bullseye:

$ uname -a
Linux shibori 5.2.0-3-amd64 #1 SMP Debian 5.2.17-1 (2019-09-26) x86_64 GNU/Linux

$ asciinema --version
asciinema 2.0.2
<!-- gh-comment-id:547712914 --> @rlue commented on GitHub (Oct 30, 2019): Seconding @stefanv's comment. curl upload works and official Debian package fails on Debian bullseye: ``` $ uname -a Linux shibori 5.2.0-3-amd64 #1 SMP Debian 5.2.17-1 (2019-09-26) x86_64 GNU/Linux $ asciinema --version asciinema 2.0.2 ```
Author
Owner

@verfriemelt-dot-org commented on GitHub (Jan 25, 2020):

this is still present, the plattform string:

>>> platform.platform();
'Linux-5.4.0-3-amd64-x86_64-with-debian-bullseye-sid'
<!-- gh-comment-id:578448289 --> @verfriemelt-dot-org commented on GitHub (Jan 25, 2020): this is still present, the plattform string: ``` >>> platform.platform(); 'Linux-5.4.0-3-amd64-x86_64-with-debian-bullseye-sid' ```
Author
Owner

@askdba commented on GitHub (Jan 30, 2021):

After spending hours trying to figure out SSL issues on MacOS Catalina

asciinema: upload failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)>
asciinema: retry later by running: asciinema upload /var/folders/2j/7schjxl10bgdwl5_bsznbqm00000gn/T/tmp62k0vrw7-ascii.cast

None of the solutions provided worked for me. The curl workaround uploads my test recording.
I see this issue is closed but is there a resolution.

<!-- gh-comment-id:770269076 --> @askdba commented on GitHub (Jan 30, 2021): After spending hours trying to figure out SSL issues on MacOS Catalina ``` asciinema: upload failed: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)> asciinema: retry later by running: asciinema upload /var/folders/2j/7schjxl10bgdwl5_bsznbqm00000gn/T/tmp62k0vrw7-ascii.cast ``` None of the solutions provided worked for me. The curl workaround uploads my `test` recording. I see this issue is closed but is there a resolution.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
starred/asciinema#840
No description provided.