-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Bug] FATA failed to get question data: no cookie found in browser #193
Comments
May I ask which browser are you using? Currently only standard installation of chrome, edge, safari and firefox are supported. |
chrome I also tried with safari, still not work. |
I don't know why, but when I installed firefox and use it to login leetcode, the cli woks~~ |
I added some logs in the master branch, can you try go install github.com/j178/leetgo@master
DEBUG=1 leetgo pick 1 and paste the log here? It may help debugging why |
seems the new change breaks the configfile format:
so I removed ~/.config/leetgo directory and tried from begin. rm -rf ~/.config/leetgo
mkdir demo
cd demo
leetgo init I loged in leetcode with chrome
**and this time, firefox also not work ~~**
|
config file format changed in v1.0, here is the release note, which metioned the breaking change: https://github.com/j178/leetgo/releases/tag/v1.0 It seems go install github.com/j178/leetgo@master
leetgo init -f -t cn demo
cd demo
DEBUG=1 leetgo pick 1 After logging in in Chrome, please wait for some time (like 30 seconds) before trying |
@j178 tried the latest version Works for FireFox but not for Chrome
output for
|
|
I have no idea why it doesn't work. I can't reproduce the problem on my computer, so I can't help solve it. Sorry. If you are able to debug it yourself, I'm happy to provide help. |
I reproduced this issue today, and it seems that the root cause is the cookie file is being used by the chrome process.
|
I tried some browsers and it says "The process cannot access the file because it is being used by another process." |
The root cause is that Chrome open its Cookie file in the exclusive mode (set This problem is specific to Windows and cannot be addressed directly by But I have a workaround. I log into LeetCode using an alertnate browser such as Edge, but I mainly use Chrome, so when I use leetgo, it can read cookies from Edge since it is not running. |
Is there any way to set something to change the cookie file share mode on Windows? This problem seems to have emerged only in the recent months |
As far as I know, there is not.
Yes, it worked fine, perhaps Chrome/Chromium changed the Cookies file mode recently. |
I am also having trouble using the browser. I am using WSL2 Ubuntu on Windows 10 with Chrome. I had to use cookies and set them in bashrc. Works great that way. I don't know how long leetcode sessions last though. |
Verification steps
leetgo config
Debug log
Description
I have already login in browser, but the cli cannot get cookie.
The bug both appears on leetcode.cn and leetcode.com
Steps
go install github.com/j178/leetgo@latest mkdir demo cd demo leetgo init -t cn -l go leetgo pick 1
The text was updated successfully, but these errors were encountered: