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

Cookies expire shortly, can't add user data dir #242

Open
alzyras opened this issue Mar 5, 2024 · 1 comment
Open

Cookies expire shortly, can't add user data dir #242

alzyras opened this issue Mar 5, 2024 · 1 comment

Comments

@alzyras
Copy link

alzyras commented Mar 5, 2024

Hello,

The cookies I generate with chrome plugin or the script generates by itself seem to expire every other time. The expiration date looks okay inside the cookie, but perhaps they are not loaded properly (But they are loaded well every other time though..). It seemed to be better on my mac.

Here I'm running windows 11.

I also tried setting user data dir to my already authenticated chrome, but it doesn't work. I assume the stealth plugin creates new user profiles every time.

What could I do to use an existing data dir or what could be the issue with the cookies? :) I see it also has code if (userDataDir) - don't use cookies, but it seems like the stealth plugin overrides it?

Thank you for your replies.

@dominic-findlay
Copy link

I managed to get the user profile to work by installing chrome canary to make a new profiles folder seprate from the normal chrome one.

The app still runs the inbuilt chromium.
I couldn't get it to work headless, so added those launch params to make it be off screen.

    {
        headless: false,
        userDataDir: process.env.LOCALAPPDATA + "/Google/Chrome SxS/User Data/",
        args: [
            '--profile-directory=Upload', //Select your profle here
            '--window-size=200,200',
            '--window-position=3000,3000'
        ]
    }

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

2 participants