leetcode-cli icon indicating copy to clipboard operation
leetcode-cli copied to clipboard

Many "ERROR: session expired" printed when do "submission -a"

Open rockyzhang24 opened this issue 7 years ago • 5 comments

When I use command "submission -a -x" to download all the solutions to my submitted questions, only a few get downloaded and most questions shows "ERROR: session expired, please login again". I attached the screenshot below.

I tried to re-login again but this issue still existed. Then I tried to use "submission" command to download a single solution instead of "submission -a", and then it succeeded. So it seems that "-a" option has some problem leading this issue. Any ideas?

image

rockyzhang24 avatar Dec 25 '18 22:12 rockyzhang24

seems leetcode.com is thresholding concurrent requests of submissions...

skygragon avatar Feb 03 '19 04:02 skygragon

Does anyone solve this problem I also met this problem

hongru829 avatar Apr 28 '19 17:04 hongru829

Does anyone solve this problem I also met this problem

You can lower concurrency to 1, and add a setTimout here https://github.com/skygragon/leetcode-cli/blob/8dc0b2ab9b04771bfeef29f02e52371ff8f16db6/lib/commands/submission.js#L77.

Not ideal, but will pull most of your submissions.

michaelhly avatar Aug 08 '19 07:08 michaelhly

Does anyone solve this problem I also met this problem

You can lower concurrency to 1, and add a setTimout here

https://github.com/skygragon/leetcode-cli/blob/8dc0b2ab9b04771bfeef29f02e52371ff8f16db6/lib/commands/submission.js#L77 .

Not ideal, but will pull most of your submissions.

Could you please provide code if it won't take you much time?

rostislaved avatar Sep 15 '19 20:09 rostislaved

Does anyone solve this problem I also met this problem

You can lower concurrency to 1, and add a setTimout here https://github.com/skygragon/leetcode-cli/blob/8dc0b2ab9b04771bfeef29f02e52371ff8f16db6/lib/commands/submission.js#L77

. Not ideal, but will pull most of your submissions.

Could you please provide code if it won't take you much time?

-      exportSubmission(problem, argv, onTaskDone);
+      setTimeout(() => {
+          exportSubmission(problem, argv, onTaskDone);
+      }, 3000);

michaelhly avatar Sep 16 '19 18:09 michaelhly