Open danpoleary1 opened 8 months ago
The message is formatted badly, hard to read. So I manually rewrote as follows
ChromeUserProfile of "onmicrosoft" is not found in :
[
{"userProfile":"Guest","userDataDir":"C:\\Users\\hcuser\\AppData\\Local\\Google\\Chrome\\User Data","profileDirectoryName":"Guest Profile"},
{"userProfile":"Person 1","userDataDir":"C:\\Users\\hcuser\\AppData\\Local\\Google\\Chrome\\User Data","profileDirectoryName":"Default"},
{"userProfile":"Person 2","userDataDir":"C:\\Users\\hcuser\\AppData\\Local\\Google\\Chrome\\User Data","profileDirectoryName":"Profile 1"},
{"userProfile":"Person 2","userDataDir":"C:\\Users\\hcuser\\AppData\\Local\\Google\\Chrome\\User Data","profileDirectoryName":"Profile 2"},
{"userProfile":"Person 2","userDataDir":"C:\\Users\\hcuser\\AppData\\Local\\Google\\Chrome\\User Data","profileDirectoryName":"Profile 3"},
{"userProfile":"Person 2","userDataDir":"C:\\Users\\hcuser\\AppData\\Local\\Google\\Chrome\\User Data","profileDirectoryName":"Profile 4"},
{"userProfile":"Person 2","userDataDir":"C:\\Users\\hcuser\\AppData\\Local\\Google\\Chrome\\User Data","profileDirectoryName":"System Profile"}
]
It seems that you have 3 userProfile named Guest
, Person1
, Person2
.
It seems that you actually do no have a userProfiled named onmicrosoft
.
I do not see what's happening to you.
I have Chrome v123 now. I looked at /Users/username/Library/Application Support/Google/Chrome
folder. I got puzzled. It seems that Chrome has changed its internal data structure that represents what we call "User Profile".
The data structure of User Profin in Chrome v123 is different from what I saw previously when I developed the chromedriverfactory project initially (around Chrome v143). I have no idea when and how the change has been made. Of course, Google would not publish the internal data structure of Chrome.
This project "chromedriverfactory" did a sort of reverse-engineering. I looked at the files in /Users/username/Library/Application Support/Google/Chrome
folder trying to find a User Profile "Picasso" is recorded in the folder. And I made a wild guess how the User Profile is recorded. My guess is fragile, will be broken easily.
Does Google provides any public JavaScript API that enable users to retrieve information about user profiles? Is it possible to ask Chrome to tell the Path of a custom profile "Picasso"? --- I don't know. I searched Google for it, but not successful.
It is strange. I did try using "Profile 3" as the profile name, which is the directory for "onmicrosoft" profile listed in the Chrome UI. Same results.
I will try a few more things to see if I can get it to find the correct profile and path.
In Emacs, I did M-x grep-find for the /Users/username/Library/Application Support/Google/Chrome
folder with key Picasso
, which is the name of a custom User Profile. I got 2 hits.
In the Local_State
file under the Chrome
folder, I found a clue:
{
...
"profile": {
"info_cache": {
"Default": {
"active_time": 1711106965.087676,
"avatar_icon": "chrome://theme/IDR_PROFILE_AVATAR_0",
"background_apps": false,
"default_avatar_fill_color": -1844265,
"default_avatar_stroke_color": -9545651,
"first_account_name_hash": 327,
"force_signin_profile_locked": false,
"gaia_given_name": "Kazuaki",
"gaia_id": "116298576906500294506",
"gaia_name": "Kazuaki Urayama",
"gaia_picture_file_name": "Google Profile Picture.png",
"hosted_domain": "NO_HOSTED_DOMAIN",
"is_consented_primary_account": true,
"is_ephemeral": false,
"is_using_default_avatar": false,
"is_using_default_name": false,
"last_downloaded_gaia_picture_url_with_size": "https://lh3.googleusercontent.com/a/ACg8ocIWM4oOqV3OeJ_Uq6lLGYkCaA0pwwZmLSzp-8auzJ2i8Q=s256-c-ns",
"managed_user_id": "",
"metrics_bucket_index": 1,
"name": "Kazuaki",
"profile_highlight_color": -1844265,
"signin.with_credential_provider": false,
"use_gaia_picture": true,
"user_accepted_account_management": false,
"user_name": "kazuaki.urayama@gmail.com"
},
"Profile 17": {
"active_time": 1711106965.203889,
"avatar_icon": "chrome://theme/IDR_PROFILE_AVATAR_26",
"background_apps": false,
"default_avatar_fill_color": -1319433,
"default_avatar_stroke_color": -9426516,
"force_signin_profile_locked": false,
"gaia_given_name": "",
"gaia_id": "",
"gaia_name": "",
"hosted_domain": "",
"is_consented_primary_account": false,
"is_ephemeral": false,
"is_using_default_avatar": true,
"is_using_default_name": false,
"managed_user_id": "",
"metrics_bucket_index": 14,
"name": "Picasso", <=== THIS IS IT!!
"profile_highlight_color": -1319433,
"signin.with_credential_provider": false,
"user_name": ""
}
},
"last_active_profiles": [
"Default",
"Profile 17"
],
"last_used": "Profile 17",
"metrics": {
"next_bucket_index": 15
},
"picker_shown": true,
"profile_counts_reported": "13355536720985432",
"profiles_created": 18,
"profiles_order": [
"Default",
"Profile 17"
],
"show_picker_on_startup": false
},
With this info, I can find that the User Profile "Picasso" has the Profile foldr Profile 17
under the /Users/username/Library/Application Support/Google/Chrome
I don't know if the Local State
file was there in the previous versions of Chrome as well.
released the v0.7.0
ChromeDriverFactory refers to the "Chrome/UserData/Local State" file to look up the pairs of Cache Directory name and User Profile name managed by Chrome.
@danpoleary1
Please try the latest version v0.7.3
I will wait for @danpoleary1 to have a look at this
See also #76 "a quick method that returns a list of ChromeUserProfiles in JSON"
I have a profile in chrome "onmicrosoft" and it is associated to directory "Profile 3" but when I run, I get:
Output of chrome://version for that profile: