asciinema / asciicast2gif

Generate GIF animations from asciicasts (asciinema recordings)
MIT License
1.2k stars 83 forks source link

[bug] Error: certificate has expired #83

Closed geekyouth closed 2 years ago

geekyouth commented 2 years ago
[root@SZ gif]# docker run --rm -v $PWD:/data asciinema/asciicast2gif https://asciinema.org/a/XFTSQAeaffrg7XSDuyK1Hdr8x.cast?dl=1 sz-1.gif
==> Loading https://asciinema.org/a/XFTSQAeaffrg7XSDuyK1Hdr8x.cast?dl=1...
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: certificate has expired
    at Error (native)
    at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)
    at emitNone (events.js:86:13)
    at TLSSocket.emit (events.js:185:7)
    at TLSSocket._finishInit (_tls_wrap.js:609:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:439:38)
[root@SZ gif]# export http_proxy=http://192.168.8.12:1080
[root@SZ gif]# export https_proxy=http://192.168.8.12:1080
[root@SZ gif]# docker run --rm -v $PWD:/data asciinema/asciicast2gif https://asciinema.org/a/XFTSQAeaffrg7XSDuyK1Hdr8x.cast?dl=1 sz-1.gif
==> Loading https://asciinema.org/a/XFTSQAeaffrg7XSDuyK1Hdr8x.cast?dl=1...
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: certificate has expired
    at Error (native)
    at TLSSocket.<anonymous> (_tls_wrap.js:1092:38)
    at emitNone (events.js:86:13)
    at TLSSocket.emit (events.js:185:7)
    at TLSSocket._finishInit (_tls_wrap.js:609:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:439:38)
[root@SZ gif]#
mathieu-aubin commented 2 years ago

@sickill verified on a fresh pull

otobrglez commented 2 years ago

It seems that the base docker image and/or the dependencies and certificates or something like that is outdated. I've managed to get into the image and fiddle a bit with the Node.js settings. This thingy works if you pass env variable to when doing docker run like so:

docker run --rm -v $PWD:/data -e NODE_TLS_REJECT_UNAUTHORIZED=0 asciinema/asciicast2gif .....

Node.js documentation on NODE_TLS_REJECT_UNAUTHORIZED can be found here.

Hope it works. ✌️

mathieu-aubin commented 2 years ago

Works as a workaround but ultimately, building a new image with a more recent Nodejs version (image has node 6.x installed) would make more sense.

But hey - works, so...

ku1ik commented 2 years ago

I don't have bandwidth to fix this. Also this tool has been superceded by agg anyway. For now I suggest wget <url> + agg/ asciicast2gif combo.