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

after chrome update the cookies cannot be seen #106

Open
Virgilio-AI opened this issue Jan 20, 2023 · 4 comments
Open

after chrome update the cookies cannot be seen #106

Virgilio-AI opened this issue Jan 20, 2023 · 4 comments

Comments

@Virgilio-AI
Copy link

in brave and in chromium I am having the same problem. does anyone knows how to find them now. also update the description

@wendajiang
Copy link
Collaborator

Press F12 and open the network tab, the cookies is not existing? Can you offer your chrome version ?

@decapo
Copy link

decapo commented Mar 4, 2023

I have the same issue on MacOS, here's the error output when attempting 'leetcode pick 1':

thread 'main' panicked at 'Error connecting to "/Users/decap/Library/Application Support/Google/Chrome/Default/Cookies"', /Users/decap/.cargo/registry/src/gitpro.ttaallkk.top-1ecc6299db9ec823/leetcode-cli-0.3.11/src/cache/mod.rs:17:56
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Did the location of the cookies possibly change? There is no 'Default' directory.

@decapo
Copy link

decapo commented Mar 4, 2023

Found the issue, if you have multiple chrome profiles it stores the cookies in directories called 'Profile 1', 'Profile 2', etc. and not 'Default'

    let p = match std::env::consts::OS {
        // "macos" => home.join("Library/Application Support/Google/Chrome/Default/Cookies"),
        "macos" => home.join("Library/Application Support/Google/Chrome/Profile 1/Cookies"),
        "linux" => home.join(".config/google-chrome/Default/Cookies"),
        _ => panic!("Opps...only works on OSX or Linux now..."),
    };

Fixed it manually by changing the directory, might make sense to check cookies for Default, then 'Profile 1', 'Profile 2', etc. the first time the CLI is run.

@wendajiang
Copy link
Collaborator

Actually, I first read it about Chrome cookies, after refactoring the config, we can think deeply about this question. Or welcome your PR.
Thanks.

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

No branches or pull requests

3 participants