FriendsOfFlarum / webhooks

Flarum with outgoing webhooks
MIT License
21 stars 12 forks source link

Error when Response description is being set null #16

Closed ghost closed 4 years ago

ghost commented 4 years ago
[2020-05-20 10:59:59] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Argument 1 passed to Reflar\Webhooks\Response::setDescription() must be of the type string, array given, called in /var/www/sourceturk/flarum/vendor/reflar/webhooks/src/Actions/Post/Deleted.php on line 41 in /var/www/sourceturk/flarum/vendor/reflar/webhooks/src/Response.php:107
Stack trace:
#0 /var/www/sourceturk/flarum/vendor/reflar/webhooks/src/Actions/Post/Deleted.php(41): Reflar\Webhooks\Response->setDescription()
#1 /var/www/sourceturk/flarum/vendor/reflar/webhooks/src/Jobs/HandleEvent.php(47): Reflar\Webhooks\Actions\Post\Deleted->listen()
#2 [internal function]: Reflar\Webhooks\Jobs\HandleEvent->handle()
#3 /var/www/sourceturk/flarum/vendor/illuminate/container/BoundMethod.php(29): call_user_func_array()
#4 /var/www/sourceturk/flarum/vendor/illuminate/container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#5 /var/www/sourceturk/flarum/vendor/illuminate/container/BoundMethod.php(31): Illuminate\Container\BoundMethod::callBoundMethod()
#6 /var/www/sourceturk/flarum/vendor/illuminate/container/Container.php(572): Illuminate\Container\BoundMethod::call()
#7 /var/www/sourceturk/flarum/vendor/illuminate/bus/Dispatcher.php(94): Illuminate\Container\Container->call()
#8 /var/www/sourceturk/flarum/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#9 /var/www/sourceturk/flarum/vendor/illuminate/pipeline/Pipeline.php(104): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#10 /var/www/sourceturk/flarum/vendor/illuminate/bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then()
#11 /var/www/sourceturk/flarum/vendor/illuminate/queue/CallQueuedHandler.php(49): Illuminate\Bus\Dispatcher->dispatchNow()
#12 /var/www/sourceturk/flarum/vendor/illuminate/queue/Jobs/Job.php(83): Illuminate\Queue\CallQueuedHandler->call()
#13 /var/www/sourceturk/flarum/vendor/illuminate/queue/SyncQueue.php(42): Illuminate\Queue\Jobs\Job->fire()
#14 /var/www/sourceturk/flarum/vendor/reflar/webhooks/src/Listener/TriggerListener.php(85): Illuminate\Queue\SyncQueue->push()
#15 /var/www/sourceturk/flarum/vendor/illuminate/events/Dispatcher.php(357): Reflar\Webhooks\Listener\TriggerListener->run()
#16 /var/www/sourceturk/flarum/vendor/illuminate/events/Dispatcher.php(209): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()
#17 /var/www/sourceturk/flarum/vendor/flarum/core/src/Foundation/DispatchEventsTrait.php(33): Illuminate\Events\Dispatcher->dispatch()
#18 /var/www/sourceturk/flarum/vendor/flarum/core/src/Post/Command/DeletePostHandler.php(57): Flarum\Post\Command\DeletePostHandler->dispatchEventsFor()
#19 /var/www/sourceturk/flarum/vendor/illuminate/bus/Dispatcher.php(90): Flarum\Post\Command\DeletePostHandler->handle()
#20 /var/www/sourceturk/flarum/vendor/illuminate/pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}()
#21 /var/www/sourceturk/flarum/vendor/illuminate/pipeline/Pipeline.php(104): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#22 /var/www/sourceturk/flarum/vendor/illuminate/bus/Dispatcher.php(98): Illuminate\Pipeline\Pipeline->then()
#23 /var/www/sourceturk/flarum/vendor/illuminate/bus/Dispatcher.php(76): Illuminate\Bus\Dispatcher->dispatchNow()
#24 /var/www/sourceturk/flarum/vendor/flarum/core/src/Api/Controller/DeletePostController.php(38): Illuminate\Bus\Dispatcher->dispatch()
#25 /var/www/sourceturk/flarum/vendor/flarum/core/src/Api/Controller/AbstractDeleteController.php(24): Flarum\Api\Controller\DeletePostController->delete()
#26 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/RouteHandlerFactory.php(38): Flarum\Api\Controller\AbstractDeleteController->handle()
#27 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/Middleware/DispatchRoute.php(65): Flarum\Http\RouteHandlerFactory->Flarum\Http\{closure}()
#28 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\DispatchRoute->process()
#29 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/Middleware/SetLocale.php(50): Laminas\Stratigility\Next->handle()
#30 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\SetLocale->process()
#31 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/Middleware/CheckCsrfToken.php(45): Laminas\Stratigility\Next->handle()
#32 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\CheckCsrfToken->process()
#33 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithHeader.php(55): Laminas\Stratigility\Next->handle()
#34 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithHeader->process()
#35 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/Middleware/AuthenticateWithSession.php(32): Laminas\Stratigility\Next->handle()
#36 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\AuthenticateWithSession->process()
#37 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/Middleware/RememberFromCookie.php(51): Laminas\Stratigility\Next->handle()
#38 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\RememberFromCookie->process()
#39 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/Middleware/StartSession.php(61): Laminas\Stratigility\Next->handle()
#40 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\StartSession->process()
#41 /var/www/sourceturk/flarum/vendor/flarum/core/src/Api/Middleware/FakeHttpMethods.php(29): Laminas\Stratigility\Next->handle()
#42 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Api\Middleware\FakeHttpMethods->process()
#43 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/Middleware/ParseJsonBody.php(28): Laminas\Stratigility\Next->handle()
#44 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\ParseJsonBody->process()
#45 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(57): Laminas\Stratigility\Next->handle()
#46 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Flarum\Http\Middleware\HandleErrors->process()
#47 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()
#48 /var/www/sourceturk/flarum/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#49 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\RequestHandler->process()
#50 /var/www/sourceturk/flarum/vendor/middlewares/base-path-router/src/BasePathRouter.php(97): Laminas\Stratigility\Next->handle()
#51 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePathRouter->process()
#52 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(42): Laminas\Stratigility\Next->handle()
#53 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Laminas\Stratigility\Middleware\OriginalMessages->process()
#54 /var/www/sourceturk/flarum/vendor/middlewares/base-path/src/BasePath.php(53): Laminas\Stratigility\Next->handle()
#55 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/Next.php(61): Middlewares\BasePath->process()
#56 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(84): Laminas\Stratigility\Next->handle()
#57 /var/www/sourceturk/flarum/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(73): Laminas\Stratigility\MiddlewarePipe->process()
#58 /var/www/sourceturk/flarum/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(96): Laminas\Stratigility\MiddlewarePipe->handle()
#59 /var/www/sourceturk/flarum/vendor/flarum/core/src/Http/Server.php(42): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#60 /var/www/sourceturk/flarum/public/index.php(26): Flarum\Http\Server->listen()
#61 {main}  
ghost commented 4 years ago

The problem was solved when I closed cloudflare js chal. What can I do to avoid problems when js chal is open?

dsevillamartin commented 4 years ago

What is "cloudflare js chal"? Also - this extension doesn't add any forum side JS, as this is a PHP error, so that wouldn't affect it.

ghost commented 4 years ago

@datitisev cloudflare affects firewall rules when "js challenge" is active.

Picture: http://prntscr.com/skjykk