No announcement yet.

ERROR: Slim Application Error Type: TypeError

  • Filter
  • Time
  • Show
Clear All
new posts

  • ERROR: Slim Application Error Type: TypeError

    Hi Folks,

    user of mine get this error, when they save a created meeting. i guess it is (maybe) a problem with assigned rights in the users roles, but i dont find the reason.

    calendar & meetings are "active" and the right for meetings are:
    create - yes
    read - team
    edit - own
    delete - no
    activities - team

    Any ideas outta there?

    Best regards

    ​[2023-04-05 18:06:10] ERROR: Slim Application Error Type: TypeError Code: 0 Message: Espo\Repositories\User::checkBelongsToAnyOfTeams(): Argument #2 ($teamIds) must be of type array, null given, called in /var/www/html/application/Espo/Core/Acl/DefaultAssignmentChecker.php on line 165 File: /var/www/html/application/Espo/Repositories/User.php Line: 174 Trace: #0 /var/www/html/application/Espo/Core/Acl/DefaultAssignmentChecker.php(165): Espo\Repositories\User->checkBelongsToAnyOfTeams('6245a501895f8fa...', NULL) #1 /var/www/html/application/Espo/Core/Acl/DefaultAssignmentChecker.php(80): Espo\Core\Acl\DefaultAssignmentChecker->isPermittedAssignedUser(Object(Espo\Entities\User), Object(Espo\Modules\Crm\Entities\Meeting)) #2 /var/www/html/application/Espo/Core/Acl/AssignmentChecker/AssignmentCheckerManager.php(58): Espo\Core\Acl\DefaultAssignmentChecker->check(Object(Espo\Entities\User), Object(Espo\Modules\Crm\Entities\Meeting)) #3 /var/www/html/application/Espo/Core/Record/Service.php(370): Espo\Core\Acl\AssignmentChecker\AssignmentCheckerManager->check(Object(Espo\Entities\User), Object(Espo\Modules\Crm\Entities\Meeting)) #4 /var/www/html/application/Espo/Modules/Crm/Services/Meeting.php(67): Espo\Core\Record\Service->checkAssignment(Object(Espo\Modules\Crm\Entities\Meeting)) #5 /var/www/html/application/Espo/Core/Record/Service.php(359): Espo\Modules\Crm\Services\Meeting->checkAssignment(Object(Espo\Modules\Crm\Entities\Meeting)) #6 /var/www/html/application/Espo/Core/Record/Service.php(635): Espo\Core\Record\Service->processAssignmentCheck(Object(Espo\Modules\Crm\Entities\Meeting)) #7 /var/www/html/application/Espo/Core/Controllers/RecordBase.php(191): Espo\Core\Record\Service->create(Object(stdClass), Object(Espo\Core\Record\CreateParams)) #8 /var/www/html/application/Espo/Core/Api/ActionProcessor.php(88): Espo\Core\Controllers\RecordBase->postActionCreate(Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #9 /var/www/html/application/Espo/Core/Api/RequestProcessor.php(124): Espo\Core\Api\ActionProcessor->process('Meeting', 'create', Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #10 /var/www/html/application/Espo/Core/Api/RequestProcessor.php(95): Espo\Core\Api\RequestProcessor->proceed(Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #11 /var/www/html/application/Espo/Core/Api/RequestProcessor.php(62): Espo\Core\Api\RequestProcessor->processInternal(Object(Espo\Core\Api\Route), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #12 /var/www/html/application/Espo/Core/Api/Starter.php(86): Espo\Core\Api\RequestProcessor->process(Object(Espo\Core\Api\Route), Object(Espo\Core\Api\RequestWrapper), Object(Espo\Core\Api\ResponseWrapper)) #13 /var/www/html/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(43): Espo\Core\Api\Starter->Espo\Core\Api\{closure}(Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array) #14 /var/www/html/vendor/slim/slim/Slim/Routing/Route.php(384): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Psr7\Request), Object(Slim\Psr7\Response), Array) #15 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\Routing\Route->handle(Object(Slim\Psr7\Request)) #16 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #17 /var/www/html/vendor/slim/slim/Slim/Routing/Route.php(341): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #18 /var/www/html/vendor/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\Routing\Route->run(Object(Slim\Psr7\Request)) #19 /var/www/html/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): Slim\Routing\RouteRunner->handle(Object(Slim\Psr7\Request)) #20 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process(Object(Slim\Psr7\Request), Object(Slim\Routing\RouteRunner)) #21 /var/www/html/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) #22 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Psr7\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous)) #23 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Psr7\Request)) #24 /var/www/html/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #25 /var/www/html/vendor/slim/slim/Slim/App.php(199): Slim\App->handle(Object(Slim\Psr7\Request)) #26 /var/www/html/application/Espo/Core/Api/Starter.php(62): Slim\App->run() #27 /var/www/html/application/Espo/Core/ApplicationRunners/Api.php(45): Espo\Core\Api\Starter->start() #28 /var/www/html/application/Espo/Core/Application/RunnerRunner.php(87): Espo\Core\ApplicationRunners\Api->run() #29 /var/www... [] []

  • #2
    Hi mfr,

    Can you please tell me which version of EspoCRM you are using?

    Also, please, take screenshots of the user, in which you can see what roles and teams are assigned to him, a screenshot of the team itself and a screenshot of the error that you get in the browser window? All this information is needed for a deeper analysis.​


    • #3
      Hi @lazovic,

      Thank you for your support. Meanwhile, I have found the cause or the circumstance why this error is happening:

      It only occurs when the admin logs in as a user (the new function in the last release) and wants to set an appointment.

      And since I had to reassign all roles and teams after a restructuring, I used the possibility that the admin can log in as a user to check the new rights. And that's exactly when the "Error 500" occurs, which is also displayed to the user.

      The message "
      Argument #2 ($teamIds) must be of type array, null given"
      can probably be explained by the fact that the admin is not in any team.

      I think you can reproduce it exactly like this.

      To your questions:
      I used the last release, ie 7.3.4.

      If you still need further points (screenshots, etc.), I will be happy to provide them to you.

      Best regards​


      • #4

        Let me describe the points on which I am trying to reproduce this issue, and you will tell me if I am moving correctly:

        Click image for larger version

Name:	image.png
Views:	255
Size:	34.8 KB
ID:	90390
        Regular User:

        Click image for larger version

Name:	image.png
Views:	213
Size:	39.0 KB
ID:	90391

        The Test Forum role is assigned to the Test Team team. The User Access as a result displays the following (Calendar is enabled):

        Click image for larger version

Name:	image.png
Views:	184
Size:	5.1 KB
ID:	90392
        Click image for larger version

Name:	image.png
Views:	175
Size:	3.0 KB
ID:	90393
        Click image for larger version

Name:	image.png
Views:	180
Size:	3.2 KB
ID:	90394

        As a result, logging in under this user, I get only the following error:

        Error 403: Access denied
        Assignment failure: assigned user or team not allowed.

        But it's just about my incorrect role settings.

        Please tell me what needs to be corrected so that I can reproduce the issue.​​


        • #5
          Once again... i had to delete the message because of display errors.

          Here are my settings:
          Admin Regular User
          Click image for larger version  Name:	Screenshot_20230406_122548.png Views:	0 Size:	51.1 KB ID:	90410 Click image for larger version  Name:	Screenshot_20230406_122646.png Views:	0 Size:	61.2 KB ID:	90411
          Assigned roles and rights:
          Click image for larger version

Name:	Screenshot_20230406_122749.png
Views:	217
Size:	3.5 KB
ID:	90407
          Click image for larger version

Name:	Screenshot_20230406_122814.png
Views:	196
Size:	5.7 KB
ID:	90408
          Click image for larger version

Name:	Screenshot_20230406_122725.png
Views:	205
Size:	7.5 KB
ID:	90409
          to be continued...
          Attached Files


          • #6
            Admin login as regular user:
            Click image for larger version

Name:	Screenshot_20230406_122900.png
Views:	201
Size:	19.0 KB
ID:	90417 Click image for larger version

Name:	Screenshot_20230406_123001.png
Views:	185
Size:	39.3 KB
ID:	90419

            And finaly:

            Click image for larger version

Name:	Screenshot_20230406_123041.png
Views:	183
Size:	35.4 KB
ID:	90418


            • #7

              Unfortunately, I can't reproduce your error further.

              Unlikely, but it could be that I'm testing this on EspoCRM v7.4 and you have version 7.3.4. Try updating to the latest version (it came out a couple of hours ago) and try creating the meeting again.​


              • #8

                Thank you, I'll try it.