Closed swissmant closed 7 years ago
I'm dealing with the exact same thing. I've tried quite a few things to no avail. Is this a symfony Process thing? Or a Scheduler thing? Or a Dusk thing? - hard to tell.
Basically it seems the problem is solely with the running the dusk command from a cron job. Running it any other way works fine (I'm using phantomjs)
Same here. I run the test in a docker container within Bitbucket Pipeline and it's unable to run Dusk.
$ php artisan dusk
[Symfony\Component\Process\Exception\RuntimeException]
TTY mode requires /dev/tty to be read/writable.
I can't use PhantomJS here.
Also a Bitbucket Pipeline user here and of course I am having the same issue. I am ensure if this is something Dusk should be fixing, or if this is something Atlassian should fix in the Pipeline system.
I mean, I'm just trying to get these things running via Laravel's Scheduler - I think it's something that should be addressed - ya?
Can you guys try to pull #223 and see if it solves the problem?
@calebporzio @swissmant
@deleugpn - Awesome! Works like a charm :)
Also a Bitbucket Pipeline user here and of course I am having the same issue. I am ensure if this is something Dusk should be fixing, or if this is something Atlassian should fix in the Pipeline system.
me too
Also a Bitbucket Pipeline user here and of course I am having the same issue. I am ensure if this is something Dusk should be fixing, or if this is something Atlassian should fix in the Pipeline system.
me too
me too. I was trying to set up a test with dusk with alpine, But not working in the Bitbucket pipelines.
In the local, It works fine. I can run the test without a selenium driver. But unfortunately on Bitbucket.
I have some tests built using Dusk and they run fine from command line using php artisan dusk. However, if I try to run them as a cron (from Laravel Forge), I get an error saying
TTY mode requires /dev/tty to be writable
Here's the full output:
I tried to force TTY mode to be false in Process.php mentioned above, and the test ran to a limited extent. What happened is that the test method before the $this->browse closure function, but anything within the closure or following it were not output to the logs. Here is my test class (excluding a couple of extra methods not necessary for de-bugging purposes):
So the logged messages were:
but I get nothing else.
We're running on Ubuntu 16.04 on a Digital Ocean droplet.
Not sure if it's relevant, but here's the Forge command:
Every Minute * * * * * forge php /home/forge/crawlers.mysite.com/artisan schedule:run
Also, if it's relevant, here is the schedule() method in app/Consol/Kernel.php:
I tried running it like this, and I also tried:
$schedule->command('dusk')->dailyAt('22:00');