Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot upload recording - but works via curl #353

Closed
bashfulrobot opened this issue May 3, 2019 · 11 comments
Closed

Cannot upload recording - but works via curl #353

bashfulrobot opened this issue May 3, 2019 · 11 comments

Comments

@bashfulrobot
Copy link

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.

@vranystepan
Copy link

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

@bashfulrobot
Copy link
Author

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

@ku1ik
Copy link
Contributor

ku1ik commented 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.

@bashfulrobot
Copy link
Author

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

@ku1ik
Copy link
Contributor

ku1ik commented 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!

@bashfulrobot
Copy link
Author

bashfulrobot commented May 29, 2019

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

Thank you for your time!

@vranystepan
Copy link

Great! Thank you so much!

@stefanv
Copy link

stefanv commented 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

@rlue
Copy link

rlue commented 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

@verfriemelt-dot-org
Copy link

this is still present, the plattform string:

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

@askdba
Copy link

askdba commented 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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants