clearloop / leetcode-cli

May the code be with you 👻
MIT License
308 stars 49 forks source link

Use of Firefox cookies results in error decoding response body #136

Open 21eleven opened 9 months ago

21eleven commented 9 months ago
 ~
 ▷ RUST_BACKTRACE=1 leetcode data -d -u
ok!
[INFO  leetcode_cli::cache] Fetching leetcode problems...
error: error decoding response body: expected value at line 1 column 1, please try again

I installed the cli via nix: nix profile install nixpkgs#leetcode-cli

My ~/.leetcode/leetcode.toml looks like:

[code]
editor = 'vim'
lang = 'rust'

[cookies]
csrf = 'xyz...randomtext...abc'
session = 'xyz...longerrandomtext...abc'

[storage]
cache = 'Problems'
code = 'code'
root = '~/.leetcode'
scripts = 'scripts'
21eleven commented 8 months ago

tried again w firefox cookies again today and it worked. Not sure what I did wrong previously.

Bonen0209 commented 4 months ago

@21eleven, I encountered the same issue with cookies in both Chrome and Safari browsers.

RUST_BACKTRACE=1 leetcode data -d -u
ok!
[INFO  leetcode_cli::cache] Fetching leetcode problems...
error: error decoding response body: expected value at line 1 column 1, please try again
21eleven commented 4 months ago

I tried to login this morning and I experienced the same issue as you @Bonen0209