Because Dusk literally opens your browser, types stuff, does stuff here and there, it literally reruns your migrations, puts your app into weird place during the tests with overriding .env file, etc. It could screw up your entire db. Don't do that.
Run Dusk in production mode
Hi every one
Do you know why it's a danger to run dusk in production mode?
For the loginAs() feature, Dusk registers "secret" routes: https://github.com/laravel/dusk/blob/4.0/src/DuskServiceProvider.php#L16
If you register these routes in your production environment, anyone can just login as a user by calling /_dusk/login/{id}.
I came across this, because I want to run Dust in production as a scraper with a minimal UI. The current version of the DuskServiceProvider actually prevents the login routes being registered in production.
I'm working on a robot/scraper too, and need to run Dusk on a remote server. I'm a beginner with Laravel and even more so with Dusk, so i did not quite understand what you mentioned about the DuskServiceProvider. Are you saying it will be impossible to run Dusk in production? Or else, do you know what to do to make it work? Currently i get the following error:
Facebook\WebDriver\Exception\WebDriverCurlException Curl error thrown for http POST to /session with params: {"capabilities":{"firstMatch":[{"browserName":"chrome","goog:chromeOptions":{"args":["--disable-gpu","--no-sandbox"]}}]},"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"args":["--disable-gpu","--no-sandbox"]}}} Failed to connect to localhost port 9515: Connection refused
Is it "normal"? Is there a way to make it work?
@annaro wouldn't it be a better solution for you to use Goutte for your scraper?
Does Goutte run the Javascript on the page before scraping?
@argonzalez no. it just curls and scrapes whether it gets back.
@silverhand goutte wont fit your usecase if you want to interact with a js front end.
@silverhand I am currently looking for the same kind of solution. Did you already find a solution?
Please or to participate in this conversation.