Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.9.1] unknown error: cannot find Chrome binary #1046

Closed
GC-Mark opened this issue Jul 27, 2023 · 5 comments
Closed

[7.9.1] unknown error: cannot find Chrome binary #1046

GC-Mark opened this issue Jul 27, 2023 · 5 comments

Comments

@GC-Mark
Copy link

GC-Mark commented Jul 27, 2023

Dusk Version

7.9.1

Laravel Version

10.16.1

PHP Version

8.2.7

PHPUnit Version

10.2.6

Database Driver & Version

No response

Description

I upgraded from 7.7.1 to 7.9.1 and now all my tests fail with the error...

UnknownErrorException   unknown error: cannot find Chrome binary
   FAILED  Tests\Browser\App\Http\Livewire\Modals\FollowTest > we can update follow button after a succ…  UnknownErrorException   
  unknown error: cannot find Chrome binary

  at vendor/php-webdriver/webdriver/lib/Exception/WebDriverException.php:146
    142▕                     throw new UnexpectedAlertOpenException($message, $results);
    143▕                 case 'unknown command':
    144▕                     throw new UnknownCommandException($message, $results);
    145▕                 case 'unknown error':
  ➜ 146▕                     throw new UnknownErrorException($message, $results);
    147▕                 case 'unknown method':
    148▕                     throw new UnknownMethodException($message, $results);
    149▕                 case 'unsupported operation':
    150▕                     throw new UnsupportedOperationException($message, $results);

      +3 vendor frames 
  4   tests/DuskTestCase.php:92
      +1 vendor frames 
  6   tests/Browser/app/Http/Livewire/Modals/FollowTest.php:114
User git:(master) ✗ artisan dusk:chrome-driver                                                            
ChromeDriver binary successfully installed for version 115.0.5790.102.

Running on an M1 Mac Studio if that makes any difference!?

//cc @crynobone

Steps To Reproduce

See above

@RhysLees
Copy link

RhysLees commented Jul 27, 2023

Was literally just about to post this, i have the same issue:

image

Although i have been having issues since chrome 115+

Im on M2

@crynobone
Copy link
Member

It's a known bug (I can confirmed in Mac) and can only be fixed upstream: https://groups.google.com/g/chromedriver-users/c/PXWZDEx6KKE

In the meantime I would recommend downloading Chrome for Testing for your platform.

https://developer.chrome.com/blog/chrome-for-testing/

@GC-Mark
Copy link
Author

GC-Mark commented Jul 27, 2023

Thanks for the info @crynobone 👍

@driesvints
Copy link
Member

Thanks all

@arwinvdv
Copy link

I added this to my DuskTestCase.php driver() function and for now it works:

 if (PHP_OS === 'Darwin') {
    $options->setBinary('/Applications/Google Chrome.app/Contents/MacOS/Google Chrome');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants