-
Notifications
You must be signed in to change notification settings - Fork 57
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
Failure due to Json Error when Running test/exec #144
Comments
I tried outputting JSON data as a test.
|
could you please try re-configuring your |
thx. [cookies]
csrf = "${csrftoken}"
session = "${LEETCODE_SESSION}" I had to directly write the values as follows to make it work: [cookies]
csrf = 'xxxxxxx'
session = 'xxxxxxxxx' I have set the environment variables, and they output correctly when I use echo ${csrftoken} or echo ${LEETCODE_SESSION}. However, it seems that the .toml file is not retrieving the values from ${csrftoken} or ${LEETCODE_SESSION} for some reason. The cause is still unknown to me. As a workaround, I am directly including these values in the configuration. |
makes sense, need to update the readme |
ok.I will update the relevant part of the readme. |
Closing this since the issue has already been solved by #145 |
This issue remains unresolved, and I can consistently reproduce it even though I'm directly setting the CSRF and session values in the .toml file. Steps to reproduce:
Run This should fail with an error message
However, when I swap the conditions on line 22, And of course, the both version of the code pass without issue when written directly on the Leetcode website. My .toml file
|
@cjiung123 some of the problems are failed to run the |
I just tried it with 1 and it fails |
@clearloop I found out that this is highly likely due to Cloudflare Challenge. So basically when a website is protected by Cloudflare, there are several occasions when it will challenge visitor traffic, and this particular case is due to JS challenge, and it requires no interaction from a visitor, but rather visitor will have to wait until it finishes processing the Javascript, which should be less than five seconds. If we could implement something that mimics the waiting process (ex. sleep(4000)) then save the cookies, then go for a retry, I think it might be worth a try.. |
Nevermind, it's way more complex than I thought |
I am currently out and unable to verify, but is this an error that can be reproduced in a specific case every time? Or is it sometimes not reproducible depending on the individual environment? If it is an error related to Cloudflare, it seems like it would be reproducible every time... |
I'm able to reproduce everytime on my Ubuntu VM. Try following steps to reproduce on my previous comment when you get a chance. |
Despite correctly specifying the session and csrf config, I encounter the following error. I have also performed leetcode data --delete and cleared the cache.
The text was updated successfully, but these errors were encountered: