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

Chromedriver 127 renames wrong file on install #1109

Closed
underdpt opened this issue Jul 24, 2024 · 1 comment · Fixed by #1110
Closed

Chromedriver 127 renames wrong file on install #1109

underdpt opened this issue Jul 24, 2024 · 1 comment · Fixed by #1110
Assignees
Labels

Comments

@underdpt
Copy link
Contributor

Dusk Version

8.2.1

Laravel Version

PHP Version

PHPUnit Version

NA

Database Driver & Version

No response

Description

When installing new version of chromedriver (127) instead of copying the executable file to the bin folder, a new file in the chromedriver zip download (THIRD_PARTY_NOTICES.chromedriver) is copied, so dusk becomes unusable.

The issue is on ChromeDriverCommand around line 228:

        $binary = $zip->getNameIndex(version_compare($version, '115.0', '<') ? 0 : 1);

It seems a new index should be used when version is > 127 or maybe find a more robust way to get the file to copy (maybe having an array with os => executable file?)

Steps To Reproduce

php artisan dusk:chrome-driver
php artisan dusk

It throws an error like

dev.ERROR: Invalid path to Chromedriver [D:\desarrollos\enertrade.es\api.enertrade.es\vendor\laravel\dusk\src\Chrome/../../bin\chromedriver-win.exe]. Make sure to i
nstall the Chromedriver first by running the dusk:chrome-driver command.
@damonbakker
Copy link

I am having the same issue since today, testing pipelines suddenly started failing.
I have to temporarily added an extra step to use an older version of the chromedriver until we have a permanent fix.

- php artisan dusk:install
- php artisan dusk:chrome-driver 126

@crynobone crynobone self-assigned this Jul 24, 2024
@crynobone crynobone added the bug label Jul 24, 2024
crynobone added a commit that referenced this issue Jul 24, 2024
fixes #1109

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
taylorotwell pushed a commit that referenced this issue Jul 24, 2024
fixes #1109

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants