Asciinema: Cannot upload recording - but works via curl

Created on 3 May 2019  ·  11Comments  ·  Source: asciinema/asciinema

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.

Most helpful comment

this is still present, the plattform string:

>>> platform.platform();
'Linux-5.4.0-3-amd64-x86_64-with-debian-bullseye-sid'

All 11 comments

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

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

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.

@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.

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!

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

Thank you for your time!

Great! Thank you so much!

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

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

this is still present, the plattform string:

>>> platform.platform();
'Linux-5.4.0-3-amd64-x86_64-with-debian-bullseye-sid'

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yuvalif picture yuvalif  ·  10Comments

Edo78 picture Edo78  ·  5Comments

abaykan picture abaykan  ·  10Comments

ThomasWaldmann picture ThomasWaldmann  ·  3Comments

laughedelic picture laughedelic  ·  7Comments