Slim Application Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • esendino
    Senior Member
    • May 2019
    • 158

    Slim Application Error

    Hi.
    Anyone has any idea on haw to solve this?

    I'm updating records in the DB using the API

    I do that frequently on different tables and don't have any issue

    Got a frequent problem (not always) on a particular table.

    When trying to POST a record I receive a 500 error and the only info is:


    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Slim Application Error</title>
    <style>
    body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif}
    h1{margin:0;font-size:48px;font-weight:normal;line-height:48px}
    strong{display:inline-block;width:65px} </style>
    </head>

    <body>
    <h1>Slim Application Error</h1>
    <div><p>A website error has occurred. Sorry for the temporary inconvenience.</p></div>
    <a href="#" onclick="window.history.go(-1)">Go Back</a>
    </body>
    </html>

    Any idea how to solve, where to further investigate?​
  • shalmaxb
    Senior Member
    • Mar 2015
    • 1606

    #2
    could you please post your error log file.

    Comment

    • esendino
      Senior Member
      • May 2019
      • 158

      #3
      Sure.

      This is the error log
      [2024-05-24 09:22:21] ERROR: Slim Application Error Type: Error Code: 0 Message: Call to a member function getEntityType() on null File: /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Core/Workflow/Actions/StartBpmnProcess.php Line: 56 Trace: #0 /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Core/Workflow/Actions/Base.php(88): Espo\Modules\Advanced\Core\Workflow\Actions\StartB pmnProcess->run(Object(Espo\Custom\Entities\WooCustomer), Object(stdClass)) #1 /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Core/Workflow/ActionManager.php(77): Espo\Modules\Advanced\Core\Workflow\Actions\Base->process(Object(Espo\Custom\Entities\WooCustomer ), Object(stdClass), NULL, Object(stdClass)) #2 /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Core/Workflow/ActionManager.php(47): Espo\Modules\Advanced\Core\Workflow\ActionManager->runAction(Object(stdClass), '6618e9b0b526a74...', Object(stdClass)) #3 /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Core/WorkflowManager.php(190): Espo\Modules\Advanced\Core\Workflow\ActionManager->runActions(Array) #4 /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Hooks/Common/Workflow.php(48): Espo\Modules\Advanced\Core\WorkflowManager->process(Object(Espo\Custom\Entities\WooCustomer ), 'afterRecordSave...', Array) #5 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Hook/GeneralInvoker.php(186): Espo\Modules\Advanced\Hooks\Common\Workflow->afterSave(Object(Espo\Custom\Entities\WooCustom er ), Array, Array) #6 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/HookManager.php(119): Espo\Core\Hook\GeneralInvoker->invoke(Object(Espo\Modules\Advanced\Hooks\Commo n\ Workflow), 'afterSave', Object(Espo\Custom\Entities\WooCustomer), Array, Array) #7 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Repositories/Database.php(318): Espo\Core\HookManager->process('WooCustomer', 'afterSave', Object(Espo\Custom\Entities\WooCustomer), Array) #8 /home/h104essenzial/public_html/crmboxspace/application/Espo/ORM/Repository/RDBRepository.php(163): Espo\Core\Repositories\Database->afterSave(Object(Espo\Custom\Entities\WooCustom er ), Array) #9 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Repositories/Database.php(136): Espo\ORM\Repository\RDBRepository->save(Object(Espo\Custom\Entities\WooCustomer), Array) #10 /home/h104essenzial/public_html/crmboxspace/application/Espo/ORM/EntityManager.php(247): Espo\Core\Repositories\Database->save(Object(Espo\Custom\Entities\WooCustomer), Array) #11 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Record/Service.php(709): Espo\ORM\EntityManager->saveEntity(Object(Espo\Custom\Entities\WooCusto me r), Array) #12 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Controllers/RecordBase.php(181): Espo\Core\Record\Service->create(Object(stdClass), Object(Espo\Core\Record\CreateParams)) #13 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/ControllerActionProcessor.php(87): Espo\Core\Controllers\RecordBase->postActionCreate(Object(Espo\Core\Api\RequestWr ap per), Object(Espo\Core\Api\ResponseWrapper)) #14 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/ControllerActionHandler.php(69): Espo\Core\Api\ControllerActionProcessor->process('WooCustomer', 'create', Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #15 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Espo\Core\Api\ControllerActionHandler->handle(Object(Slim\Psr7\Request)) #16 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/RouteProcessor.php(222): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #17 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/RouteProcessor.php(149): Espo\Core\Api\RouteProcessor->processControllerAction(Object(Espo\Core\Api\Pr oc essData), Object(Slim\Psr7\Request), Object(Espo\Core\Api\ResponseWrapper)) #18 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/RouteProcessor.php(127): Espo\Core\Api\RouteProcessor->processAfterAuth(Object(Espo\Core\Api\ProcessDa ta ), Object(Slim\Psr7\Request), Object(Espo\Core\Api\ResponseWrapper)) #19 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/RouteProcessor.php(79): Espo\Core\Api\RouteProcessor->processInternal(Object(Espo\Core\Api\ProcessDat a) , Object(Slim\Psr7\Request), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #20 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/Starter.php(109): Espo\Core\Api\RouteProcessor->process(Object(Espo\Core\Api\ProcessData), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response)) #21 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): Espo\Core\Api\Starter->Espo\Core\Api\{closure}(Object(Slim\Psr7\Reques t) , Object(Slim\Psr7\Response), Array) Unminify assets or how to recreate t...o.min.js file? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array) Unminify assets or how to recreate t...o.min.js file? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle(Object(Slim\Psr7\Request)) #24 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) Unminify assets or how to recreate t...o.min.js file? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) how to upgrade ? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run(Object(Slim\Psr7\Request)) how to upgrade ? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(45): Slim\Routing\RouteRunner->handle(Object(Slim\Psr7\Request)) #28 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner)) #29 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) #30 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Psr7\Request), Object(Psr\Http\Server\RequestHandlerInterface@ano nymous)) #31 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) Unminify assets or how to recreate t...o.min.js file? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) Quotes /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(Slim\Psr7\Request)) Quotes /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/Starter.php(76): Slim\App->run() #35 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/ApplicationRunners/Api.php(45): Espo\Core\Api\Starter->start() how to upgrade ? /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Application/RunnerRunner.php(84): Espo\Core\ApplicationRunners\Api->run() how to upgrade ? /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Application.php(78): Espo\Core\Application\RunnerRunner->run('Espo\\Core\\Appli...', NULL) how to upgrade ? /home/h104essenzial/public_html/crmboxspace/public/api/v1/index.php(35): Espo\Core\Application->run('Espo\\Core\\Appli...') #39 {main} Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor.

      Comment

      • esendino
        Senior Member
        • May 2019
        • 158

        #4
        I reviewed the log and see there is some order in it. I copied it again

        Nevertheless I don't identify what is wrong

        I see that there some records that fail and someothers that work properly.

        Those that fail, fail consistenly. That means that f I repeat the process (the POST API call) with the same record it fails again

        I compared records that fail with those that don't and don't see any difference

        I appreciate any help


        ERROR: Slim Application Error Type: Error
        Code: 0
        Message: Call to a member function getEntityType() on null
        File: /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Core/Workflow/Actions/StartBpmnProcess.php Line: 56
        Trace:
        #0 /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Core/Workflow/Actions/Base.php(88): Espo\Modules\Advanced\Core\Workflow\Actions\StartB pmnProcess->run(Object(Espo\Custom\Entities\WooCustomer), Object(stdClass))
        #1 /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Core/Workflow/ActionManager.php(77): Espo\Modules\Advanced\Core\Workflow\Actions\Base->process(Object(Espo\Custom\Entities\WooCustomer ), Object(stdClass), NULL, Object(stdClass))
        #2 /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Core/Workflow/ActionManager.php(47): Espo\Modules\Advanced\Core\Workflow\ActionManager->runAction(Object(stdClass), '6618e9b0b526a74...', Object(stdClass))
        #3 /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Core/WorkflowManager.php(190): Espo\Modules\Advanced\Core\Workflow\ActionManager->runActions(Array)
        #4 /home/h104essenzial/public_html/crmboxspace/custom/Espo/Modules/Advanced/Hooks/Common/Workflow.php(48): Espo\Modules\Advanced\Core\WorkflowManager->process(Object(Espo\Custom\Entities\WooCustomer ), 'afterRecordSave...', Array)
        #5 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Hook/GeneralInvoker.php(186): Espo\Modules\Advanced\Hooks\Common\Workflow->afterSave(Object(Espo\Custom\Entities\WooCustom er ), Array, Array)
        #6 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/HookManager.php(119): Espo\Core\Hook\GeneralInvoker->invoke(Object(Espo\Modules\Advanced\Hooks\Commo n\ Workflow), 'afterSave', Object(Espo\Custom\Entities\WooCustomer), Array, Array)
        #7 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Repositories/Database.php(318): Espo\Core\HookManager->process('WooCustomer', 'afterSave', Object(Espo\Custom\Entities\WooCustomer), Array)
        #8 /home/h104essenzial/public_html/crmboxspace/application/Espo/ORM/Repository/RDBRepository.php(163): Espo\Core\Repositories\Database->afterSave(Object(Espo\Custom\Entities\WooCustom er ), Array)
        #9 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Repositories/Database.php(136): Espo\ORM\Repository\RDBRepository->save(Object(Espo\Custom\Entities\WooCustomer), Array)
        #10 /home/h104essenzial/public_html/crmboxspace/application/Espo/ORM/EntityManager.php(247): Espo\Core\Repositories\Database->save(Object(Espo\Custom\Entities\WooCustomer), Array)
        #11 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Record/Service.php(709): Espo\ORM\EntityManager->saveEntity(Object(Espo\Custom\Entities\WooCusto me r), Array)
        #12 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Controllers/RecordBase.php(181): Espo\Core\Record\Service->create(Object(stdClass), Object(Espo\Core\Record\CreateParams))
        #13 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/ControllerActionProcessor.php(87): Espo\Core\Controllers\RecordBase->postActionCreate(Object(Espo\Core\Api\RequestWr ap per), Object(Espo\Core\Api\ResponseWrapper))
        #14 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/ControllerActionHandler.php(69): Espo\Core\Api\ControllerActionProcessor->process('WooCustomer', 'create', Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper))
        #15 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Espo\Core\Api\ControllerActionHandler->handle(Object(Slim\Psr7\Request))
        #16 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/RouteProcessor.php(222): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request))
        #17 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/RouteProcessor.php(149): Espo\Core\Api\RouteProcessor->processControllerAction(Object(Espo\Core\Api\Pr oc essData), Object(Slim\Psr7\Request), Object(Espo\Core\Api\ResponseWrapper))
        #18 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/RouteProcessor.php(127): Espo\Core\Api\RouteProcessor->processAfterAuth(Object(Espo\Core\Api\ProcessDa ta ), Object(Slim\Psr7\Request), Object(Espo\Core\Api\ResponseWrapper))
        #19 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/RouteProcessor.php(79): Espo\Core\Api\RouteProcessor->processInternal(Object(Espo\Core\Api\ProcessDat a) , Object(Slim\Psr7\Request), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper))
        #20 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/Starter.php(109): Espo\Core\Api\RouteProcessor->process(Object(Espo\Core\Api\ProcessData), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response))
        #21 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): Espo\Core\Api\Starter->Espo\Core\Api\{closure}(Object(Slim\Psr7\Reques t) , Object(Slim\Psr7\Response), Array) Unminify assets or how to recreate t...o.min.js file? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array) Unminify assets or how to recreate t...o.min.js file? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle(Object(Slim\Psr7\Request))
        #24 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) Unminify assets or how to recreate t...o.min.js file? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) how to upgrade ? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run(Object(Slim\Psr7\Request)) how to upgrade ? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(45): Slim\Routing\RouteRunner->handle(Object(Slim\Psr7\Request))
        #28 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner))
        #29 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request))
        #30 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Psr7\Request), Object(Psr\Http\Server\RequestHandlerInterface@ano nymous))
        #31 /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) Unminify assets or how to recreate t...o.min.js file? /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) Quotes /home/h104essenzial/public_html/crmboxspace/vendor/slim/slim/Slim/App.php(183): Slim\App->handle(Object(Slim\Psr7\Request)) Quotes /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Api/Starter.php(76): Slim\App->run()
        #35 /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/ApplicationRunners/Api.php(45): Espo\Core\Api\Starter->start() how to upgrade ? /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Application/RunnerRunner.php(84): Espo\Core\ApplicationRunners\Api->run() how to upgrade ? /home/h104essenzial/public_html/crmboxspace/application/Espo/Core/Application.php(78): Espo\Core\Application\RunnerRunner->run('Espo\\Core\\Appli...', NULL) how to upgrade ? /home/h104essenzial/public_html/crmboxspace/public/api/v1/index.php(35): Espo\Core\Application->run('Espo\\Core\\Appli...')
        #39 {main} Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor.​

        Comment

        Working...