I'm able to use Dusk fine. Using v2 with L5.5
If I try to do a ->resize() or ->maximize I get this error
string (207) "disconnected: unable to connect to renderer
(Session info: headless chrome=62.0.3178.0)
(Driver info: chromedriver=2.32.498537 (cb2f855cbc7b82e20387eaf9a43f6b99b6105061),platform=Mac OS X 10.13.0 x86_64)"
Running on macos high sierra. I've updated my chromedriver via brew to 2.33
This used to work before with Dusk v1
I tried in both headless and non-headless mode
Any ideas anyone? Maybe I should try to use firefox instead.. though it's not very clear how to set it up to use with another browser driver. an example would be appreciated
after tinkering around for a while.. and figuring out how to install Selenium and Geckodriver from this tutorial // https://medium.com/@melihovv/how-to-use-laravel-dusk-with-selenium-and-firefox-9c12cdf92c94
I noted that I was not getting any errors while trying to resize/maximize when using selenium, but, it wasn't resizing at all
I then switched back to chromedriver and low and behold the resize was working!!
I tried to figure out how it had magically started working.. and wow.. weirdest thing.. it turns out that if I comment out static::startChromeDriver(); from the default DuskTestCase.php.. it works!!
this is my current DuskTestCase.php and chrome works and resize works.. but if I uncomment static::startChromeDriver(); then I can't resize anymore... wtf? any ideas?
abstract class DuskTestCase extends BaseTestCase
{
use CreatesApplication;
use StartsXvfb;
use StartsSelenium;
/**
* Prepare for Dusk test execution.
*
* @beforeClass
* @return void
*/
public static function prepare()
{
// static::startChromeDriver();
// static::startXvfb();
// static::startSelenium();
}
/**
* Create the RemoteWebDriver instance.
*
* @return \Facebook\WebDriver\Remote\RemoteWebDriver
* @throws \Facebook\WebDriver\Exception\WebDriverException
*/
protected function driver()
{
$options = (new ChromeOptions)->addArguments([
//'--disable-gpu',
'--headless',
//'--window-size=1920,1080',
]);
return RemoteWebDriver::create(
'http://localhost:9515', DesiredCapabilities::chrome()->setCapability(
ChromeOptions::CAPABILITY, $options
));
}
Having a similar problem. If I comment out the call to resize, tests run but of course the browser doesn't resize. With the call to resize, I get the following error:
Facebook\WebDriver\Exception\UnrecognizedExceptionException: disconnected: unable to connect to renderer
(Session info: chrome=62.0.3202.62)
(Driver info: chromedriver=2.32.498513 (2c63aa53b2c658de596ed550eb5267ec5967b351),platform=Linux 4.4.0-97-generic x86_64)
Note this happened after upgrading to Google Chrome 62.
Catched this trouble too
Chromedriver needs to be updated. Our current workaround is adding this to the composer.json:
"post-install-cmd": [
"cp -f drivers/* vendor/laravel/dusk/bin"
]
And a directory in the root with the latest chromedrivers.
Same here - works well with Chrome Driver 2.33 from here
updated chromedriver and this fixed for me too
Please, close the issue, all works fine now
Most helpful comment
Chromedriver needs to be updated. Our current workaround is adding this to the composer.json:
And a directory in the root with the latest chromedrivers.