Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7074

Unable to start firefox geckodriver in Symfony Panther using Ubuntu linux cronjob unless user is logged in

$
0
0

I have some web scraping and screeshotting using Symphony Panther. That worked flawlessly on my dev machine. With some adaptions I made it work on a Ubuntu 22 server also. Now I wanted to do it as a cron job.I added

/usr/bin/php /usr/local/bin/composer --working-dir /opt/mybot/ start >> /var/log/mybot/cron.log 2>&1

As a cron job. While normale scraping worked fine, as soon as I want to create a firefox screenshot I get an exceptionPHP Fatal error: Uncaught RuntimeException: Could not start firefox. Exit code: 1 (General error). Error output: /system.slice/cron.service is not a snap croup

However as long as I am logged into that machine via SSH (without doing anything else) the cron job runs fine without any exception. That puzzles me a bit (and makes it hard to debug to be fair).

Is there something I can do, so that it works unattended?


Viewing all articles
Browse latest Browse all 7074

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>