Open Franiac opened 1 year ago
I'm running multiple cockpit instances using SQLite. Never experienced such issue.
Can you try to delete the log
table in /storage/data/system.sqlite
?
Got some news:
Uploaded Cockpit to my webspace (strato.de) and tested it there and it workes fine.
The issue occures on a local XAMPP stack. We could compare phpinfo() in order to get some ideas as to why this happens. My first wild shot would be that my hosting provider has PHP MongoDB extensions enabled by default whereas XAMPP does not (not confirmed so far).
Do you even want to investigate this issue?
I am a software dev myself and I would understand a simple "XAMPP is not my problem, so don't care" 😄
But it is a widespread local development stack for PHP so in my opinion it has some weight to it.
I can't test all possible dev stacks but feel invited to make it work on XAMPP 😉
@aheinze Finally I was able to reproduce an event with an empty error log:
use Symfony\Component\Console\Input\InputArgument;
in https://github.com/Cockpit-HQ/Cockpit/blob/develop/modules/System/Command/Spaces/Create.php#L7./tower
system.sqlite
I discovered it while writing a new cli command (to create a user) with ->addOption
and I forgot to use Symfony\Component\Console\Input\InputOption;
.
I fiddled a bit with commenting out error handling, unsetting $error['trace']
and piping output to error.txt
. It looks like the exceptions are caught, but the SQLite database stops writing without throwing a new exception.
So I guess, a trace of >95k characters (error.txt is ~95kb), which contains the whole Lime\App is too big and SQLite silently fails.
I am currently trying out Cockpit Core. I realized that I cannot display any logs in
Settings
->Logs
. The loading indicator just does not stop spinning when the route/system/logs
gets called.Checked the JavaScript console and:
MongoLite\\Database::callCriteriaFunction(): Argument #2 ($document) must be of type array, null given
Well... I do not use MongoDB and therefor it is not configured in
config.php
.In Logs.php I found this:
And
$this->app->dataStorage
is initialized inbootstrap.php
withConclusion:
Logs don't work without a Mongo Database.
I have not digged any deeper but it seems like there is a small concept error. Should logs not also be able to get stored in SQLite if MongoDB is not used? Or am I missing something here?