Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run Leet run and the session is expired immediately after login #82

Open
heberuriegas opened this issue Mar 21, 2024 · 8 comments

Comments

@heberuriegas
Copy link

When I logged in I have an Session expired? message, when I try to run leetcode problem with Leet run it prompt The cookie box input.

Session expired? Enter a new cookie to keep using leetcode.nvim

Did I do something wrong ?

@AlOwain
Copy link
Contributor

AlOwain commented Mar 21, 2024

Ah, I experienced the same issue just a while ago, it somehow works now and here's what I did:

  • I first got my session cookie from chromium which is where I first found the issue

  • I went to Firefox and used a cookie from a session I had previously logged in with, and it did not work.

  • I tried reinstalling leetcode.nvim but there was no change

  • Then I tried simply logging out and back in on Firefox and entering the new cookie and it fixed itself, leads me to believe that is what actually fixed the issue for me.

I have to note that sifting through similar issues leads me to believe it's something to do with chromium, and that the issue seems to only manifest itself after running a test or submitting an answer.

Till we get further information I recommend just trying to use the Firefox session cookie instead.

@kawre
Copy link
Owner

kawre commented Mar 21, 2024

@heberuriegas can you confirm that you are using cookies from graphql requests?

@AlOwain
Copy link
Contributor

AlOwain commented Mar 23, 2024

@heberuriegas can you confirm that you are using cookies from graphql requests?

I know you were asking Heber Uriegas but I thought I should just mention my personal experience with it.

At the time I used graphql requests in all my attempts. I made sure I did

@Wwayne1
Copy link

Wwayne1 commented Mar 25, 2024

I faced the same issue here and tried the steps @AlOwain said but didn't resolve.

The leetcode.nvim will shows Sign-in successful at first and then pop up with a Session expired? Enter a new cookie to keep using leetcode.nvim`` error.

However, I can normally view leetcode questions list and submit my code after the pop up disappear lol.

I am using the newest version for both leetcode.nvim and neovim.

@heberuriegas
Copy link
Author

heberuriegas commented Apr 9, 2024

@heberuriegas can you confirm that you are using cookies from graphql requests?

Sorry for the delay. Yes I'm using the cookies from the graphql request. I had some other insights, the error happen only in certain problems when I tried to run with the samples. eg. Find minimum in rotated sorted array.

When I tried to run it logged me off

@kawre
Copy link
Owner

kawre commented Apr 11, 2024

@heberuriegas does this happen randomly or every time you run some specific problems like Find minimum in rotated sorted array?

@heberuriegas
Copy link
Author

some specific problems, it did happen every time to that problem.

@kawre
Copy link
Owner

kawre commented Apr 11, 2024

When you run some problem that works on leetcode.nvim and Find minimum in rotated sorted array, both in a browser, are there any differences between response headers, like cf-ray? Look for https://leetcode.com/problems/{problem_slug}/interpret_solution/ requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants