Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Internal Server Error #908

Open
tch1001 opened this issue Jun 14, 2022 · 10 comments
Open

500 Internal Server Error #908

tch1001 opened this issue Jun 14, 2022 · 10 comments

Comments

@tch1001
Copy link

tch1001 commented Jun 14, 2022

After installing all the dependencies, I get a pretty print 500 internal server error page. Upon checking the nginx error logs, I only get
2022/06/14 17:04:03 [notice] 25559#25559: signal process started
and no diagnostic error messages.
I have not touched the default config.yml. I am running php version

PHP 8.1.7 (cli) (built: Jun 10 2022 12:22:48) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.7, Copyright (c), by Zend Technologies

and symfony version
Symfony CLI version 5.4.11
on ubuntu
Linux ip-172-31-22-46 5.13.0-1029-aws #32~20.04.1-Ubuntu SMP Thu Jun 9 13:03:13 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

I have narrowed down the source of the crash to this line of the code

$kernel = new Kernel($env, $debug);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send(); # this line crashes
$kernel->terminate($request, $response);

but am unable to dig further due to limited php knowledge. Thank you.

@klaussilveira
Copy link
Owner

Not really possible to debug this without some PHP logs. Have you checked the application log folder, or PHP's log?

@robot3498712
Copy link

robot3498712 commented Jul 31, 2022

I'm getting a similar issue ```[2022-07-31T12:05:11.804734+01:00] php.CRITICAL: Uncaught Error: GitList\SCM\Repository::__construct(): Argument #1 ($path) must be of type string, bool given, called in /home/share/gitlist/src/Repository/Index.php on line 34 {"exception":"[object] (TypeError(code: 0): GitList\SCM\Repository::__construct(): Argument #1 ($path) must be of type string, bool given, called in /home/share/gitlist/src/Repository/Index.php on line 34 at /home/share/gitlist/src/SCM/Repository.php:9)"} []

[2022-07-31T12:05:11.807265+01:00] request.CRITICAL: Uncaught PHP Exception TypeError: "GitList\SCM\Repository::__construct(): Argument #1 ($path) must be of type string, bool given, called in /home/share/gitlist/src/Repository/Index.php on line 34" at /home/share/gitlist/src/SCM/Repository.php line 9 {"exception":"[object] (TypeError(code: 0): GitList\SCM\Repository::__construct(): Argument #1 ($path) must be of type string, bool given, called in /home/share/gitlist/src/Repository/Index.php on line 34 at /home/share/gitlist/src/SCM/Repository.php:9)"} []```

By the way, I'm using gitolite.

@tch1001
Copy link
Author

tch1001 commented Aug 3, 2022

Twig\Error\RuntimeError:
An exception has been thrown during the rendering of a template ("Could not find the entrypoints file from Webpack: the file "/var/www/gitlist_tar/public/assets/entrypoints.json" does not exist.").

  at assets/themes/default/templates/base.html.twig:9
  at Twig\Template->displayWithErrorHandling()
     (vendor/twig/twig/src/Template.php:367)
  at Twig\Template->display()
     (var/cache/dev/twig/31/315fec376585a32ffa3bafb5b6646d6b.php:46)
  at __TwigTemplate_93a237d7b42b019aadbc74833e7cbc8a->doDisplay()
     (vendor/twig/twig/src/Template.php:394)
  at Twig\Template->displayWithErrorHandling()
     (vendor/twig/twig/src/Template.php:367)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:379)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:40)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Environment.php:277)
  at Twig\Environment->render()
     (src/App/Controller/Repository.php:25)
  at GitList\App\Controller\Repository->list()
     (vendor/symfony/http-kernel/HttpKernel.php:152)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:35)                

@N6REJ
Copy link

N6REJ commented Aug 27, 2022

I'm getting the same error using gitlist 2.0.0 & apache 2.24.54 and php 8.1.8
The issue comes from a looping calling to index.php

[Sat Aug 27 03:23:24.372249 2022] [core:error] [pid 75436:tid 1712] [client 127.0.0.1:55822] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3956): [client 127.0.0.1:55822] AH00121: r->uri = /gitlist/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3962): [client 127.0.0.1:55822] AH00122: redirected from r->uri = /gitlist/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3962): [client 127.0.0.1:55822] AH00122: redirected from r->uri = /gitlist/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3962): [client 127.0.0.1:55822] AH00122: redirected from r->uri = /gitlist/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3962): [client 127.0.0.1:55822] AH00122: redirected from r->uri = /gitlist/index.php/index.php/index.php/index.php/index.php/index.php/index.php
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3962): [client 127.0.0.1:55822] AH00122: redirected from r->uri = /gitlist/index.php/index.php/index.php/index.php/index.php/index.php
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3962): [client 127.0.0.1:55822] AH00122: redirected from r->uri = /gitlist/index.php/index.php/index.php/index.php/index.php
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3962): [client 127.0.0.1:55822] AH00122: redirected from r->uri = /gitlist/index.php/index.php/index.php/index.php
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3962): [client 127.0.0.1:55822] AH00122: redirected from r->uri = /gitlist/index.php/index.php/index.php
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3962): [client 127.0.0.1:55822] AH00122: redirected from r->uri = /gitlist/index.php/index.php
[Sat Aug 27 03:23:24.372249 2022] [core:debug] [pid 75436:tid 1712] core.c(3962): [client 127.0.0.1:55822] AH00122: redirected from r->uri = /gitlist/index.php

Since there is no /index.php this sorta makes sense.
I suspect the issue is in the .htaccess routine

<IfModule mod_rewrite.c>
    Options -MultiViews +SymLinksIfOwnerMatch

    RewriteEngine On
    RewriteBase /gitlist/

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php/$1 [L,NC]
</IfModule>
<Files config.ini>
    order allow,deny
    deny from all
</Files>

if you go to http://localhost/gitlist/public/index.php you get the following
image

You can see our implementation here https://github.com/Bearsampp/module-gitlist
As a FOSS project with many users I'd like to get this working.

@klaussilveira
Copy link
Owner

klaussilveira commented Aug 30, 2022

Did you guys download the release zip/tarball, or cloned the repo? If you cloned the repo, you won't have the compiled assets, so you have to do it all by yourself by following the developer instructions.

@N6REJ
Copy link

N6REJ commented Aug 31, 2022

Did you guys download the release zip/tarball, or cloned the repo? If you cloned the repo, you won't have the compiled assets, so you have to do it all by yourself by following the developer instructions.

we downloaded https://github.com/klaussilveira/gitlist/releases/download/2.0.0/gitlist-2.0.0.zip

@klaussilveira
Copy link
Owner

Seems like a duplicate of #917

Can you check that thread and see if the proposed fixes yield anything for you?

@N6REJ
Copy link

N6REJ commented Sep 1, 2022

@klaussilveira I'm getting confused ( i'm old 🤣 ) so I'm going to have my partner take a look @ this.

@jwaisner
Copy link

jwaisner commented Sep 1, 2022

@klaussilveira I'm getting confused ( i'm old 🤣 ) so I'm going to have my partner take a look @ this.

@klaussilveira , The error being reported is error 500 not 404. Are you saying that the recommended steps for the 404 error will work for a 500 error?

@N6REJ
Copy link

N6REJ commented Sep 15, 2022

if it matters our users typically have several repos They all are like /www/repo1 /www\repo2 etc.
I hope we can get this cleared up quickly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants