Skip to content

can't log in leetcode.cn in m1 mac #135

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

Closed
yhsmer opened this issue Jan 8, 2023 · 16 comments · Fixed by #144
Closed

can't log in leetcode.cn in m1 mac #135

yhsmer opened this issue Jan 8, 2023 · 16 comments · Fixed by #144

Comments

@yhsmer
Copy link

yhsmer commented Jan 8, 2023

🐛 Bug Report(错误报告)

can't log in leetcode.cn in m1 mac.
I can log in leetcode.cn with official leetcode extension, but can't log in using this extension.

Extension Output(扩展输出)

Guidance: Press Ctrl+Shift+U, and toggle the channel to LeetCode.(按Ctrl+Shift+U,将频道切换到LeetCode。)
image

Your Environment

os: Darwin arm64 21.5.0
extension settings:
nodejs version: Node.js v18.8.0
vscode version: 1.74.2
extension version: v2.11.7

@ccagml
Copy link
Owner

ccagml commented Jan 11, 2023

This seems to be because the plug-in cannot obtain your username from https://leetcode.cn/list/api/questions, is it useless to log in again?
In addition, extension version: v0.18.1 I can't see which version of the plug-in is, is it the latest?
need more information.
thanks!

@yhsmer
Copy link
Author

yhsmer commented Jan 11, 2023

In addition, extension version: v0.18.1 I can't see which version of the plug-in is, is it the latest? need more information. thanks!

Oh sorry, the version number is wrong, the version number I use is v2.11.7.

This seems to be because the plug-in cannot obtain your username from https://leetcode.cn/list/api/questions, is it useless to log in again?

I tried many times but couldn't log in, using cookies etc.

I can log in using the official plug-in(https://github.com/LeetCode-OpenSource/vscode-leetcode), indicating that there is no problem with my local network.

image

@yhsmer yhsmer changed the title can't login leetcode.cn in m1 mac can't log in leetcode.cn in m1 mac Jan 11, 2023
@ccagml
Copy link
Owner

ccagml commented Jan 12, 2023

Hello yhsmer
I don't know why your account doesn't have favorites data
I updated 2.11.8, please try to see if it works
thanks!

@yhsmer
Copy link
Author

yhsmer commented Jan 12, 2023

image

Http error occurs when logging in with 2.11.8 (꒪⌓꒪) , but there are no proxy settings inside my vscode. It still doesn't work after I close my clash.

@ccagml
Copy link
Owner

ccagml commented Jan 12, 2023

(꒪⌓꒪) 2.11.9

@yhsmer
Copy link
Author

yhsmer commented Jan 13, 2023

image

2.11.9还是无法工作,登录不上,且没给出具体提示。
和最开始的bug应该是一致的,“ [warn] favorite not found? ” 只是一个警告,应该不是导致登录不上的原因,我使用官方的插件也出现了这个warn,但是不影响使用。

@evanryuu
Copy link

可以看一下这里面的讨论有没有帮助
LeetCode-OpenSource/vscode-leetcode#220

@ccagml
Copy link
Owner

ccagml commented Jan 13, 2023

@evankwolf 跟那个应该没关系,他之前的提示是因为获取不到标注的喜爱列表的内容数据,,我试了几个账号,都没有那种情况,他的账号不清楚是什么状况
我也没有m1 mac 所以不清楚跟m1 mac有没有关系

@ccagml
Copy link
Owner

ccagml commented Jan 13, 2023

@yhsmer 你那个是获取不到用户名,你账号的用户名很特殊吗

@ccagml
Copy link
Owner

ccagml commented Jan 13, 2023

@yhsmer 可以的话,可以看看你的根目录 ~/.lcpr/leetcode/user.json 的内容,是不是没有name的内容

@yhsmer
Copy link
Author

yhsmer commented Jan 13, 2023

@yhsmer 可以的话,可以看看你的根目录 ~/.lcpr/leetcode/user.json 的内容,是不是没有name的内容

有内容,我的用户名就是yhsm,没有什么特殊的字符。
image

我之前一直使用的是这个插件https://marketplace.visualstudio.com/items?itemName=LeetCode.vscode-leetcode ,会不会是哪里出现了冲突。

@yhsmer
Copy link
Author

yhsmer commented Jan 13, 2023

并且,使用同样的用户名,我能登录leetcode.com账户(和.cn不是同一个账户),只是获取题目数据时会出bug,这表明应该不会是因为用户名的特殊字符导致登录失败的。
image
image

@ccagml
Copy link
Owner

ccagml commented Jan 14, 2023

@yhsmer 你的user.json中login的内容是yhsm? 国服不是邮箱登录吗? 你是邮箱登录吗?不知道跟com冲突有没有关系, 你可以试试把.lcpr目录都删了,直接登录国区呢?

@yhsmer
Copy link
Author

yhsmer commented Jan 14, 2023

国服用户名登录和邮箱登录都登不上,.lcpr删了同样登不上,报错提示和前面一样😂

@ccagml ccagml linked a pull request Jan 16, 2023 that will close this issue
@ccagml
Copy link
Owner

ccagml commented Jan 16, 2023

@yhsmer Hello,麻烦再试试看2.11.10,能不能登录cn站,我这边没有这种情况的账号,测不了😂

@yhsmer
Copy link
Author

yhsmer commented Jan 16, 2023

@ccagml 解决了!能登录了!感谢!

@yhsmer yhsmer closed this as completed Jan 16, 2023
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

Successfully merging a pull request may close this issue.

3 participants