Closed mominurr closed 1 year ago
driver = uc.Chrome(driver_executable_path='/usr/local/bin/chromedriver')
Same
driver = uc.Chrome(driver_executable_path='/usr/local/bin/chromedriver')
chrome open and automatic close. Not working. I am use this code: chromedriver_path = r"D:\Testing_all_project\chromedriver.exe" driver = uc.Chrome(driver_executable_path=chromedriver_path,options=options)
driver = uc.Chrome(driver_executable_path='/usr/local/bin/chromedriver')
chrome open and automatic close. Not working. I am use this code: chromedriver_path = r"D:\Testing_all_project\chromedriver.exe" driver = uc.Chrome(driver_executable_path=chromedriver_path,options=options)
The Same, Not working
Would you be able to try the attached PR to see if the fix is working for you?
Would you be able to try the attached PR to see if the fix is working for you?
what is PR? Please describe?
I am facing the same issue.
what is PR? Please describe?
@mominurr #1478, the one right above my comment (unfortunately, it didn't attach to the issue)
How do we use it @jdholtz If I am using 116, then it crashes with 404 not found
chrome_options1 = ChromeOptions()
chrome_options1.add_argument("--incognito")
chrome_options1.add_argument('--disable-popup-blocking')
chrome_options1.add_argument("--force-device-scale-factor=0.8")
driver = Chrome(options=chrome_options1, version_main=116)
This is what when i use.
@h656 what happens if you don’t specify the version_main? Also, are you sure you are using my changes on the correct branch?
To use my PR, you’ll need to clone my fork and checkout to 115-compatibility
. Then, you can import it through the Python terminal or run setup.py to install it (I haven’t used this approach but it should allow you to use my fork instead)
@h656 what happens if you don’t specify the version_main? Also, are you sure you are using my changes on the correct branch?
from session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 116.0.5845.97
This is the error that I face. No, I am actually using the pip undetected chromedriver
I'm getting this error using the patcher.py from your PR KeyError: "There is no item named 'chromedriver-win32\\chromedriver.exe' in the archive"
I'm getting this error using the patcher.py from your PR
KeyError: "There is no item named 'chromedriver-win32\\chromedriver.exe' in the archive"
Yeah same
@stevenbaum18 thanks for testing. I haven’t tested on Windows yet, so I’ll fix that in a few hours
Easiest Hack or Wordaround That I have right now is Install pip install webdriver_manager
Use from webdriver_manager.chrome import ChromeDriverManager
latestchromedriver = ChromeDriverManager().install()
driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)
This works perfectly.
Easiest Hack or Wordaround That I have right now is Install pip install webdriver_manager
Use from webdriver_manager.chrome import ChromeDriverManager
latestchromedriver = ChromeDriverManager().install()
set options driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)
I am trying this code but not working.
Easiest Hack or Wordaround That I have right now is Install pip install webdriver_manager Use from webdriver_manager.chrome import ChromeDriverManager latestchromedriver = ChromeDriverManager().install()
set options driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)
I am trying this code but not working.
Whats the error?
Easiest Hack or Wordaround That I have right now is Install pip install webdriver_manager
Use from webdriver_manager.chrome import ChromeDriverManager
latestchromedriver = ChromeDriverManager().install()
set options driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)
I got your code working with the following code added
from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager import urllib.request
try: service = Service(ChromeDriverManager().install()) except ValueError: latest_chromedriver_version_url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE" latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8') service = Service(ChromeDriverManager(version=latest_chromedriver_version).install()) driver_executable_path = service.path
Easiest Hack or Wordaround That I have right now is Install pip install webdriver_manager Use from webdriver_manager.chrome import ChromeDriverManager latestchromedriver = ChromeDriverManager().install()
set options driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)
I am trying this code but not working.
Whats the error?
driver = webdriver.Chrome(ChromeDriverManager().install(), options=options)
Traceback (most recent call last):
File "D:\Testing_all_project\test.py", line 50, in
driver = webdriver.Chrome(ChromeDriverManager().install(), options=options)
TypeError: WebDriver.init() got multiple values for argument 'options'
try this with my code above driver = webdriver.Chrome(options=chrome_options, driver_executable_path=driver_executable_path)
try this with my code above driver = webdriver.Chrome(options=chrome_options, driver_executable_path=driver_executable_path)
can you please provide full code?
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
import urllib.request
try:
service = Service(ChromeDriverManager().install())
except ValueError:
latest_chromedriver_version_url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"
latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8')
service = Service(ChromeDriverManager(version=latest_chromedriver_version).install())
driver = webdriver.Chrome(options=chrome_options, driver_executable_path=driver_executable_path)
driver_executable_path = service.path
from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager import urllib.request try: service = Service(ChromeDriverManager().install()) except ValueError: latest_chromedriver_version_url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE" latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8') service = Service(ChromeDriverManager(version=latest_chromedriver_version).install()) driver = webdriver.Chrome(options=chrome_options, driver_executable_path=driver_executable_path) driver_executable_path = service.path
try: service = Service(ChromeDriverManager().install()) except ValueError: latest_chromedriver_version_url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE" latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8') service = Service(ChromeDriverManager(version=latest_chromedriver_version).install())
options = webdriver.ChromeOptions() options.add_argument("--enable-automation") options.add_argument("--enable-logging") options.add_argument('--incognito') driver_executable_path = service.path driver = webdriver.Chrome(options=options, driver_executable_path=driver_executable_path)
Traceback (most recent call last):
File "D:\Testing_all_project\test.py", line 69, in
Bro, in the driver executable path =
ChromeDriverManager().install()
Put this. It should work.
Also put options after this.
On Wed, 16 Aug 2023 at 8:51 PM, Mominur Rahman @.***> wrote:
from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager import urllib.request
try: service = Service(ChromeDriverManager().install()) except ValueError: latest_chromedriver_version_url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE" latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8') service = Service(ChromeDriverManager(version=latest_chromedriver_version).install()) driver = webdriver.Chrome(options=chrome_options, driver_executable_path=driver_executable_path) driver_executable_path = service.path
try: service = Service(ChromeDriverManager().install()) except ValueError: latest_chromedriver_version_url = " https://chromedriver.storage.googleapis.com/LATEST_RELEASE" latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8') service = Service(ChromeDriverManager(version=latest_chromedriver_version).install()) Configure Chrome options
options = webdriver.ChromeOptions() options.add_argument("--enable-automation") options.add_argument("--enable-logging") options.add_argument('--incognito') driver_executable_path = service.path driver = webdriver.Chrome(options=options, driver_executable_path=driver_executable_path)
Traceback (most recent call last): File "D:\Testing_all_project\test.py", line 69, in driver = webdriver.Chrome(options=options, driver_executable_path=driver_executable_path) TypeError: WebDriver.init() got an unexpected keyword argument 'driver_executable_path'
— Reply to this email directly, view it on GitHub https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1477#issuecomment-1680817388, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFX53E5DFZTXFESZEIJH4DXVTQPJANCNFSM6AAAAAA3SNLDEU . You are receiving this because you were mentioned.Message ID: @.*** com>
Until the fix is available here, you can use SeleniumBase's UC Mode as an alternative, which has a slightly modified version of undetected-chromedriver
.
First pip install seleniumbase
, and then run the following script with python
:
from seleniumbase import Driver
import time
driver = Driver(uc=True)
driver.get("https://nowsecure.nl/#relax")
time.sleep(6)
driver.quit()
from seleniumbase import SB
with SB(uc=True) as sb:
sb.open("https://nowsecure.nl/#relax")
sb.sleep(3)
if not sb.is_text_visible("OH YEAH, you passed!", "h1"):
sb.get_new_driver(undetectable=True)
sb.open("https://nowsecure.nl/#relax")
sb.sleep(3)
sb.assert_text("OH YEAH, you passed!", "h1", timeout=3)
One of the main reasons I get fixes out earlier in SeleniumBase (my repo), is because I'm also a maintainer of Selenium, (https://github.com/SeleniumHQ/selenium/pulls?q=is%3Apr+author%3Amdmintz+is%3Aclosed+), and so I hear about breaking changes before most maintainers of projects that use Selenium do. The issue from this ticket was actually initiated by the Chromium Team when they restructured driver downloads for the new Chrome-for-Testing, (see https://googlechromelabs.github.io/chrome-for-testing/).
@stevenbaum18 and @Matt10233, I published a fix for Windows (and tested it myself) so it should work now.
We can use it directly from pip install undetected chrome driver?
On Wed, 16 Aug 2023 at 9:38 PM, Joey Holtzman @.***> wrote:
@stevenbaum18 https://github.com/stevenbaum18 and @Matt10233 https://github.com/Matt10233, I published a fix for Windows (and tested it myself) so it should work now.
— Reply to this email directly, view it on GitHub https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1477#issuecomment-1680892412, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFX53CAOSFILWWPO6TJLVDXVTV75ANCNFSM6AAAAAA3SNLDEU . You are receiving this because you were mentioned.Message ID: @.*** com>
undetected chrome driver is having problems, does ChromeDriverManager().install() work on undetected chrome driver?
@mdmintz, that looks like a great project! I’ll definitely be checking that out
Yes it is.
On Wed, 16 Aug 2023 at 9:58 PM, hkrcs96 @.***> wrote:
undetected chrome driver is having problems, does ChromeDriverManager().install() work on undetected chrome driver?
— Reply to this email directly, view it on GitHub https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1477#issuecomment-1680919598, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFX53AFJ7KW4ZOOX7VAZZDXVTYI7ANCNFSM6AAAAAA3SNLDEU . You are receiving this because you were mentioned.Message ID: @.*** com>
@jdholtz We can use it directly from pip install undetected-chromedriver?
@Arikelly, since it is a fork, you can install it with the following command:
pip install -e git+https://github.com/jdholtz/undetected-chromedriver.git@f91b7d86bc257d4cb9bfc848266e82509868e2c6#egg=undetected_chromedriver
@jdholtz Thank you, its working but Cloudfare is detecting since yesterday… any help?
@jdholtz Thank you, its working but Cloudfare is detecting since yesterday… any help?
Without my fork, does it get detected when you use Chrome 114 or below? If so, I'm not sure how to help with that as I don't have enough knowledge about anti-bot algorithms. You can check SeleniumBase though, which appears to stay undetected (see this comment by the maintainer)
Its working seamless and undetected. On Wed, 16 Aug 2023 at 11:05 PM, Joey Holtzman @.***> wrote:
@jdholtz https://github.com/jdholtz Thank you, its working but Cloudfare is detecting since yesterday… any help?
Without my fork, does it get detected when you use Chrome 114 or below? If so, I'm not sure how to help with that as I don't have enough knowledge about anti-bot algorithms. You can check SeleniumBase though, which appears to stay undetected (see this comment https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1477#issuecomment-1680867979 by the maintainer)
— Reply to this email directly, view it on GitHub https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1477#issuecomment-1681019710, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFX53HGD5IFYEC7NXPC6X3XVUAHLANCNFSM6AAAAAA3SNLDEU . You are receiving this because you were mentioned.Message ID: @.*** com>
@stevenbaum18 and @Matt10233, I published a fix for Windows (and tested it myself) so it should work now.
It's working for me thanks :)
Its working seamless and undetected.
Is this with or without my changes? Or both?
Haven’t tried your changes. Just did my own workaround.
On Wed, 16 Aug 2023 at 11:55 PM, Joey Holtzman @.***> wrote:
Its working seamless and undetected.
Is this with or without my changes? Or both?
— Reply to this email directly, view it on GitHub https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1477#issuecomment-1681083890, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFX53ELG4AN3WINB5HE64TXVUGBFANCNFSM6AAAAAA3SNLDEU . You are receiving this because you were mentioned.Message ID: @.*** com>
Easiest Hack or Wordaround That I have right now is Install pip install webdriver_manager
Use from webdriver_manager.chrome import ChromeDriverManager
latestchromedriver = ChromeDriverManager().install()
set options driver = Chrome(driver_executable_path=latestchromedriver, options=chrome_options1)
Does that mean you need to install everytime u run the script? or is this jupyter?
Glad i found this issue. Been trying a couple things, but this worked for me:
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
import urllib.request
import undetected_chromedriver as uc
try:
service = Service(ChromeDriverManager().install())
except ValueError:
latest_chromedriver_version_url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"
latest_chromedriver_version = urllib.request.urlopen(latest_chromedriver_version_url).read().decode('utf-8')
service = Service(ChromeDriverManager(version=latest_chromedriver_version).install())
driver_executable_path = service.path
options = uc.ChromeOptions()
And then start it:
chrome = uc.Chrome(driver_executable_path=driver_executable_path, options=options)
Thanks @stevenbaum18
@MarvinMitterlehner i still get the issue with the code you provided from session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 116.0.5845.96
I'm still getting the issue with windows, java and webDriverManager with error of: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.97 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
The code is:
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless");
options.addArguments("window-size=1920x1080");
options.addArguments( "--no-sandbox");
options.addArguments("--remote-allow-origins=*");
ThreadLocal
Download the latest chromedriver and use that in the path,that should work.
On Thu, 17 Aug 2023 at 15:16, davidal381 @.***> wrote:
I'm still getting the issue with java and webdrivermanager with error of: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 116.0.5845.97 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe Any workaround? Thanks
— Reply to this email directly, view it on GitHub https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1477#issuecomment-1681974890, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFX53FDHWJQ2PCLABYGRNTXVXR5VANCNFSM6AAAAAA3SNLDEU . You are receiving this because you were mentioned.Message ID: @.*** com>
Thanks for the response, but still browser crash after a second with an error: SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: Chrome failed to start: crashed. (chrome not reachable) The browser version is 116 and chromedriver version 116.0.5845.96. code: System.setProperty("webdriver.chrome.driver", "C://Users//...//tmp//chromedriver.exe"); WebDriver driver = new ChromeDriver(); Thanks
i found something hope it work for you ( I use python ) :
npx @puppeteer/browsers install chrome@114
import undetected_chromedriver as uc
chrome_options = uc.ChromeOptions()
chrome_options.binary_location = "C:\\YOUR_PATH_TO_THE_EXE\\chrome.exe"
driver = uc.Chrome(options=chrome_options)
Thanks,
Thanks again
Traceback (most recent call last): File "D:\Testing_all_project\test.py", line 27, in
driver = uc.Chrome(options=options)
File "D:\Testing_all_project\env\lib\site-packages\undetected_chromedriver__init.py", line 466, in init
super(Chrome, self).init(
File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 49, in init
super().init(
File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 54, in init
super().init( File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 206, in init self.start_session(capabilities) File "D:\Testing_all_project\env\lib\site-packages\undetected_chromedriver\init__.py", line 724, in start_session
super(selenium.webdriver.chrome.webdriver.WebDriver, self).start_session( File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 291, in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"] File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 346, in execute self.error_handler.check_response(response) File "D:\Testing_all_project\env\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:65490 from session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 116.0.5845.97 Stacktrace: Backtrace: GetHandleVerifier [0x00E0A813+48355] (No symbol) [0x00D9C4B1] (No symbol) [0x00CA5358] (No symbol) [0x00CC61AC] (No symbol) [0x00CC06B4] (No symbol) [0x00CC0491] (No symbol) [0x00CF0C55] (No symbol) [0x00CF093C] (No symbol) [0x00CEA536] (No symbol) [0x00CC82DC] (No symbol) [0x00CC93DD] GetHandleVerifier [0x0106AABD+2539405] GetHandleVerifier [0x010AA78F+2800735] GetHandleVerifier [0x010A456C+2775612] GetHandleVerifier [0x00E951E0+616112] (No symbol) [0x00DA5F8C] (No symbol) [0x00DA2328] (No symbol) [0x00DA240B] (No symbol) [0x00D94FF7] BaseThreadInitThunk [0x762600C9+25] RtlGetAppContainerNamedObjectPath [0x77B07B1E+286] RtlGetAppContainerNamedObjectPath [0x77B07AEE+238]