0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Chromium/Chromedriver のダウングレードメモ

Posted at

個人的なメモ

Motivation

  • 新しいマシンに Ubuntu 22.04 LTS を入れた
  • chromium (snap) で入った ver. 110 がクラッシュして使い物にならなかった
    • 色々と検索して試行錯誤したけど直せる気配が無いので手動ダウングレード
    • 相性問題とかそういうのだろうか

出てたエラー

  • 1回目は何故か成功する(?)
Exception: Message: unknown error: Chrome failed to start: exited abnormally.
  (chrome not reachable)
  (The process started from chrome location /snap/chromium/2319/usr/lib/chromium-browser/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
#0 0x559deaa8a253 <unknown>
#1 0x559dea85f1b7 <unknown>
#2 0x559dea8873e0 <unknown>
#3 0x559dea883648 <unknown>
#4 0x559dea8c74cc <unknown>
#5 0x559dea8be463 <unknown>
#6 0x559dea88e34e <unknown>
#7 0x559dea88f538 <unknown>
#8 0x559deaadabb6 <unknown>
#9 0x559deaaddc19 <unknown>
#10 0x559deaade56c <unknown>
#11 0x559deaac234e <unknown>
#12 0x559deaadedf6 <unknown>
#13 0x559deaab39c7 <unknown>
#14 0x559deab00e48 <unknown>
#15 0x559deab00fe5 <unknown>
#16 0x559deab1a356 <unknown>
#17 0x7fcb32650609 <unknown>

Traceback (most recent call last):
  File "********"
      ....
  File "/home/uyiromo/.local/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 80, in __init__
    super().__init__(
  File "/home/uyiromo/.local/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 104, in __init__
    super().__init__(
  File "/home/uyiromo/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 286, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/uyiromo/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 378, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/uyiromo/.local/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute
    self.error_handler.check_response(response)
  File "/home/uyiromo/.local/lib/python3.10/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: Chrome failed to start: exited abnormally.
  (chrome not reachable)
  (The process started from chrome location /snap/chromium/2319/usr/lib/chromium-browser/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
#0 0x559deaa8a253 <unknown>
#1 0x559dea85f1b7 <unknown>
#2 0x559dea8873e0 <unknown>
#3 0x559dea883648 <unknown>
#4 0x559dea8c74cc <unknown>
#5 0x559dea8be463 <unknown>
#6 0x559dea88e34e <unknown>
#7 0x559dea88f538 <unknown>
#8 0x559deaadabb6 <unknown>
#9 0x559deaaddc19 <unknown>
#10 0x559deaade56c <unknown>
#11 0x559deaac234e <unknown>
#12 0x559deaadedf6 <unknown>
#13 0x559deaab39c7 <unknown>
#14 0x559deab00e48 <unknown>
#15 0x559deab00fe5 <unknown>
#16 0x559deab1a356 <unknown>
#17 0x7fcb32650609 <unknown>

ダウンロード

  1. https://chromereleases.googleblog.com/search/label/Stable%20updates で ver を検索する
  2. "108" で検索して以下のページをゲット
    1. https://chromereleases.googleblog.com/2022/11/stable-channel-update-for-desktop_29.html
    2. "Update for Desktop" が重要
    3. 108.0.5359.71
  3. https://omahaproxy.appspot.com/ コミット位置を取得
    1. Version Information にバージョン番号を入力
      イラスト.jpg
    2. Branch Base Position をメモ
      1. 1058933
  4. https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/ で近いビルドを探す
    1. ピッタリのものはほぼ無い
    2. 今回は https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/1058946/
  5. chrome-linux.zip, chromedriver_linux64.zip をダウンロード&解凍

Python 側

        options: ChromeOptions = ChromeOptions()
        options.binary_location = "/home/uyiromo/***/chrome-linux/chrome"
        options.add_argument("--headless=new")

        driver: Chrome = Chrome(
            service=Service(executable_path="/home/uyiromo/***/chromedriver"),
            options=options,
        )

ref.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?