causefx / Organizr

HTPC/Homelab Services Organizer - Written in PHP
GNU General Public License v3.0
5.17k stars 291 forks source link

API 500 Internal Server Error #1923

Closed BastionNtB closed 1 year ago

BastionNtB commented 1 year ago

INFORMATION Organizr Version 2.1.2430 Organizr Branch v2-master Database Driver sqlite3 data.db Install Type Native Organizr Paths Writable PHP Version 7.4.33 Webserver Version nginx/1.18.0 License Personal OS Ubuntu 22.04


Problem Description:

Nothing wrong appears to be showing up visually, just looking at the browser console, and found random 500 errors.

Just some background, this is a fresh 2.1 install, so the migration steps from 2.0 to 2.1 weren't needed, and I already check that everything is set as it should be.

It looks like organizr is trying to access https://sub.site.com/api/v2/sponsors/all Request Method: GET Status Code: 500 Internal Server Error

Looking at the preview of the error in the network tab, shows the following:

Slim Application Error
The application could not run because of the following error:

Details
Type: Error
Code: 0
Message: Call to undefined function mb_regex_encoding()
File: /var/www/websites/sub.site.com/api/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/Cleaner.php
Line: 124
Trace
#0 /var/www/websites/sub.site.com/api/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/Cleaner.php(35): PHPHtmlParser\Dom\Cleaner->setUpRegexEncoding()
#1 /var/www/websites/sub.site.com/api/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom.php(155): PHPHtmlParser\Dom\Cleaner->clean()
#2 /var/www/websites/sub.site.com/api/classes/organizr.class.php(6090): PHPHtmlParser\Dom->loadStr()
#3 /var/www/websites/sub.site.com/api/classes/organizr.class.php(6123): Organizr->getGithubSponsors()
#4 /var/www/websites/sub.site.com/api/v2/routes/sponsors.php(20): Organizr->getAllSponsors()
#5 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(43): {closure}()
#6 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Routing/Route.php(384): Slim\Handlers\Strategies\RequestResponse->__invoke()
#7 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\Routing\Route->handle()
#8 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\MiddlewareDispatcher->handle()
#9 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Routing/Route.php(341): Slim\MiddlewareDispatcher->handle()
#10 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\Routing\Route->run()
#11 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): Slim\Routing\RouteRunner->handle()
#12 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process()
#13 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): class@anonymous->handle()
#14 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process()
#15 /var/www/websites/sub.site.com/api/v2/index.php(92): class@anonymous->handle()
#16 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(313): {closure}()
#17 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): class@anonymous->handle()
#18 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle()
#19 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/App.php(199): Slim\App->handle()
#20 /var/www/websites/sub.site.com/api/v2/index.php(151): Slim\App->run()
#21 {main}
Go Back

I don't know anything about anything I'm seeing here, but it was an error, thought I might just toss it on here.


Reproduction Steps:

Looks like it's on page load, not sure if you have to be logged in or not.


Errors on screen? If so paste here:

causefx commented 1 year ago

thanks. i’ll look into it. Sent from my iPhoneOn Mar 5, 2023, at 4:12 PM, BastionNtB @.***> wrote:

INFORMATION Organizr Version 2.1.2430 Organizr Branch v2-master Database Driver sqlite3 data.db Install Type Native Organizr Paths Writable PHP Version 7.4.33 Webserver Version nginx/1.18.0 License Personal OS Ubuntu 22.04

Problem Description:

Nothing wrong appears to be showing up visually, just looking at the browser console, and found random 500 errors. Just some background, this is a fresh 2.1 install, so the migration steps from 2.0 to 2.1 weren't needed, and I already check that everything is set as it should be. It looks like organizr is trying to access https://sub.site.com/api/v2/sponsors/all Request Method: GET Status Code: 500 Internal Server Error Looking at the preview of the error in the network tab, shows the following: Slim Application Error The application could not run because of the following error:

Details Type: Error Code: 0 Message: Call to undefined function mb_regex_encoding() File: /var/www/websites/sub.site.com/api/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/Cleaner.php Line: 124 Trace

0 /var/www/websites/sub.site.com/api/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/Cleaner.php(35): PHPHtmlParser\Dom\Cleaner->setUpRegexEncoding()

1 /var/www/websites/sub.site.com/api/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom.php(155): PHPHtmlParser\Dom\Cleaner->clean()

2 /var/www/websites/sub.site.com/api/classes/organizr.class.php(6090): PHPHtmlParser\Dom->loadStr()

3 /var/www/websites/sub.site.com/api/classes/organizr.class.php(6123): Organizr->getGithubSponsors()

4 /var/www/websites/sub.site.com/api/v2/routes/sponsors.php(20): Organizr->getAllSponsors()

5 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(43): {closure}()

6 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Routing/Route.php(384): Slim\Handlers\Strategies\RequestResponse->__invoke()

7 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\Routing\Route->handle()

8 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\MiddlewareDispatcher->handle()

9 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Routing/Route.php(341): Slim\MiddlewareDispatcher->handle()

10 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\Routing\Route->run()

11 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): Slim\Routing\RouteRunner->handle()

12 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process()

13 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): @.***>handle()

14 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process()

15 /var/www/websites/sub.site.com/api/v2/index.php(92): @.***>handle()

16 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(313): {closure}()

17 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): @.***>handle()

18 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle()

19 /var/www/websites/sub.site.com/api/vendor/slim/slim/Slim/App.php(199): Slim\App->handle()

20 /var/www/websites/sub.site.com/api/v2/index.php(151): Slim\App->run()

21 {main}

Go Back

I don't know anything about anything I'm seeing here, but it was an error, thought I might just toss it on here.

Reproduction Steps:

Looks like it's on page load, not sure if you have to be logged in or not.

Errors on screen? If so paste here:

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] commented 1 year ago

This issue has been closed due to lack of activity, if this issue still persists, please re-open it.