Changed profile folder + catch connection error
This commit is contained in:
@ -161,23 +161,29 @@ abstract class BrowserJob implements ShouldQueue
|
|||||||
'--disable-setuid-sandbox',
|
'--disable-setuid-sandbox',
|
||||||
'--whitelisted-ips=""',
|
'--whitelisted-ips=""',
|
||||||
'--disable-dev-shm-usage',
|
'--disable-dev-shm-usage',
|
||||||
'--user-data-dir=/home/seluser/profile/nigga', // seems that selenium doesn't like docker having a volume on the exact same folder ("session not created: probably user data directory is already in use")
|
'--user-data-dir=/home/seluser/profile', // seems that selenium doesn't like docker having a volume on the exact same folder ("session not created: probably user data directory is already in use"). Does not seems like it, maybe whn the browser change version ?
|
||||||
])->all());
|
])->all());
|
||||||
|
|
||||||
return RemoteWebDriver::create(
|
try {
|
||||||
config("dusk.driver.url", 'http://localhost:9515'),
|
return RemoteWebDriver::create(
|
||||||
DesiredCapabilities::chrome()->setCapability(
|
config("dusk.driver.url", 'http://localhost:9515'),
|
||||||
ChromeOptions::CAPABILITY,
|
DesiredCapabilities::chrome()->setCapability(
|
||||||
$options
|
ChromeOptions::CAPABILITY,
|
||||||
)
|
$options
|
||||||
->setCapability('timeouts', [
|
)
|
||||||
'implicit' => 20000, // 20 seconds
|
->setCapability('timeouts', [
|
||||||
'pageLoad' => 300000, // 5 minutes
|
'implicit' => 20000, // 20 seconds
|
||||||
'script' => 30000, // 30 seconds
|
'pageLoad' => 300000, // 5 minutes
|
||||||
]),
|
'script' => 30000, // 30 seconds
|
||||||
4000,
|
]),
|
||||||
$this->timeout * 1000
|
4000,
|
||||||
);
|
$this->timeout * 1000
|
||||||
|
);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
Log::error("Failed to create RemoteWebDriver: " . $e->getMessage());
|
||||||
|
AllNotification::send(new JobDebugNotification($this->jobId, "Failed to create RemoteWebDriver: " . $e->getMessage()));
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function terminate() {
|
public function terminate() {
|
||||||
|
Reference in New Issue
Block a user