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

Error immediately after installation #80

Closed
Shujee opened this issue Sep 14, 2023 · 5 comments
Closed

Error immediately after installation #80

Shujee opened this issue Sep 14, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@Shujee
Copy link

Shujee commented Sep 14, 2023

I'm getting the following error when I run vendor/bin/bdi detect drivers immediately after composer require --dev dbrekelmans/bdi. The installation of the package runs successfully, but detect drivers crashes with this message:

Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, bool given in phar:///vendor/dbrekelmans/bdi/bdi/.box
/src/Terminal.php:60
Stack trace:
#0 phar:///vendor/dbrekelmans/bdi/bdi/.box/src/Terminal.php(60): trim(false)
#1 phar:///vendor/dbrekelmans/bdi/bdi/.box/src/Terminal.php(31): HumbugBox436\KevinGH\RequirementChecker\Terminal::initDimensions()
#2 phar:///vendor/dbrekelmans/bdi/bdi/.box/src/Printer.php(28): HumbugBox436\KevinGH\RequirementChecker\Terminal->getWidth()
#3 phar:///vendor/dbrekelmans/bdi/bdi/.box/src/Checker.php(17): HumbugBox436\KevinGH\RequirementChecker\Printer->__construct(32, true)
#4 phar:///vendor/dbrekelmans/bdi/bdi/.box/bin/check-requirements.php(22): HumbugBox436\KevinGH\RequirementChecker\Checker::checkRequirement
s()
#5 F:\Office\Amro Suboh\Codraft\Codraft\back\vendor\dbrekelmans\bdi\bdi(12): require('phar://F:/Offic...')
#6 F:\Office\Amro Suboh\Codraft\Codraft\back\vendor\bin\bdi(120): include('F:\\Office\\Amro ...')
#7 {main}
  thrown in phar:///vendor/dbrekelmans/bdi/bdi/.box/src/Terminal.php on line 60

I'm using PHP 8.2 on XAMPP and Windows 11. This is a Laravel 10 project if that has anything to do. I'm using latest version (1.0.5) of this package.

@mariusfu
Copy link

I got the same problem using the chromedriver with panther. This april it was still working. But now, after some chrome client updates, panther says that chromedriver has a wrong version. And when trying to install the new driver by bdi, I get the same error as above.

I'm using PHP 8.1.10 and WAMP-Server 3.2.9 on Windows 11.

@dbrekelmans
Copy link
Owner

Is it a coincidence that you are both on Windows; does this only occur on that OS?

At first sight it looks to be an issue in the PHAR packaging library, which was upgraded to a newer version in the latest patch.
As a workaround, you can try to use the non-PHAR version (composer require --dev dbrekelmans/browser-driver-installer).

@dbrekelmans dbrekelmans added the bug Something isn't working label Sep 19, 2023
@dbrekelmans
Copy link
Owner

It looks like this is indeed an issue in box-project/box#994

@dbrekelmans
Copy link
Owner

This should now be fixed in 1.0.6

@mariusfu
Copy link

mariusfu commented Oct 9, 2023

Just upgraded to 1.1.0 - and works perfectly again. Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants