Answers.Body: <p>Kinsta hosting caching was the issue. Search Kit worked once they enabled opcache.save_comments in the Nginx server cache</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-04T04:04:37.920Z
Answers.LastActivityDate: 2023-04-04T04:04:37.920Z
Answers.UserDisplayName: LesleyJill
Body: <p>WP 5.7.8 PHP 8.0.26 civi 5.51.1 Search kit 5.51.1</p>
  <p>Any search - I tested with simple contact = type individual, reports no result. Civi screen stays the same ie no error message just no result.</p>
  <p>Unfortunately I can't upgrade due to Kinsta issues (see other thread <a href="https://civicrm.stackexchange.com/questions/43412/servicenotfoundexception-for-spec-gatherer-on-civicrm-5-55-when-hosting-with">ServiceNotFoundException for &quot;spec_gatherer&quot; on CiviCRM 5.55+ when hosting with Kinsta</a> )</p>
  <p>Error 1=</p>
  <pre><code>2023/03/27 05:10:50 [error] 114740#114740: *646 FastCGI sent in stderr: 
  &quot;PHP message: PHP Fatal error: Uncaught TypeError: 
  Civi\Api4\Action\SearchDisplay\Run::processResult(): Argument #1 ($result) 
  must be of type Civi\Api4\Result\SearchDisplayRunResult, 
  Civi\Api4\Generic\Result given, 
  called in /www/invasives_235/public/wp-content/plugins/civicrm/civicrm/ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php on line 114 
  and defined in /www/invasives_235/public/wp-content/plugins/civicrm/civicrm/ext/search_kit/Civi/Api4/Action/SearchDisplay/Run.php:37
  </code></pre>
  <p>Stack trace:</p>
  <pre><code>#0 /www/####/public/wp-content/plugins/civicrm/civicrm/ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php(114): 
  Civi\Api4\Action\SearchDisplay\Run-&gt;processResult(Object(Civi\Api4\Generic\Result))
  #1 /www/####/public/wp-content/plugins/civicrm/civicrm/Civi/Api4/Provider/ActionObjectProvider.php(69): 
  Civi\Api4\Action\SearchDisplay\AbstractRunAction-&gt;_run(Object(Civi\Api4\Generic\Result))
  #2 /www/#####/public/wp-content/plugins/civicrm/civicrm/Civi/API/Ker&quot; while reading response header from upstream, client: 125.168.64.134, server: env-#####-pushciviug.kinsta.cloud, request: &quot;POST /wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fajax%2Fapi4 HTTP/1.1&quot;, upstream: &quot;fastcgi://unix:/var/run/php8.0-fpm-#####.sock:&quot;, host: &quot;env-###-pushciviug.kinsta.cloud:26165&quot;, referrer: &quot;https://env-#####-pushciviug.kinsta.cloud/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fadmin%2Fsearch&quot;
  </code></pre>
  <p>and browser errors are:</p>
  <pre><code>jquery.min.js:4          POST https://env-#####-pushciviug.kinsta.cloud/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm%2Fajax%2Fapi4 500
  send @ jquery.min.js:4
  ajax @ jquery.min.js:4
  n.&lt;computed&gt; @ jquery.min.js:4
  (anonymous) @ crm.ajax.js?r=Pt4f9en_AU:85
  CRM.api4 @ crm.ajax.js?r=Pt4f9en_AU:72
  crmApi4 @ angular-modules.af5fd05bc138b0651c13190765a8f2df.js:17
  runSearch @ angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3909
  (anonymous) @ angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3819
  $eval @ angular.js:19523
  $apply @ angular.js:19622
  (anonymous) @ angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3818
  e @ lodash.min.js:40
  setTimeout (async)
  o @ lodash.min.js:41
  onClickSearchButton @ angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3895
  fn @ VM7696:4
  e @ angular.js:29123
  $eval @ angular.js:19523
  $apply @ angular.js:19622
  (anonymous) @ angular.js:29127
  dispatch @ jquery.min.js:3
  r.handle @ jquery.min.js:3
  angular.js:15697 TypeError: Cannot read properties of undefined (reading 'debug')
      at controller.&lt;anonymous&gt; (angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3163:71)
      at angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3936:22
      at qt (lodash.min.js:9:507)
      at Function.Re (lodash.min.js:37:336)
      at angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3935:13
      at angular.js:18075:37
      at m.$digest (angular.js:19242:15)
      at angular.js:19562:15
      at Yg.completeTask (angular.js:21403:7)
      at angular.js:6879:7 'Possibly unhandled rejection: {}'
  </code></pre>
  
Tags: <searchkit>
Title: Search Kit fatal error
ThreadText: # Search Kit fatal error
  
  (Asked by: username_0 on 2023-03-27)
  
  WP 5.7.8 PHP 8.0.26 civi 5.51.1 Search kit 5.51.1
  Any search - I tested with simple contact = type individual, reports no result. Civi screen stays the same ie no error message just no result.
  Unfortunately I can't upgrade due to Kinsta issues (see other thread ServiceNotFoundException for "spec_gatherer" on CiviCRM 5.55+ when hosting with Kinsta )
  Error 1=
  2023/03/27 05:10:50 [error] 114740#114740: *646 FastCGI sent in stderr: 
  "PHP message: PHP Fatal error: Uncaught TypeError: 
  Civi\Api4\Action\SearchDisplay\Run::processResult(): Argument #1 ($result) 
  must be of type Civi\Api4\Result\SearchDisplayRunResult, 
  Civi\Api4\Generic\Result given, 
  called in /www/invasives_235/public/wp-content/plugins/civicrm/civicrm/ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php on line 114 
  and defined in /www/invasives_235/public/wp-content/plugins/civicrm/civicrm/ext/search_kit/Civi/Api4/Action/SearchDisplay/Run.php:37
  
  Stack trace:
  #0 /www/####/public/wp-content/plugins/civicrm/civicrm/ext/search_kit/Civi/Api4/Action/SearchDisplay/AbstractRunAction.php(114): 
  Civi\Api4\Action\SearchDisplay\Run->processResult(Object(Civi\Api4\Generic\Result))
  #1 /www/####/public/wp-content/plugins/civicrm/civicrm/Civi/Api4/Provider/ActionObjectProvider.php(69): 
  Civi\Api4\Action\SearchDisplay\AbstractRunAction->_run(Object(Civi\Api4\Generic\Result))
  #2 /www/#####/public/wp-content/plugins/civicrm/civicrm/Civi/API/Ker" while reading response header from upstream, client: 125.168.64.134, server: env-#####-pushciviug.kinsta.cloud, request: "POST /wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fajax%2Fapi4 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php8.0-fpm-#####.sock:", host: "env-###-pushciviug.kinsta.cloud:26165", referrer: "https://env-#####-pushciviug.kinsta.cloud/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsearch"
  
  and browser errors are:
  jquery.min.js:4          POST https://env-#####-pushciviug.kinsta.cloud/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fajax%2Fapi4 500
  send @ jquery.min.js:4
  ajax @ jquery.min.js:4
  n. @ jquery.min.js:4
  (anonymous) @ crm.ajax.js?r=Pt4f9en_AU:85
  CRM.api4 @ crm.ajax.js?r=Pt4f9en_AU:72
  crmApi4 @ angular-modules.af5fd05bc138b0651c13190765a8f2df.js:17
  runSearch @ angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3909
  (anonymous) @ angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3819
  $eval @ angular.js:19523
  $apply @ angular.js:19622
  (anonymous) @ angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3818
  e @ lodash.min.js:40
  setTimeout (async)
  o @ lodash.min.js:41
  onClickSearchButton @ angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3895
  fn @ VM7696:4
  e @ angular.js:29123
  $eval @ angular.js:19523
  $apply @ angular.js:19622
  (anonymous) @ angular.js:29127
  dispatch @ jquery.min.js:3
  r.handle @ jquery.min.js:3
  angular.js:15697 TypeError: Cannot read properties of undefined (reading 'debug')
      at controller. (angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3163:71)
      at angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3936:22
      at qt (lodash.min.js:9:507)
      at Function.Re (lodash.min.js:37:336)
      at angular-modules.af5fd05bc138b0651c13190765a8f2df.js:3935:13
      at angular.js:18075:37
      at m.$digest (angular.js:19242:15)
      at angular.js:19562:15
      at Yg.completeTask (angular.js:21403:7)
      at angular.js:6879:7 'Possibly unhandled rejection: {}'
  
  **Tags:** searchkit
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-04-04. Score: 1
  
  Kinsta hosting caching was the issue. Search Kit worked once they enabled opcache.save\_comments in the Nginx server cache
  
  
  ---
  
  