gpt4 book ai didi

google-chrome - session 未创建 : This version of ChromeDriver only supports Chrome version 79 with Octopus

转载 作者:行者123 更新时间:2023-12-04 15:36:45 28 4
gpt4 key购买 nike

我正在尝试使用具有以下配置的 Octopus 运行“ng e2e”命令,但始终出现以下错误:

[07:20:37] E/launcher - session not created: This version of ChromeDriver only supports Chrome version 79
(Driver info: chromedriver=79.0.3945.16 (93fcc21110c10dbbd49bbff8f472335360e31d05-refs/branch-heads/3945@{#262}),platform=Windows NT 10.0.14393 x86_64)
[07:20:37] E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 79
(Driver info: chromedriver=79.0.3945.16 (93fcc21110c10dbbd49bbff8f472335360e31d05-refs/branch-heads/3945@{#262}),platform=Windows NT 10.0.14393 x86_64)
at Object.checkLegacyResponse (D:\a\1\s\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (D:\a\1\s\node_modules\selenium-webdriver\lib\http.js:509:13)
at D:\a\1\s\node_modules\selenium-webdriver\lib\http.js:441:30
at processTicksAndRejections (internal/process/task_queues.js:93:5)
From: Task: WebDriver.createSession()
at Function.createSession (D:\a\1\s\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
at Function.createSession (D:\a\1\s\node_modules\selenium-webdriver\chrome.js:761:15)
at Direct.getNewDriver (D:\a\1\s\node_modules\protractor\built\driverProviders\direct.js:77:33)
at Runner.createBrowser (D:\a\1\s\node_modules\protractor\built\runner.js:195:43)
at D:\a\1\s\node_modules\protractor\built\runner.js:339:29
at _fulfilled (D:\a\1\s\node_modules\protractor\node_modules\q\q.js:834:54)
at D:\a\1\s\node_modules\protractor\node_modules\q\q.js:863:30
at Promise.promise.promiseDispatch (D:\a\1\s\node_modules\protractor\node_modules\q\q.js:796:13)
at D:\a\1\s\node_modules\protractor\node_modules\q\q.js:556:49
at runSingle (D:\a\1\s\node_modules\protractor\node_modules\q\q.js:137:13)
[07:20:37] E/launcher - Process exited with error code 199
An unexpected error occurred: undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rebar-spa-v2-template@0.0.3 e2e: `ng e2e`

配置是:

  • user-agent = "npm/6.12.1 node/v12.13.1 win32 x64"

Protractor .conf.js:

capabilities: {
'browserName': 'chrome',
chromeOptions: {
args: ['--headless', '--disable-gpu', '--window-size=800,600']
}
},

Package.json:尝试了两种解决方案

安装后:webdriver-manager update --versions.chrome 79.0.3945.36

安装后:cd ./node_modules/protractor && npm i webdriver-manager@latest

任何帮助将不胜感激。

最佳答案

这个错误信息...

session not created: This version of ChromeDriver only supports Chrome version 79 (Driver info: chromedriver=79.0.3945.16 (93fcc21110c10dbbd49bbff8f472335360e31d05-refs/branch-heads/3945@{#262}),platform=Windows NT 10.0.14393 x86_64)

...暗示 ChromeDriver 无法启动/生成新的浏览上下文,即 Chrome 浏览器 session 。

您的主要问题是您使用的二进制文件版本之间的不兼容,如下所示:

Supports Chrome v79

  • 假设您使用的 Chrome 版本不是 chrome= 79.0
  • 可能是以下命令失败了:

    webdriver-manager update --versions.chrome 79.0.3945.36

因此 ChromeDriver v79.0 与您当前的 Chrome 浏览器 明显不匹配


解决方案

确保以下提到的步骤能够解决问题:

  • 您可能需要清理一次:

    webdriver-manager clean
  • 您有最新版本的您可以使用以下命令安装它:

    webdriver-manager@latest --save
  • 执行以下命令将解决您的问题:

    webdriver-manager update
  • Chrome 升级到最新的稳定版本:

    webdriver-manager update --versions.chrome 79.0.3945.88

关于google-chrome - session 未创建 : This version of ChromeDriver only supports Chrome version 79 with Octopus,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59485218/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com