nextcloud / integration_mastodon

🐘 Mastodon integration into Nextcloud
https://apps.nextcloud.com/apps/integration_mastodon
GNU Affero General Public License v3.0
18 stars 5 forks source link

Mastodon sending 500 Internal Server Error crashes the whole nextcloud instance #44

Open gergelypolonkai opened 1 year ago

gergelypolonkai commented 1 year ago

I have a faulty mastodon instance which almost always returns 500 HTTP status code for every request. Since this began, my nextcloud instance crashes after almost every request. Disabling the Mastodon integration app fixes the problem.

Relevant error message from my logs:

Mastodon API error : GuzzleHttp\Exception\ServerException: Server error: `GET https://my.mastodon.server/api/v1/notifications?exclude_types%5B%5D=poll&limit=30` resulted in a `500 Internal Server Error` response:
<!DOCTYPE html>
<html lang='en'>
<head>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
<meta charse (truncated...)
 in /opt/nextcloud/3rdparty/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /opt/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\Exception\RequestException::create()
#1 /opt/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp\{closure}()
#2 /opt/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler()
#3 /opt/nextcloud/3rdparty/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 /opt/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run()
#5 /opt/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#6 /opt/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#7 /opt/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#8 /opt/nextcloud/3rdparty/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#9 /opt/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Promise\Promise->wait()
#10 /opt/nextcloud/lib/private/Http/Client/Client.php(218): GuzzleHttp\Client->request()
#11 /opt/nextcloud/apps/integration_mastodon/lib/Service/MastodonAPIService.php(239): OC\Http\Client\Client->get()
#12 /opt/nextcloud/apps/integration_mastodon/lib/Service/MastodonAPIService.php(99): OCA\Mastodon\Service\MastodonAPIService->request()
#13 /opt/nextcloud/apps/integration_mastodon/lib/Controller/MastodonAPIController.php(161): OCA\Mastodon\Service\MastodonAPIService->getNotifications()
#14 /opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(225): OCA\Mastodon\Controller\MastodonAPIController->getNotifications()
#15 /opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(133): OC\AppFramework\Http\Dispatcher->executeController()
#16 /opt/nextcloud/lib/private/AppFramework/App.php(172): OC\AppFramework\Http\Dispatcher->dispatch()
#17 /opt/nextcloud/lib/private/Route/Router.php(298): OC\AppFramework\App::main()
#18 /opt/nextcloud/lib/base.php(1047): OC\Route\Router->match()
#19 /opt/nextcloud/index.php(36): OC::handleRequest()
#20 {main}
julien-nc commented 1 year ago

Thanks for the bug report. It should be fixed in v1.0.4 which is out. Could you try it and confirm?