Changed profile folder + catch connection error

This commit is contained in:
2025-08-11 14:29:35 +02:00
parent 11f8e1abd3
commit 658c9fecf6

View File

@ -161,9 +161,10 @@ 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());
try {
return RemoteWebDriver::create( return RemoteWebDriver::create(
config("dusk.driver.url", 'http://localhost:9515'), config("dusk.driver.url", 'http://localhost:9515'),
DesiredCapabilities::chrome()->setCapability( DesiredCapabilities::chrome()->setCapability(
@ -178,6 +179,11 @@ abstract class BrowserJob implements ShouldQueue
4000, 4000,
$this->timeout * 1000 $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() {