kawre/leetcode.nvim

it dosen't work when i start it. ( curl - 23)

Closed this issue · 10 comments

it dosen't work every time i start it after i entered cookies.

This is the Error:
ˋˋˋ
"curl: (23) Failed writing received data to disk/application"
ˋˋˋ

😭

It happens right after you enter the cookie? Can you paste a screenshot of this error?

At first, it prompted me to enter cookies.I did it.Then it won't work properly.

IMG_20240411_224646
IMG_20240411_224628

I deleted the cache file of the cookies I entered and tried again.(
When I enter cookies, it looks like this:
IMG_20240411_230408

Press enter,then:

IMG_20240411_230823

I think this is a cookies cache file.
IMG_20240411_231124

Curl can work smoothly alone.
IMG_20240411_234149

Can I modify curl's -D parameter?

It's not cookie file. When you enter cookie, leetcode.nvim will fetch data from leetcode. How plenary.nvim works is that it saves every response into /temp/. It will happen every time you use curl with plenary nvim i think.

Maybe you need sudo rights to write into /temp/ files?

No, I don't have permission to write any files into /temp/ now.

I read the source code of plenary.nvim, and find curl -D has two paths, one is from the environment variable XDG_RUNTIME_DIR and the other is /temp/.

Since I didn't set XDG_RUNTIME_DIR before, I entered the command:

export XDG_RUNTIME_DIR=(a path i have permission to write)

Temporarily solved this problem. Then, I used it for a while and found that the plugin did not report any errors.

Your help was very much appreciated.

IMG_20240412_141044
😊