Changed profile folder + catch connection error
This commit is contained in:
@ -161,23 +161,29 @@ abstract class BrowserJob implements ShouldQueue
|
||||
'--disable-setuid-sandbox',
|
||||
'--whitelisted-ips=""',
|
||||
'--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());
|
||||
|
||||
return RemoteWebDriver::create(
|
||||
config("dusk.driver.url", 'http://localhost:9515'),
|
||||
DesiredCapabilities::chrome()->setCapability(
|
||||
ChromeOptions::CAPABILITY,
|
||||
$options
|
||||
)
|
||||
->setCapability('timeouts', [
|
||||
'implicit' => 20000, // 20 seconds
|
||||
'pageLoad' => 300000, // 5 minutes
|
||||
'script' => 30000, // 30 seconds
|
||||
]),
|
||||
4000,
|
||||
$this->timeout * 1000
|
||||
);
|
||||
try {
|
||||
return RemoteWebDriver::create(
|
||||
config("dusk.driver.url", 'http://localhost:9515'),
|
||||
DesiredCapabilities::chrome()->setCapability(
|
||||
ChromeOptions::CAPABILITY,
|
||||
$options
|
||||
)
|
||||
->setCapability('timeouts', [
|
||||
'implicit' => 20000, // 20 seconds
|
||||
'pageLoad' => 300000, // 5 minutes
|
||||
'script' => 30000, // 30 seconds
|
||||
]),
|
||||
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() {
|
||||
|
Reference in New Issue
Block a user