Program Tip

세션이 생성되지 않음 :이 버전의 ChromeDriver는 Selenium을 사용하는 ChromeDriver Chrome에서 Chrome 버전 74 오류 만 지원합니다.

programtip 2020. 11. 8. 10:57
반응형

세션이 생성되지 않음 :이 버전의 ChromeDriver는 Selenium을 사용하는 ChromeDriver Chrome에서 Chrome 버전 74 오류 만 지원합니다.


rsDriver 기능을 사용하여 RSelenium을 실행하려고하는데 실행 rD <- rsDriver()하면 새 버전의 Chrome이 필요하다는 메시지가 표시됩니다.

> rD <- rsDriver()
checking Selenium Server versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking chromedriver versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking geckodriver versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking phantomjs versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
[1] "Connecting to remote server"

Selenium message:session not created: This version of ChromeDriver only supports Chrome version 74
  (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Mac OS X 10.14.3 x86_64)

Could not open chrome browser.
Client error message:
     Summary: SessionNotCreatedException
     Detail: A new session could not be created.
     Further Details: run errorDetails method
Check server log for further details.

Chrome 버전 74.0.3729.6이 필요하다는 오류 메시지가 표시되지만 Chrome 설정을 보면 안정적인 최신 버전 (73.0.3683.75)을 실행 중이라는 메시지가 표시됩니다. 추가 인터넷 검색에서 74.0.3729.6은 Chrome의 시험판 개발 버전입니다. RSelenium과 함께 ChromeDriver를 사용하려면이 버전을 설치해야합니까?

나는 Chrome을 사용한다는 생각에 집착하지는 않았지만 rsDriver가 Firefox를 사용하도록 할 수 없었습니다.를 지정 browser = "firefox"하면 rsDriver가 ChromeDriver가 내 버전의 Chrome을 지원하지 않는다는 것과 동일한 오류 메시지를 표시합니다.

내 세션 정보는 다음과 같습니다.

R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.3

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] wdman_0.2.4     forcats_0.3.0   stringr_1.3.1   dplyr_0.7.8     purrr_0.2.5     readr_1.3.1     tidyr_0.8.2    
 [8] tibble_2.0.1    ggplot2_3.1.0   tidyverse_1.2.1 rvest_0.3.2     xml2_1.2.0      RSelenium_1.7.5

이 오류 메시지 ...

Selenium message:session not created: This version of ChromeDriver only supports Chrome version 74
  (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Mac OS X 10.14.3 x86_64)

... ChromeDriverChrome 브라우저 버전이 74 라고 예상 한다는 것을 의미합니다 .

주요 문제는 다음과 같이 사용중인 바이너리 버전 간의 비 호환성입니다 .

Chrome v74 지원

  • 현재 출시 된 chrome = 73.0을 사용 중입니다.

따라서 ChromeDriver v74.0.3729.6Chrome 브라우저 v73.0 간에 분명한 불일치가 있습니다.


해결책

  • ChromeDriverChromeDriver v73.0.3683.68 수준으로 다운 그레이드 합니다.
  • Chrome 버전을 Chrome v73 수준으로 유지 합니다. ( ChromeDriver v73.0.3683.68 출시 노트에 따름 )
  • 청소 당신의 프로젝트 작업을 당신을 통해 IDE재 구축 에만 필요 종속성이 프로젝트를.
  • 기본 웹 클라이언트 버전이 너무 오래된 경우 제거하고 최신 GA 및 릴리스 된 웹 클라이언트 버전을 설치합니다 .
  • 당신의 실행 @Test.
  • WebDriverWeb Client 인스턴스를 정상적으로 닫고 제거하려면 항상 메서드 driver.quit()내에서 호출하십시오 .tearDown(){}

MacOS의 경우 chromedriver 업그레이드가 트릭을 수행했습니다.

brew cask upgrade chromedriver

Google Chrome 버전을 74로 업데이트하는 것이 저에게 효과적이었습니다.

단계 : 1. 도움말-> Chrome 정보-> Chrome이 자동으로 업데이트를 찾습니다 (Chrome을 최신 버전으로 업데이트).

여기에 이미지 설명 입력


오늘도 같은 문제가 발생하여이 게시물과 Google의 다른 게시물을 발견했습니다. 나는 당신의 코드를 수정하는 것보다 더 직접적인 해결책이 있다고 생각합니다. 이전 답변은 버전의 불일치를 식별하는 데 정확합니다.

제안 된 솔루션을 아무 소용이 없었습니다. 내 컴퓨터에서 버전이 정확하다는 것을 알았습니다. 그러나이 불일치 오류는 컴퓨터에 설치된 실제 버전으로 인한 것이 아니라 RSelenium 코드가 기본 인수로 Chrome / ChromeDriver의 "최신"버전을 찾고 있습니다. ?rsDriver()인수에 대한 도움말 페이지를 참조하십시오 .

binman::list_versions("chromedriver")도움말 문서에 지정된대로 코드를 실행 하면 함수와 호환되는 버전을 식별 할 수 있습니다. 제 경우에는 다음 코드를 사용하여 연결을 설정할 수있었습니다.

driver <- rsDriver(browser=c("chrome"), chromever="73.0.3683.68", extraCapabilities = eCaps)

chromever=인수 를 사용하여 Chrome 버전을 지정할 수 있어야합니다 . 그래도 가장 가까운 버전을 사용해야했습니다 (내 크롬 버전은 "73.0.3683.75").

도움이 되었기를 바랍니다!


나는 오늘이 문제를 다루었 고 webdrivermanger를 업그레이드하면 해결되었습니다 (이전 버전은 3.0.0이었습니다).

<dependency>
    <groupId>io.github.bonigarcia</groupId>
    <artifactId>webdrivermanager</artifactId>
    <version>3.3.0</version>
    <scope>test</scope>
</dependency>

RSelenium::rsDriver()의 기본 chromever = "latest"설정을 사용하여 동일한 종류의 오류가 발생하여 chromedriver 75.0.3770.8최신과 결합하려는 시도가 실패했습니다 google-chrome-stable 74.0.3729.157.

session not created: This version of ChromeDriver only supports Chrome version 75

이것은 분명히 되풀이되고 꽤 성가신 문제인 것 같기 때문에 항상 최신 호환 ChromeDriver 버전을 사용하기 위해 다음 해결 방법을 찾았습니다 .

rD <- RSelenium::rsDriver(browser = "chrome",
                          chromever =
                                  system2(command = "google-chrome-stable",
                                          args = "--version",
                                          stdout = TRUE,
                                          stderr = TRUE) %>%
                                  stringr::str_extract(pattern = "(?<=Chrome )\\d+\\.\\d+\\.\\d+\\.") %>%
                                  magrittr::extract(!is.na(.)) %>%
                                  stringr::str_replace_all(pattern = "\\.",
                                                           replacement = "\\\\.") %>%
                                  paste0("^",  .) %>%
                                  stringr::str_subset(string =
                                                              binman::list_versions(appname = "chromedriver") %>%
                                                              dplyr::last()) %>%
                                  as.numeric_version() %>%
                                  max() %>%
                                  as.character())

위의 코드는 Linux에서만 테스트되었으며 일부 깔끔한 패키지를 사용 합니다 (사전에 설치하거나 base R에서 다시 작성). 다른 운영 체제의 경우 약간 조정해야 할 수 있습니다. 특히 command = "google-chrome-stable"Google 크롬을 실행하려면 시스템 별 명령으로 대체 해야합니다.

  • On macOS it should be enough to replace command = "google-chrome-stable" with command = "/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome" (untested).

  • On Windows a plattform-specific bug prevents us from calling the Google Chrome binary directly to get its version number. Instead do the following:

    rD <- RSelenium::rsDriver(browser = "chrome",
                              chromever =
                                system2(command = "wmic",
                                        args = 'datafile where name="C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe" get Version /value',
                                        stdout = TRUE,
                                        stderr = TRUE) %>%
                                stringr::str_extract(pattern = "(?<=Version=)\\d+\\.\\d+\\.\\d+\\.") %>%
                                magrittr::extract(!is.na(.)) %>%
                                stringr::str_replace_all(pattern = "\\.", replacement = "\\\\.") %>%
                                paste0("^",  .) %>%
                                stringr::str_subset(string = binman::list_versions(appname = "chromedriver") %>%
                                                      dplyr::last()) %>%
                                as.numeric_version() %>%
                                max() %>%
                                as.character())
    

Basically, the code just ensures the latest ChromeDriver version matching the major-minor-patch version number of the system's stable Google Chrome browser is passed as chromever argument. This procedure should adhere to the official ChromeDriver versioning scheme. Quote:

  • ChromeDriver uses the same version number scheme as Chrome (...)
  • Each version of ChromeDriver supports Chrome with matching major, minor, and build version numbers. For example, ChromeDriver 73.0.3683.20 supports all Chrome versions that start with 73.0.3683.

Travis CI

I had the same issue in Travis and solved by adding:

addons:
  chrome: stable

to my .travis.yml file.


Travis CI alternative

Another answer since Francesco Borzi's didn't work for me.

Add this to your travis.yml:

addons:
  chrome: stable

before_script:
  - LATEST_CHROMEDRIVER_VERSION=`curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"`
  - curl "https://chromedriver.storage.googleapis.com/${LATEST_CHROMEDRIVER_VERSION}/chromedriver_linux64.zip" -O
  - unzip chromedriver_linux64.zip -d ~/bin

Many thanks and credit to tagliala on github:

https://github.com/diowa/ruby2-rails5-bootstrap-heroku/commit/6ba95f33f922895090d3fabc140816db67b09672


I was really struggling with this mismatch between ChromeDriver v74.0.3729.6 and the Chrome Browser v73.0. I finally found a way to get ChromeDriver to an earlier version,

  1. In Chrome > About Google Chrome, copy the the version number, except for the last group. For instance, 72.0.3626.

  2. Paste that version at the end of this url and visit it. It will come back with a version, which you should copy. https://chromedriver.storage.googleapis.com/LATEST_RELEASE_

  3. Back in the command line, run bundle exec chromedriver-update <copied version>


This solution worked for me

  1. Make sure you're using R 3.5.3 or greater
  2. driver <- rsDriver(browser=c("chrome"), chromever="73.0.3683.68")

I got the same error when I am using robot framework (Selenium based framework) in a Docker instance. The reason was docker was using cached google-chrome-stable_current_amd64.deb for Chrome but it has installed latest chrome driver which was a later version.

Then I used below command and error resolved.

docker-compose build --no-cache

Hope this helps someone.


I was facing the same error:

session not created: This version of ChromeDriver only supports Chrome version 75

...

Driver info: driver.version: ChromeDriver

We are running the tests from a computer that has no real UI, so I had to work via a command line (CLI).

I started by detecting the current version of Chrome that was installed on the Linux computer:

$> google-chrome --version

And got this response:

Google Chrome 74.0.3729.169

So then I updated the Chrome version like that:

$> sudo apt-get install google-chrome-stable

And after checking again the version I got this:

Google Chrome 75.0.3770.100

Then the Selenium tests were able to run smoothly.


There's no need to downgrade Chrome anymore, when you get this error only means it's time to run webdriver-manager update again


Just update protractor:

npm install protractor@latest --save-dev


It is useful for Linux people. My problem was trivial, I used chromium-browser. I installed chrome and all problems were resolved. It could work with chromium but with extra actions. I did not receive a success. I could set a need driver version to protractor configuration. It used the latest. I needed a downgrade.


I have almost the same problems like this, the problems is come inside the pipeline when running my selenium test that need chromedriver package to running the e2e test.

My error build pipeline

The problems is just because in the pipeline (in my case) is having the chrome version 73, and my chromedriver package is installed on version 74.

Finally there are two simple solutions:

  1. Downgrade your chrome
  2. chromedriver 패키지 버전을 다운 그레이드합니다. 제 경우에는 파이프 라인 내에서 실행되기 때문에 아래와 같이 셀레늄 테스트를 실행하기 전에 chromedriver를 설치해야합니다.

    - script: npm install chromedriver@73.0.0 --chromedriver-force-download displayName: 'Install Chrome'


업데이트 된 webdriver-manager모듈 을 가져 오려면 각도기를 다시 설치해야했습니다 .

npm uninstall protractor
npm install --save-dev protractor

다시 설치 후 maxChromedriver을 확인하여 node_modules/protractor/node_modules/webdriver-manager/config.json원하는 Chrome 드라이버 버전과 일치하는지 확인하십시오.

참고 URL : https://stackoverflow.com/questions/55201226/session-not-created-this-version-of-chromedriver-only-supports-chrome-version-7

반응형