I get a 500 when opening a repository
I get the following stuff in my logs, but I can't figure out what's happening...
[2024-08-18T22:47:08.042281+02:00] request.INFO: Matched route "repository_show". {"route":"repository_show","route_parameters":{"_route":"repository_show","_controller":"GitList\\App\\Controller\\Repository::show","repository":"test"},"request_uri":"https://git.geheimesite.nl/test","method":"GET"} []
[2024-08-18T22:47:08.074231+02:00] php.INFO: Deprecated: Using ${var} in strings is deprecated, use {$var} instead {"exception":"[object] (ErrorException(code: 0): Deprecated: Using ${var} in strings is deprecated, use {$var} instead at /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Date.php:1253)"} []
[2024-08-18T22:47:08.074378+02:00] php.INFO: Deprecated: Using ${var} in strings is deprecated, use {$var} instead {"exception":"[object] (ErrorException(code: 0): Deprecated: Using ${var} in strings is deprecated, use {$var} instead at /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Date.php:1262)"} []
[2024-08-18T22:47:08.074797+02:00] php.INFO: Deprecated: Using ${var} in strings is deprecated, use {$var} instead {"exception":"[object] (ErrorException(code: 0): Deprecated: Using ${var} in strings is deprecated, use {$var} instead at /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Date.php:2482)"} []
[2024-08-18T22:47:08.074960+02:00] php.INFO: Deprecated: Using ${var} in strings is deprecated, use {$var} instead {"exception":"[object] (ErrorException(code: 0): Deprecated: Using ${var} in strings is deprecated, use {$var} instead at /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Date.php:2607)"} []
[2024-08-18T22:47:08.075005+02:00] php.INFO: Deprecated: Using ${var} in strings is deprecated, use {$var} instead {"exception":"[object] (ErrorException(code: 0): Deprecated: Using ${var} in strings is deprecated, use {$var} instead at /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Date.php:2619)"} []
[2024-08-18T22:47:08.081491+02:00] php.CRITICAL: Uncaught Error: Carbon\CarbonImmutable::setLastErrors(): Argument #1 ($lastErrors) must be of type array, false given, called in /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 98 {"exception":"[object] (TypeError(code: 0): Carbon\\CarbonImmutable::setLastErrors(): Argument #1 ($lastErrors) must be of type array, false given, called in /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 98 at /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:928)"} []
[2024-08-18T22:47:08.083896+02:00] request.CRITICAL: Uncaught PHP Exception TypeError: "Carbon\CarbonImmutable::setLastErrors(): Argument #1 ($lastErrors) must be of type array, false given, called in /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 98" at /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php line 928 {"exception":"[object] (TypeError(code: 0): Carbon\\CarbonImmutable::setLastErrors(): Argument #1 ($lastErrors) must be of type array, false given, called in /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php on line 98 at /home/robinb/domains/git.geheimesite.nl/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:928)"} []
Maybe I'm doing something really stupid tho. If so, please tell me :)
I'm also getting a 500 error. When I set the $debug flag to true, I see the following stack trace:
in [/var/www/xxx.com/GitList/src/Kernel.php ](http://peterwayner.com/GitList/public/)(line 52)
in [/var/www/xxx.com/GitList/vendor/symfony/http-kernel/Kernel.php ](http://xxx.com/GitList/public/)-> registerBundles (line 382)
in [/var/www/xxx.com/GitList/vendor/symfony/http-kernel/Kernel.php ](http://xxx.com/GitList/public/)-> initializeBundles (line 768)
in [/var/www/xxx.com/GitList/vendor/symfony/http-kernel/Kernel.php ](http://xxx.com/GitList/public/)-> preBoot (line 190)
Kernel->handle()
in [/var/www/xxx.com/GitList/public/index.php ](http://xxx.com/GitList/public/)(line 36)
Thanks for building such a nice tool. TIA for any help.
I didn't debug this in detail.. looks like 'newer' repos can't be read. On older ones it is also a problem if you use 'main' and not 'master' as default branch.
@klaussilveira - is there a chance we can get an updated version? This wonderful script has no alternatives, any thing else is basically a full blown project managment, issue tracker..
@rrupi do you have any examples of public repos I can clone that cause issues? Would be useful to reproduce this locally.
Unfortunately not.. we use gitlist for our configuration and "digital ducttape" git.. none of the "I refuse totally" repos are share-able.
Double checked now. The only ones I thought I might be able to share where ones without 'master' (and adding a 'master' branch fixed it)
@rrupi can you try latest master and see if that works for you?
I tried.. but I can't find all the things I need to get master running so I tried 'nightly' as linked in the README. Somehow the redirect doesn't work. I get the overview page and it shows the git repos, but clicking on one it tries /something.git (which ends up in a 404).
A bit late.. but I did find the reason for the remaining 500s I got. Not sure how this happened but we managed to create git repos without a default branch. Setting the reference in the repositories fixed that, gitlist now found something with HEAD branch.