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

Default profile doesn't seem to be working? #22

Open
shinebayar-g opened this issue Nov 6, 2024 · 1 comment
Open

Default profile doesn't seem to be working? #22

shinebayar-g opened this issue Nov 6, 2024 · 1 comment

Comments

@shinebayar-g
Copy link

Maybe I'm misconfiguring the application. Here's my config:

{
	"default_profile": "Personal",
	"profiles": {
		"Personal": {
			"browser": "Chrome"
		},
		"Work": {
			"browser": "Chrome Canary",
			"path": "C:\\Users\\me\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe"
		}
	},
	"profile_selection": [
		{
			"profile": "Work",
			"pattern": "*.corp.com"
		},
		{
			"profile": "Work",
			"pattern": "corp.atlassian.net"
		},
		{
			"profile": "Work",
			"pattern": "https://github.com/corp/*"
		}
	]
}

Now every link is opened by Google Chrome Canary rather than falling back to Google Chrome?

@shinebayar-g
Copy link
Author

shinebayar-g commented Nov 7, 2024

I think I found my issue. Found this in the log. Chrome Canary was not expected.

03:55:43 [ERROR] failed to parse config: InvalidJson(Error("unknown variant `Chrome Canary`, expected one of `Chrome`, `Firefox`, `OsDefault`, `Edge`, `Safari`, `Executable`", line: 9, column: 29))
03:55:43 [WARN] opening URLs without profile
03:55:43 [INFO] picked Chrome(None)

After changing Chrome Canary with Executable, now it's always opening the Chrome Canary. Could this be considered as a bug?

# Opening https://google.com
03:56:47 [INFO] picked Chrome(None)
# Opening https://github.com/corp/repo
03:56:50 [INFO] picked Executable(ExecutablePath { path: "C:\\Users\\me\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe" })

As a workaround, I changed my config to this. Now it's working as expected.

{
	"default_profile": "Personal",
	"profiles": {
		"Personal": {
			"browser": "Executable",
			"path": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
		},
		"Work": {
			"browser": "Executable",
			"path": "C:\\Users\\me\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe"
		}
	},
...
# Opening https://google.com
04:01:26 [INFO] picked Executable(ExecutablePath { path: "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" })
# Opening https://github.com/corp/repo
04:01:28 [INFO] picked Executable(ExecutablePath { path: "C:\\Users\\me\\AppData\\Local\\Google\\Chrome SxS\\Application\\chrome.exe" })

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

1 participant