Dhanus3133 / Leetbuddy.nvim

Solve Leetcode problems within Neovim 🔥
MIT License
139 stars 15 forks source link

Tests not working #20

Closed kjellherzke closed 9 months ago

kjellherzke commented 1 year ago

Hello, I was extremely happy that I seemingly finally set up Leetbuddy. But now after writing some test code for a problem and running :LBTest, I do not receive any response even after like 5 minutes or so and only the green text saying Executing.... is visible. In the background it must be still loading with curl or so.. cause I can not do anything else - neovim quite much freezes.

grafik

Dhanus3133 commented 11 months ago

Just added a debug flag where you make it as true in your config and try LBTest and send the response shown in the :messages

ahmed-alahmadi commented 11 months ago

I have more or less a similar issue although it isn't frozen but i get the following error

"Error executing Lua callback: .../share/nvim/lazy/LeetBuddy.nvim/lua/leetbuddy/runner.lua:60: Expected value but found invalid token at character 2 stack traceback: [C]: in function 'decode' .../share/nvim/lazy/LeetBuddy.nvim/lua/leetbuddy/runner.lua:60: in function 'generate_id' .../share/nvim/lazy/LeetBuddy.nvim/lua/leetbuddy/runner.lua:102: in function 'run' .../share/nvim/lazy/LeetBuddy.nvim/lua/leetbuddy/runner.lua:113: in function <.../share/nvim/lazy/LeetBuddy.nvim"

i get a similar issue for submit as well.

mixtli commented 11 months ago

Same issue here. Added some debugging and I'm getting a 403 and a bunch of html telling me my csrf token is invalid. I'm not sure how to log out and try again. Should there be an explicit mechanism to logout and login?

mixtli commented 11 months ago

I remove .lbcookie and tried again with a new session id and csrf token from the web inspector and still got the same thing. Think this thing is broken.

Dhanus3133 commented 11 months ago

Can someone share the :messages logs with debug = true config

ahmed-alahmadi commented 11 months ago

sorry for the late reply, but as @mixtli mentioned i get 403 with debug on

Dhanus3133 commented 11 months ago

Seems like the csrf token is not a valid. Can you try logging into the leetcode in a private/incognito browser and then copy the session and csrf token from there.

ahmed-alahmadi commented 11 months ago

Unfortunately, i still get the same issue. Let me know if you need more details.

Dhanus3133 commented 11 months ago

Share the logs.

efren-yuen commented 10 months ago

You need to log in to the 'LeetCode' website to verify your email address and ensure that you can perform and submit actions on the website.

andrescuco commented 9 months ago

What @efren-yuen mentioned worked for me, I went to leetcode.com and submitted a random question, then when I tried again on leetbuddy it started working.

Dhanus3133 commented 9 months ago

Great! Closing the issue.