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

# 個人的なメモ

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

## 出てたエラー
- 1回目は何故か成功する（？）

```shell
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 を検索する
1. "108" で検索して以下のページをゲット
    1. https://chromereleases.googleblog.com/2022/11/stable-channel-update-for-desktop_29.html
    1. "Update for **Desktop**" が重要
    1. **108.0.5359.71**
1. https://omahaproxy.appspot.com/ コミット位置を取得
    1. Version Information にバージョン番号を入力
        ![イラスト.jpg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/278058/0bde5508-78e7-760c-6955-2e5e86a1a612.jpeg)
    1. **Branch Base Position** をメモ
        1. **1058933**
1. https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/ で近いビルドを探す
    1. ピッタリのものはほぼ無い
    1. 今回は https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/1058946/
1. chrome-linux.zip, chromedriver_linux64.zip をダウンロード＆解凍

# Python 側
```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.
- https://qiita.com/cognitom/items/cf00c3c79fa80ac12a4a