asciinema/asciinema

Upload Error: urlopen error EOF occurred in violation of protocol

hash3liZer opened this issue · 5 comments

I am trying to upload a cast file to the server but the uploading isn't working. I've checked across MacOS and Debian both has the same issue. Also, tried installing asciinema with pip and directly with apt. And tried versions 2.2.0 and 2.1.0 Nothing worked, same issue.

This happens with a specific recording that i do. I've tried a basic file with simple ls command and that uploads just fine. Please note that i've changed nothing in the original file that is being created. Just trying to upload as it is.

The recording that i am trying to do is a simple subrake -d domain.com command from Subrake

To Reproduce

Installed the tool with pip, run auth command to login and upload the file:

$ pip3 install asciinema
$ asciinema auth

# Starting recording and ran the tool
$ asciinema rec /tmp/file.cast
$ subrake -d zonetransfer.me
$ exit

# Uploading
$ asciinema upload castfile.cast

And i get the error:
image

Versions:

  • OS: [macOS Ventura 13.3, Kali 2023.1]
  • asciinema cli: [2.2.0, 2.2.1]
  • Python: 3.11
ku1ik commented

Can you attach a recording file which reproduces this error?

Sure, this is the file that is getting failed. If i run with asciinema play, its plays fine and everything looks good.

file.zip

ku1ik commented

It's the size. It's 17MB, and the upload limit is 8MB currently. You should have got a nicer error message telling that but something have changed around server config which broke that. I recently updated load balancer, I suspect this is when the actual message got lost.

Related issue #335

ku1ik commented

I've found why the actual "too big" error message is not printed. Python's urllib doesn't handle 413 response too well (it does, kinda, but can't cope with prematurely closed connection), and there seems to be no workaround we can make on the client side (this codebase). More on the problem here: psf/requests#2422 (comment)

I've made tweaks to server config though, which should give you more descriptive error message now.

Regarding the size limit: it's for several reasons, I explain it here in more detail: #91 (comment)

ku1ik commented

Since the specific problem (error message) you reported is fixed now I'll close this issue. Feel free to subscribe/comment in #335 though.