Error occured at first use

Created on 28 October 2023, 8 months ago
Updated 16 November 2023, 8 months ago

Problem/Motivation

when I click on XHProf link (bottom of page) I encountered this error:

The website encountered an unexpected error. Please try again later.
TypeError: Drupal\xhprof\Controller\XHProfController::runAction(): Argument #1 ($run) must be of type Drupal\xhprof\XHProfLib\Run, bool given in Drupal\xhprof\Controller\XHProfController->runAction() (line 99 of modules/contrib/xhprof/src/Controller/XHProfController.php).

Drupal\xhprof\Controller\XHProfController->runAction(, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

drupal : 9.5.11
php : 8.1
nginx : 1.18
I set "http://example.com/sites/files/xhgui" for XHGui Storage URL
I made a dir "xhgui" at files directory and set www-data for its owner:group

๐Ÿ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ทIran sgarsivaz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @sgarsivaz
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada minorOffense Ottawa, Canada

    Well you donโ€™t need the files folder to store runs if youโ€™re using this module. It would ship it into xhgui.

    Also do you have the xhprof php plugin installed and enabled? php -m on the command line should show it if so. Or the output of phpinfo()

  • ๐Ÿ‡ฎ๐Ÿ‡ทIran sgarsivaz

    Yes I installed xhprof php plugin. this is output of php -i | grep xhprof :

    /etc/php/8.1/cli/conf.d/20-xhprof.ini,
    xhprof
    xhprof support => enabled
    xhprof.collect_additional_info => 0 => 0
    xhprof.output_dir => /var/log/php-fpm/xhprof.log => /var/log/php-fpm/xhprof.log
    xhprof.sampling_depth => 0x7fffffff => 0x7fffffff
    xhprof.sampling_interval => 100000 => 100000 

    this error occures when I use xhgui. whithout it, it runs correctly if I don't encounter timeout error with :

    max_input_time = 300 
    memory_limit = 512
Production build 0.69.0 2024