Open gabeklavans opened 7 months ago
I could reproduce that issue on my phone using termux but it seems that it's caused by missing write access for creating the dump file (by default in tmp directory) used by curl when using the -D
argument. And it looks like it cannot be omitted when using plenary, but I'm stuck on trying to use a custom path for it...
EDIT: I think that should be plenary issue (https://github.com/nvim-lua/plenary.nvim/issues/536)
In my case, I'm seeing the "plenary_curl_xxxxxxxx.headers" files being created in my dir set by XDG_RUNTIME_DIR
(it was /run/user/1000
for me, which already existed and had proper permissions) and I'm still getting this exit code 23 from plenary. I wonder what else could be causing it.
It definitely has to do with the URL. If I replace it with something simple like https://postman-echo.com/get, I get no error. I'm guessing it has to do with the fact that https://devdocs.io/docs.json is a redirect, but I'm not sure how it was ever working, then.
I'm guessing it has to do with the fact that https://devdocs.io/docs.json is a redirect
But plenary include -L
argument by default and redirect works, the error code 23 is for write error.
@gabeklavans check if you get the error with:
curl -sSL --compressed -X GET https://devdocs.io/docs.json
In my case the --compressed
flag generates the error using
curl --version
curl 8.7.1 (x86_64-pc-linux-gnu) libcurl/8.7.1 OpenSSL/3.0.13 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.61.0
Release-Date: 2024-03-27
However with
curl --version
curl 8.4.0 (x86_64-pc-linux-gnu) libcurl/8.4.0 OpenSSL/3.0.13 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libssh2/1.11.0 nghttp2/1.57.0
Release-Date: 2023-10-11
I don't get the error
Disabling the compression in the plenary calls fixes the issue for me
It seems to be related to this issue: https://github.com/curl/curl/issues/13209 and it seems to already have a fix: https://github.com/curl/curl/pull/13219
Every time the plugin tries to use
curl
to download something, it throws an error fromcurl
I'm using Linux, OpenSUSE Tumbleweed, so I have a pretty up to date
curl
and no weird installations.Even manually trying to download anything from devdocs.io, such as with
curl https://devdocs.io/docs.json -o registery.json
, just returns an empty output.Replacing
curl
withwget
in my command line, and the download happens as intended. This isn't a solution, though, since all the downloads in this plugin use curl, so manually placing everything everytime would be kind of annoying.Adding the
-sSL
flag to mycurl
command also allows the download to succeed.Version: