This version of ChromeDriver only supports Chrome version 100

目录

一、安装chrome

二、安装ChromeDriver驱动

三、运行应用和错误分析

参考:


一、安装chrome

2383 2024-08-02 18:52:47 apt -y update

2384 2024-08-02 18:53:14 apt -y install google-chrome-stable

2385 2024-08-02 18:53:50 sudo google-chrome --version

这里实际安装完之后是当时的chrome-stable,也就是127.0.6533.88

二、安装ChromeDriver驱动

2314 2024-08-02 15:39:41 wget https://chromedriver.storage.googleapis.com/100.0.4896.20/chromedriver_linux64.zip

2327 2024-08-02 15:50:31 unzip chromedriver_linux64.zip

2328 2024-08-02 15:50:34 ls -al

2329 2024-08-02 15:50:53 cp /usr/bin

2330 2024-08-02 15:51:01 cp chromedriver /usr/bin

这里安装之后实际上ChromeDriver驱动是100.0.4896.20

三、运行应用和错误分析

(links) root@prod-0003:~/service# sudo google-chrome --version

Google Chrome 127.0.6533.88

(links) root@prod-0003:~/service# which python

(links) root@prod-0003:~/service# sudo /root/anaconda3/envs/links/bin/python schedule_main.py

2024-08-05 14:22:28.037 | INFO | main:<module>:62 - ======= main startup ========

2024-08-05 14:22:28.140 | INFO | main:do_only_test:22 - test task per 60s at:('do_only_test', datetime.datetime(2024, 8, 5, 14, 22, 28, 139998))

2024-08-05 14:22:28.140 | INFO | main:do_all:28 - ======= start do_genetica2019_sld_cu ========
2024-08-05 14:22:28.704 | ERROR | service.genetica2019_sld_cu_service:execute_item:70 - execute_item username:gbwhatsappdownload password:Aa123456Aa have exception:Message: session not created: This version of ChromeDriver only supports Chrome version 100
Current browser version is 127.0.6533.88 with binary path /usr/bin/google-chrome
Stacktrace:

#0 0x5645670e3013 <unknown>

#1 0x564566e45a08 <unknown>

#2 0x564566e6ca25 <unknown>

#3 0x564566e68198 <unknown>

#4 0x564566e6456a <unknown>

#5 0x564566e9f5fa <unknown>

#6 0x564566e99823 <unknown>

#7 0x564566e6f08a <unknown>

#8 0x564566e701e5 <unknown>

#9 0x564567110e5d <unknown>

#10 0x56456712a061 <unknown>

#11 0x564567112bb5 <unknown>

#12 0x56456712ae08 <unknown>

#13 0x5645671062f0 <unknown>

#14 0x564567146988 <unknown>

#15 0x564567146b08 <unknown>

#16 0x5645671605dd <unknown>

#17 0x7fab50229609 <unknown>

根据报错提示,发现是版本不一致,根据对应关系 Chrome for Testing availability ,重新下载正确的驱动版本即可。

(links) root@prod-0003:~/service# wget https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.88/linux64/chromedriver-linux64.zip

--2024-08-05 14:28:51-- https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.88/linux64/chromedriver-linux64.zip

Resolving storage.googleapis.com (storage.googleapis.com)... 74.125.200.207, 142.250.4.207, 142.251.12.207, ...

Connecting to storage.googleapis.com (storage.googleapis.com)|74.125.200.207|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 9330660 (8.9M) [application/zip]

Saving to: 'chromedriver-linux64.zip'

chromedriver-linux64.zip 100%[=================================================================>] 8.90M --.-KB/s in 0.04s

2024-08-05 14:28:51 (242 MB/s) - 'chromedriver-linux64.zip' saved [9330660/9330660]

(external_links) root@prod-0003:~/service# unzip chromedriver-linux64.zip

Archive: chromedriver-linux64.zip

inflating: chromedriver-linux64/LICENSE.chromedriver

inflating: chromedriver-linux64/THIRD_PARTY_NOTICES.chromedriver

inflating: chromedriver-linux64/chromedriver

(links) root@ptc-tsla-prod-0003:~/service/chromedriver-linux64# cp chromedriver /usr/bin

参考:

https://wenku.csdn.net/answer/2quiwiymr2

linux下安装chrome及chromedriver_linux chromedriver-CSDN博客

相关推荐
末时清15 小时前
Shell脚本运行多launch
前端·chrome
测试笔记(自看)17 小时前
selenium+chromedriver下载与安装
selenium·测试工具
风清扬_jd17 小时前
Chromium 中chrome.webRequest扩展接口定义c++
前端·c++·chrome
小码哥说测试18 小时前
Selenium+Pytest自动化测试框架 ------ 禅道实战
自动化测试·软件测试·selenium·测试工具·单元测试·pytest·接口测试
风清扬_jd18 小时前
Chromium 中chrome.contextMenus扩展接口定义c++
前端·c++·chrome
晨曦_子画18 小时前
如何使用 Chrome Dev Tools Override 跳过发布步骤
前端·chrome
LKID体18 小时前
Chrome使用IE内核
前端·javascript·chrome
cmdyu_18 小时前
在vscode实现用和Chrome开发者工具中相同的快捷键进行面板切换
ide·chrome·vscode
守城小轩1 天前
Chromium127编译指南 Mac篇(六)- 编译优化技巧
chrome·chrome devtools·指纹浏览器·浏览器开发
好看资源平台2 天前
Rust性能优化与调试第二节:调试与错误处理的实用工具
开发语言·chrome·rust