Error on Laravel Dusk Facebook\WebDriver\Exception\SessionNotCreatedException: session not created: Chrome version must be between 70 and 73
Asked Answered
H

4

11

Error when trying to run php artisan dusk. A Chrome version error happened. I Google the error and took a quick look in a couple of websites including Laracasts and the Dusk Github issues.

Hagai answered 28/7, 2020 at 14:2 Comment(0)
H
19

Solved after running php artisan dusk:chrome-driver

Hagai answered 28/7, 2020 at 14:2 Comment(3)
Upvote! Thank you! I've spent the best part of half an hour on this, you're a life saver, thank you.Githens
Did it for me too! I'd make this the accepted answer.Mog
Not all heroes wear capes. I bow before you.Hendren
F
4

Hopefully this helps someone else.

I found that my issue was:

Facebook\WebDriver\Exception\SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 84

The Fix

I found the fix here https://barryvanveen.nl/blog/61-how-to-fix-common-laravel-dusk-problems

First run:

chromium-browser --version

Then after you find out your version from that run:

php artisan dusk:chrome-driver yourversion

Hope this helps someone else, as I was looking for an answer for a couple hours.

Fatherland answered 30/7, 2020 at 9:51 Comment(0)
F
1

Solved after running the below command

php artisan dusk:chrome-driver --detect

Note: If you get the below error after running the above command

Failed to connect to localhost port 9515: Connection refused

then, restart your chrome browser and check it. It will solve that error. Hope it helps

Finer answered 4/4, 2022 at 7:11 Comment(0)
S
0

For anyone running into this issue on Chrome/Chromium versions after 114, this is likely caused by Google changing the upstream URLs.

This seems to have been fixed in this Dusk issue here, so theoretically all that's needed to fix this properly is a composer require laravel/dusk --with-all-dependencies, but at least in my case, this would update a lot of dependencies and seems highly likely to break my application. I've asked on that issue what the best course of action is for a legacy Laravel application (Laravel 8 in my case), but in the meantime downgrading both the Chrome/Chromium browser and the Chrome driver to v114 should be a good enough workaround.

This is easier said than done and it's taken me over a day to figure out how to do it successfully on GitHub Actions, but adding the following step to your workflow file should be all you need to get your builds running again:

  - name: Downgrade Chrome browser to v114
    uses: browser-actions/setup-chrome@v1
    with:
      chrome-version: 1134343 # Last commit number for Chrome v114
    id: setup-chrome
  - run: sudo ln -fs ${{ steps.setup-chrome.outputs.chrome-path }} /usr/bin/google-chrome
  - name: Downgrade Chrome driver to v114
    run: php artisan dusk:chrome-driver `/usr/bin/google-chrome --version | cut -d " " -f3 | cut -d "." -f1`
Siddra answered 28/8, 2023 at 0:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.