JunichiIto / everydayrails-rspec-jp-2022

Sample source for the 2022 Japanese edition of Everyday Rails Testing with RSpec.
79 stars 79 forks source link

クローン直後のセットアップ後に rspec が落ちてしまう #19

Closed ys-office-llc closed 11 months ago

ys-office-llc commented 11 months ago

はじめまして

電子書籍を購入後、環境セットアップして bundle exec rspec を main ブランチで実行しましたが落ちてしまいました。

ご確認頂けますでしょうか?

実行結果を以下に記載します

Tasks
2023-11-03 19:46:52 INFO Selenium [:logger_info] Details on how to use and modify Selenium logger:
  https://selenium.dev/documentation/webdriver/troubleshooting/logging

2023-11-03 19:46:52 WARN Selenium [:selenium_manager] The chromedriver version (106.0.5249.21) detected in PATH at /home/ys-office-llc/.local/bin/chromedriver might not be compatible with the detected chrome version (117.0.5938.92); currently, chromedriver 117.0.5938.149 is recommended for chrome 117.*, so it is advised to delete the driver in PATH and retry 
2023-11-03 19:46:53 WARN Selenium [:selenium_manager] The chromedriver version (106.0.5249.21) detected in PATH at /home/ys-office-llc/.local/bin/chromedriver might not be compatible with the detected chrome version (117.0.5938.92); currently, chromedriver 117.0.5938.149 is recommended for chrome 117.*, so it is advised to delete the driver in PATH and retry 
  user toggles a task (FAILED - 1)

Failures:

  1) Tasks user toggles a task
     Got 0 failures and 2 other errors:

     1.1) Failure/Error: visit root_path

          Selenium::WebDriver::Error::SessionNotCreatedError:
            session not created: This version of ChromeDriver only supports Chrome version 106
            Current browser version is 117.0.5938.92 with binary path /opt/google/chrome/google-chrome
          # #0 0x560f4c89b343 <unknown>
          # #1 0x560f4c6a554a <unknown>
          # #2 0x560f4c6ced82 <unknown>
          # #3 0x560f4c6ca53d <unknown>
          # #4 0x560f4c6c6256 <unknown>
          # #5 0x560f4c704af6 <unknown>
          # #6 0x560f4c70445f <unknown>
          # #7 0x560f4c6fca73 <unknown>
          # #8 0x560f4c6d14f3 <unknown>
          # #9 0x560f4c6d2731 <unknown>
          # #10 0x560f4c8e962e <unknown>
          # #11 0x560f4c8ecac2 <unknown>
          # #12 0x560f4c8cff4e <unknown>
          # #13 0x560f4c8ed743 <unknown>
          # #14 0x560f4c8c436f <unknown>
          # #15 0x560f4c90da28 <unknown>
          # #16 0x560f4c90dba6 <unknown>
          # #17 0x560f4c927d52 <unknown>
          # #18 0x7f8e7aa94ac3 <unknown>
          # ./spec/system/tasks_spec.rb:24:in `go_to_project'
          # ./spec/system/tasks_spec.rb:14:in `block (2 levels) in <main>'

     1.2) Failure/Error: Unable to infer file and line number from backtrace

          Selenium::WebDriver::Error::SessionNotCreatedError:
            session not created: This version of ChromeDriver only supports Chrome version 106
            Current browser version is 117.0.5938.92 with binary path /opt/google/chrome/google-chrome
          # #0 0x560f4c89b343 <unknown>
          # #1 0x560f4c6a554a <unknown>
          # #2 0x560f4c6ced82 <unknown>
          # #3 0x560f4c6ca53d <unknown>
          # #4 0x560f4c6c6256 <unknown>
          # #5 0x560f4c704af6 <unknown>
          # #6 0x560f4c70445f <unknown>
          # #7 0x560f4c6fca73 <unknown>
          # #8 0x560f4c6d14f3 <unknown>
          # #9 0x560f4c6d2731 <unknown>
          # #10 0x560f4c8e962e <unknown>
          # #11 0x560f4c8ecac2 <unknown>
          # #12 0x560f4c8cff4e <unknown>
          # #13 0x560f4c8ed743 <unknown>
          # #14 0x560f4c8c436f <unknown>
          # #15 0x560f4c90da28 <unknown>
          # #16 0x560f4c90dba6 <unknown>
          # #17 0x560f4c927d52 <unknown>
          # #18 0x7f8e7aa94ac3 <unknown>

Finished in 4.31 seconds (files took 2.21 seconds to load)
70 examples, 1 failure

Failed examples:

rspec ./spec/system/tasks_spec.rb:12 # Tasks user toggles a task
JunichiIto commented 11 months ago

どうもはじめまして。報告内容を確認しました。

おそらく以下の行に書かれている内容がエラーの原因だと思われます。

2023-11-03 19:46:52 WARN Selenium [:selenium_manager] The chromedriver version (106.0.5249.21) detected in PATH at /home/ys-office-llc/.local/bin/chromedriver might not be compatible with the detected chrome version (117.0.5938.92); currently, chromedriver 117.0.5938.149 is recommended for chrome 117.*, so it is advised to delete the driver in PATH and retry 

簡単にまとめると

ということのようです。

/home/ys-office-llc/.local/bin/chromedriverを削除してからもう一度実行してみてもらえますか?

それでもエラーが出る場合は以下のコマンドの実行結果を教えてください。

which -a chromedriver
ys-office-llc commented 11 months ago

@JunichiIto あ~ すみません。単純なことでしたね。無事通りました。早々にありがとうございましたmm