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

[14596:10928:0531/174034.867:ERROR:install_util.cc(589)] Unable to create registry key HKLM\SOFTWARE\Policies\Google\Chrome for reading result=2 [14452:3972:0531/170507.354:ERROR:install_util.cc(597)] Unable to read registry value HKLM\SOFTWARE\Policies\Google\Chrome\MachineLevelUserCloudPolicyEnrollmentToken for writing result=2 #5966

Closed
gittadesushil opened this Issue May 31, 2018 · 24 comments

Comments

Projects
None yet
@gittadesushil
Copy link

gittadesushil commented May 31, 2018

Meta -

OS: Windows 10
Selenium Version: 3.11.0
Browser: Chrome
Chrome driver: 2.39.562718

Browser Version: Version 67.0.3396.62 (Official Build) (64-bit)

Expected Behavior -

Chrome should open smoothly without any error and url has to be navigated

Actual Behavior -

Chrome browser is getting launched but navigation is not working.

Steps to reproduce -

Create a chrome driver object and navigate to url.

Debug log -

https://gist.github.com/gittadesushil/1c7e49e05316600c3cb9c2ab4dade6ad

@jimevans

This comment has been minimized.

Copy link
Member

jimevans commented May 31, 2018

Given the output in the gist comes from the chromedriver executable, it seems like this is an issue that should be raised with the chromium project.

@gittadesushil

This comment has been minimized.

Copy link
Author

gittadesushil commented May 31, 2018

This is the first error coming:
[14596:10928:0531/174034.867:ERROR:install_util.cc(589)] Unable to create registry key HKLM\SOFTWARE\Policies\Google\Chrome for reading result=2

@jimevans I did raised the bug with chromium project. Could you please have look into that?
https://bugs.chromium.org/p/chromium/issues/detail?id=848232

@gittadesushil gittadesushil changed the title [14452:3972:0531/170507.354:ERROR:install_util.cc(597)] Unable to read registry value HKLM\SOFTWARE\Policies\Google\Chrome\MachineLevelUserCloudPolicyEnrollmentToken for writing result=2 https://bugs.chromium.org/p/chromium/issues/detail?id=848232 [14452:3972:0531/170507.354:ERROR:install_util.cc(597)] Unable to read registry value HKLM\SOFTWARE\Policies\Google\Chrome\MachineLevelUserCloudPolicyEnrollmentToken for writing result=2 May 31, 2018

@gittadesushil gittadesushil changed the title https://bugs.chromium.org/p/chromium/issues/detail?id=848232 [14452:3972:0531/170507.354:ERROR:install_util.cc(597)] Unable to read registry value HKLM\SOFTWARE\Policies\Google\Chrome\MachineLevelUserCloudPolicyEnrollmentToken for writing result=2 [14596:10928:0531/174034.867:ERROR:install_util.cc(589)] Unable to create registry key HKLM\SOFTWARE\Policies\Google\Chrome for reading result=2 [14452:3972:0531/170507.354:ERROR:install_util.cc(597)] Unable to read registry value HKLM\SOFTWARE\Policies\Google\Chrome\MachineLevelUserCloudPolicyEnrollmentToken for writing result=2 May 31, 2018

@barancev

This comment has been minimized.

Copy link
Member

barancev commented Jun 3, 2018

Closing in favour of the mentioned chromedriver issue

@barancev barancev closed this Jun 3, 2018

@ownchoice

This comment has been minimized.

Copy link

ownchoice commented Jun 15, 2018

I fixed it by replacing:

chrome_options = webdriver.ChromeOptions()

For:

from selenium.webdriver.chrome.options import Options
chrome_options = Options()

@jarmake

This comment has been minimized.

Copy link

jarmake commented Jun 18, 2018

I just manually created the missing registry key and it stopped logging that.

@lortegas

This comment has been minimized.

Copy link

lortegas commented Jun 18, 2018

Jarmake... How did you do it?

@gittadesushil

This comment has been minimized.

Copy link
Author

gittadesushil commented Jun 18, 2018

Please share the steps to add registry key.

@jarmake

This comment has been minimized.

Copy link

jarmake commented Jun 18, 2018

Ok.

  1. Open registry with regedit (just click on Windows start menu and start typing regedit, it should come up)
  2. From the registry explorer, expand HKEY_LOCAL_MACHINE, and from there expand SOFTWARE
  3. Expand Policies.
    I was missing everything from this point.
  4. So what I had to do was to select the Policies by left clicking on it, and then right click and from the context menu select New > Key and name it Google.
  5. Once that is created, select that and right click and again select New > Key and name that Chrome.
  6. Select that folder, and right click. Choose New > String. Name it as MachineLevelUserCloudPolicyEnrollmentToken and leave the value empty.
    If you alreade have Google and Chrome under Policies, I think only adding the key as in step 6 should work. I've attached a picture to show how it should look like when it's done.
    And just as a clarifier. This is under SOFTWARE/Policies, not directly under SOFTWARE.
    2018-06-19 00_21_35-window
@AnaLDM

This comment has been minimized.

Copy link

AnaLDM commented Jun 19, 2018

Thanks a lot!!!!!!!!!!!!!!!! @jarmake

@bwuzhang

This comment has been minimized.

Copy link

bwuzhang commented Jun 19, 2018

I'm getting a ERROR:configuration_policy_handler_list.cc(91)] Unknown policy: MachineLevelUserCloudPolicyEnrollmentToken if I do that. @jarmake

@jarmake

This comment has been minimized.

Copy link

jarmake commented Jun 20, 2018

Unfortunately I haven't encountered that problem @bwuzhang so I don't know what to suggest for that.

@lortegas

This comment has been minimized.

Copy link

lortegas commented Jun 20, 2018

Thanks @jarmake

@Parnash

This comment has been minimized.

Copy link

Parnash commented Jun 22, 2018

Hi All,
I am facing this error while Run Automation Test Cases from Jenkins. My Jenkins version is 2.121.1 and My cromedriver plugin version in jenkins is 1.2.
[exec] [27492:17924:0622/103937.330:ERROR:install_util.cc(589)] Unable to create registry key HKLM\SOFTWARE\Policies\Google\Chrome for reading result=2
[exec] [27492:17924:0622/103937.909:ERROR:gpu_process_transport_factory.cc(1017)] Lost UI shared context.

Can anyone help regarding this pls...???

@Michael-M-Judd

This comment has been minimized.

Copy link

Michael-M-Judd commented Jun 27, 2018

I looked into other solutions before @jarmake but only that worked for me... My scrapers were working before and I hadn't updated my python selenium nor my chromedriver. Not sure what happened.

@cgoldberg

This comment has been minimized.

Copy link
Member

cgoldberg commented Jun 27, 2018

Not sure what happened.

most likely your Chrome browser updated itself.

please note that this issue is closed in favor of the chromedriver issue mentioned previously.

@fmarkos

This comment has been minimized.

Copy link

fmarkos commented Jul 9, 2018

From an elevated command prompt:
reg add HKLM\SOFTWARE\Policies\Google\Chrome /v MachineLevelUserCloudPolicyEnrollmentToken /t REG_SZ

@MikeProcudin

This comment has been minimized.

Copy link

MikeProcudin commented Jul 18, 2018

I made the change in registry, and I think that cause a new problem 🥇
Unable to read VR Path Registry from C:\Users\User\AppData\Local\openvr\openvrpaths.vrpath
not sure if this is the chain ...

Selenium.Chrome.WebDriver 2.40
Selenium.WebDriver 3.13
Selenium.Support 3.13
Google Chrome 57.0.2987.98

@YousefJadallah

This comment has been minimized.

Copy link

YousefJadallah commented Jul 18, 2018

After doing the steps metioned by @jarmake , the message was changes:

[21152:19700:0718/183745.036:ERROR:install_util.cc(597)] Unable to read registry value HKLM\SOFTWARE\Policies\Google\Chrome\MachineLevelUserCloudPolicyEnrollmentToken for writing result=2
[21152:19700:0718/183745.037:ERROR:configuration_policy_handler_list.cc(91)] Unknown policy: MachineLevelUserCloudPolicyEnrollmentToken
[21152:19700:0718/183745.116:ERROR:configuration_policy_handler_list.cc(91)] Unknown policy: MachineLevelUserCloudPolicyEnrollmentToken

@GaryGwynn

This comment has been minimized.

Copy link

GaryGwynn commented Jul 19, 2018

all my f# scripts are failing and also getting this error....
Starting ChromeDriver 2.40.565498 (ea082db3280dd6843ebfb08a625e3eb905c4f5ab) on port 53878
Only local connections are allowed.
[19436:22284:0719/080024.016:ERROR:configuration_policy_handler_list.cc(91)] Unknown policy:
[19436:22284:0719/080024.111:ERROR:configuration_policy_handler_list.cc(91)] Unknown policy:

DevTools listening on ws://127.0.0.1:53881/devtools/browser/081f1f56-3e55-4908-b159-bd2cc3863c91

@YousefJadallah

This comment has been minimized.

Copy link

YousefJadallah commented Jul 21, 2018

Actually i updated selenium and everything is going fine .

pip install -U selenium

@Prologueyan

This comment has been minimized.

Copy link

Prologueyan commented Aug 8, 2018

@YousefJadallah I update the selenium but still got the problem

@Yavier28

This comment has been minimized.

Copy link

Yavier28 commented Sep 6, 2018

@jarmake Thanks! The solution Worked like a charm and now the driver is closing properly!!

We need to pay attention to those warning messages that appear on the console

@cawoodm

This comment has been minimized.

Copy link

cawoodm commented Sep 27, 2018

  1. For the "Unknown policy" message:
    Go to HKLM\SOFTWARE\Policies\Google\Chrome and delete all the policies mentioned in your console
  2. For the "unable to read" message:
    create the registry value (string) e.g. MachineLevelUserCloudPolicyEnrollmentToken
@davidhope

This comment has been minimized.

Copy link

davidhope commented Dec 24, 2018

There was another error generated after this one that said Chrome should be between versions 70 and 73. I was on v 69. I updated chrome and everything worked again.

Step Definition: node_modules\selenium-cucumber-js\runtime\world.js:250
Message:
SessionNotCreatedError: session not created: Chrome version must be between 70 and 73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment