kawre / leetcode.nvim

A Neovim plugin enabling you to solve LeetCode problems.
MIT License
654 stars 34 forks source link

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

Closed w1475963 closed 2 months ago

w1475963 commented 2 months ago

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" ˋˋˋ

w1475963 commented 2 months ago

😭

kawre commented 2 months ago

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

w1475963 commented 2 months ago

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

IMG_20240411_224646 IMG_20240411_224628

w1475963 commented 2 months ago

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

w1475963 commented 2 months ago

I think this is a cookies cache file. IMG_20240411_231124

w1475963 commented 2 months ago

Curl can work smoothly alone. IMG_20240411_234149

w1475963 commented 2 months ago

Can I modify curl's -D parameter?

kawre commented 2 months ago

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?

w1475963 commented 2 months ago

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.

w1475963 commented 2 months ago

IMG_20240412_141044 😊