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

The LeetCode problem number is not the same as LeetHub-2.0 #3

Closed
tzjsw opened this issue Dec 3, 2023 · 4 comments
Closed

The LeetCode problem number is not the same as LeetHub-2.0 #3

tzjsw opened this issue Dec 3, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@tzjsw
Copy link

tzjsw commented Dec 3, 2023

The LeetCode problem number is not the same as LeetHub-2.0

Describe the bug
It seems that LeetCode problem number generated by LeetHub-3.0 is not the same as LeetHub-2.0. For example, when I use LeetHub-2.0 with old UI of LeetCode, I got the correct problem number for the following problems: 1004-max-consecutive-ones-iii and 1234-replace-the-substring-for-balanced-string. But when I use LeetHub-3.0 with new UI of LeetCode, I got the incorrect problem number: 1046-max-consecutive-ones-iii and 1351-replace-the-substring-for-balanced-string.

For problems with small numbers, it seems that LeetHub-3.0 works fine.

Screenshots
Screen Shot 2023-12-03 at 1 33 05 PM

@tzjsw tzjsw added the bug Something isn't working label Dec 3, 2023
@raphaelheinz
Copy link
Owner

Thanks for reporting this issue! Unfortunately, I probably won't have much free time until next weekend. Then I can check.

@aystream Has this issue maybe been introduced with #1?

@aystream
Copy link
Contributor

aystream commented Dec 5, 2023

No, I don't think it worked, in fact there was the same error there arunbhardwaj/LeetHub-2.0#41 .The id is taken from the id api, not the one that is there. But this is my assumption, I don't have time to look at it yet.
image

@raphaelheinz
Copy link
Owner

@aystream You are right. Thanks for your feedback. It is not an issue that was introduced with LeetHub-3.0. After checking my private leetcode-solution repo, I can confirm that this issue also occurred with Leetcode-2.0 using the new Leetcode UI.

The issue is due to Leetcode returns a wrong problem id. I found that the returned problem id from problem 1-741 is correct. From problem 743 onwards there are inconsistencies.

Btw we can access the problem id in various ways. One possibility is to read the graphql query. Another way is to read the local Chrome cache value. Please take a look at the screenshot below. We can see that the id for problem 743 is stored incorrectly (stored as 744).

So this is a general leetcode problem over which we have no influence on client side. I think an idea to bypass this issue would be to parse the title and extract the id from there...But this is not a critical issue.

shot

aystream added a commit to aystream/LeetHub-3.0 that referenced this issue Dec 6, 2023
…e names did not match

Rolled back Github authentication because it didn't work
Issues: raphaelheinz#2 raphaelheinz#3
@raphaelheinz
Copy link
Owner

Closing this as fixed in #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants