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

rod resets settings of a chrome profile #1041

Closed
xob0t opened this issue Apr 17, 2024 · 2 comments
Closed

rod resets settings of a chrome profile #1041

xob0t opened this issue Apr 17, 2024 · 2 comments
Labels
bug When you are sure about it's a bug

Comments

@xob0t
Copy link

xob0t commented Apr 17, 2024

Rod Version: v0.114.8

I'm launching rod with a specified Chrome profile.
All works as expected, but some profile settings are reset after the launch.
I noticed:

  • "Enhanced Ad Privacy" always pops up - probably resets its preferences
  • All extensions are unpinned
  • New tab shortcuts are reset

I've tried launching Chrome directly without rod, but with the same args as it launches it with, and have not encountered this issue.


import (
	"fmt"

	"github.com/go-rod/rod"
	"github.com/go-rod/rod/lib/launcher"
)

var (
	ProfileDir    string = "Profile 51"
	UserDataDir   string = "C:\\Users\\admin\\AppData\\Local\\Google\\Chrome\\User Data"
	ChromeBinPath string = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
)

func main() {
	launcher := launcher.New().
		Bin(ChromeBinPath).
		Set("user-data-dir", UserDataDir).
		Set("profile-directory", ProfileDir).
		Leakless(false).
		Headless(false)
	cu, err := launcher.Launch()
	if err != nil {
		fmt.Println(err)
	}
	browser := rod.New().ControlURL(cu)
	err = browser.Connect()
	if err != nil {
		fmt.Println(err)
	}
	defer browser.Close()
}

demo:
https://github.com/go-rod/rod/assets/32616886/85b70ab3-9a7c-4573-9e8e-ec583292ac2c

@xob0t xob0t added the question Questions related to rod label Apr 17, 2024
@ysmood ysmood added bug When you are sure about it's a bug and removed question Questions related to rod labels Apr 17, 2024
@ysmood ysmood closed this as completed in 4efda70 Apr 17, 2024
@ysmood
Copy link
Collaborator

ysmood commented Apr 17, 2024

Could you try the v0.115.0

@xob0t
Copy link
Author

xob0t commented Apr 17, 2024

the issue is gone, mad respect for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug When you are sure about it's a bug
Projects
None yet
Development

No branches or pull requests

2 participants