Cannot run selenium-manager binary due to the program is blocked by group policy

972 views
Skip to first unread message

Tammy

unread,
Feb 19, 2024, 1:55:11 AM2/19/24
to Selenium Users

I'm having issue running Selenium Manager with company's laptop due to the error:

Caused by: java.io.IOException: Cannot run program "C:\Users\xxx.xxx.cache\selenium\manager\0.4.17\selenium-manager.exe": CreateProcess error=1260, This program is blocked by group policy. For more information, contact your system administrator

I saw a similar issue was raised #11770, and the suggestion was to get the group policy changed. However, our company has very strict policy, it's impossible to get it whitelisted, also it's not possible to add environment variable SE_MANAGER_PATH to the system.


Could anyone please advise any other options to get selenium manager downloaded and executable? Thank you.  

Krishnan Mahadevan

unread,
Feb 19, 2024, 2:01:04 AM2/19/24
to seleniu...@googlegroups.com
Selenium Manager is just one part of the equation. 
How are you going to be dealing with ChromeDriver (for chrome), gecko driver(for Firefox) and edge driver (for Edge browser) ?

I believe that the selenium manager comes into picture if and only if the browser driver binaries are not found on the PATH. So if the binaries are available then I dont think you would be seeing this error.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/21ce5318-cf12-436c-b807-fdf90371a764n%40googlegroups.com.

Tammy

unread,
Feb 19, 2024, 3:13:12 AM2/19/24
to Selenium Users
Thanks Krishnan for your reply.

The Selenium-Manager binaries is downloaded to the temp folder by default, e,g C:\Users\xxx.xxx.cache\selenium\manager\0.4.17\selenium-manager.exe.  The issue I'm facing is that the Selenium Manager binary cannot be executable because the executable binaries are not allowed to run from the C:\Users directory due to group policy in my organization. 

Before Selenium Manager, we were using WebDriverManager, and WebDriverManager provides a method setCachePath(String cachePath) to download the webdriver to a customized location rather than C:\Users. But I do not see similar approach in Selenium-Manager. That's why I'm asking here, Do you happen to know any similar feature/method provided by Selenium-Manager to move the binary to a customized location? Thank you. 

ddlionx

unread,
Feb 19, 2024, 3:18:43 AM2/19/24
to seleniu...@googlegroups.com
If you want to use a library typically you whitelist what it needs to work (and what other essential components need to work). 

I’m not sure what to suggest other than getting what you want whitelisted. Why are you trying to use something like this without notifying your company in advance how it works and what it needs to function? 

Krishnan Mahadevan

unread,
Feb 19, 2024, 4:12:00 AM2/19/24
to seleniu...@googlegroups.com
Tammy,

As Diego mentioned in the comments of the issue that you logged, you should look at customising the paths either via the configuration file or via environment variables.

The environment variable you are looking for would be SE_CACHE_PATH

Refer to the official documentation for more information: https://www.selenium.dev/documentation/selenium_manager/#configuration


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

Tammy

unread,
Feb 19, 2024, 5:01:41 AM2/19/24
to Selenium Users
Thank you.

Massimo Morandi

unread,
Mar 1, 2024, 8:07:02 AM3/1/24
to Selenium Users
Hi Guys,
I have the same problem today.
One client has a group policy that doesn't allow to run .exe from the user temp folder.
I can run applications only in the C:\Program Files\<application> folder.
Is there any solution to store statically and run the selenium-manager.exe from this folder?
Below the Java application log

org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*], excludeSwitches: [enable-automation], extensions: [], prefs: {download.default_directory: C:\Program Files\ABRWeb-Tes...}, useAutomationExtension: false}}, error Failed to run command: [C:\Users\test\AppData\Local\Temp\selenium-manager227728512264001705216804496155081\selenium-manager.exe, --browser, chrome, --output, json]
Build info: version: '4.11.0', revision: '040bc5406b'
.
.
Caused by: org.openqa.selenium.WebDriverException: Failed to run command: [C:\Users\test\AppData\Local\Temp\selenium-manager227728512264001705216804496155081\selenium-manager.exe, --browser, chrome, --output, json]
Build info: version: '4.11.0', revision: '040bc5406b'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.8'
Driver info: driver.version: ChromeDriver
.
.
Caused by: java.io.IOException: Cannot run program "C:\Users\test\AppData\Local\Temp\selenium-manager227728512264001705216804496155081\selenium-manager.exe": CreateProcess error=1260, Il programma   bloccato dai Criteri di gruppo. Per ulteriori informazioni, contattare l'amministratore del sistema

Many thanks
Reply all
Reply to author
Forward
0 new messages