Jump to content

Guzzle issue


Recommended Posts

I've just upgraded one of my modules, which uses v6 of Guzzler, but the core of WHMCS uses v5 of Guzzler, this has now caused the index.php page of the Dashboard to generate a Ooops message.  Anyone got any ideas on how to fix it?

21-Jul-2020 20:27:05 Europe/London] [WHMCS Application] ERROR: TypeError: Argument 3 passed to GuzzleHttp\Client::request() must be of the type array, string given, called in modules/addons/xero/vendor/guzzlehttp/guzzle/src/Client.php on line 95 and defined in modules/addons/xero/vendor/guzzlehttp/guzzle/src/Client.php:179

 

Link to comment
Share on other sites

  • 2 months later...

Some modules that implement or use guzzle on the main repository or a dependency (like yours, xero addon module implements guzzle on your vendor dir) get this problem on WHMCS. I don't know about it other than that some modules suffer from this problem, and it appears to be due to a global guzzle rewrite. I already had some problems with this when I was developing modules for WHMCS that used guzzle in some way, whether I was explicitly using it or as a third-party repository.

Link to comment
Share on other sites

Justin updating. I have included a package on the module that I'm developing that uses Guzzle and even not used on any part of the module, just the presence of the library causes to my admin stop working.

 

TypeError: Argument 3 passed to GuzzleHttp\Client::request() must be of the type array, string given, called in /home/whmcsdev/public_html/modules/addons/xxx/lib/vendor/guzzlehttp/guzzle/src/Client.php on line 91 and defined in /home/whmcsdev/public_html/modules/addons/xxx/lib/vendor/guzzlehttp/guzzle/src/Client.php:183
Stack trace:
#0 /home/whmcsdev/public_html/modules/addons/xxx/lib/vendor/guzzlehttp/guzzle/src/Client.php(91): GuzzleHttp\Client->request('createRequest', 'GET', 'https://whmcs-d...')
#1 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/View/Admin/HealthCheck/HealthCheckRepository.php(0): GuzzleHttp\Client->__call('createRequest', Array)
#2 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/View/Admin/HealthCheck/HealthCheckRepository.php(0): WHMCS\View\Admin\HealthCheck\HealthCheckRepository->checkForSensitiveDirectoryRemoteAccess()
#3 /home/whmcsdev/public_html/includes/api/gethealthstatus.php(0): WHMCS\View\Admin\HealthCheck\HealthCheckRepository->nonKeyChecks()
#4 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Api/V1/Api.php(0): unknown()
#5 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Api/V1/Api.php(0): WHMCS\Api\V1\Api->executeApiCall()
#6 /home/whmcsdev/public_html/includes/functions.php(0): WHMCS\Api\V1\Api->call()
#7 /home/whmcsdev/public_html/modules/widgets/Health.php(23): localAPI('GetHealthStatus', Array)
#8 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Module/AbstractWidget.php(0): WHMCS\Module\Widget\Health->getData()
#9 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Module/AbstractWidget.php(0): WHMCS\Module\AbstractWidget->fetchData(false)
#10 /home/whmcsdev/public_html/templates_c/25cb0aaeb3ed32526b749ca08bf47c3cd0d09b9e_0.file.homepage.tpl.php(152): WHMCS\Module\AbstractWidget->render()
#11 /home/whmcsdev/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5f6e306795b8d9_52754271(Object(Smarty_Internal_Template))
#12 /home/whmcsdev/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#13 /home/whmcsdev/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#14 /home/whmcsdev/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 0)
#15 /home/whmcsdev/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(116): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 0)
#16 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Smarty.php(0): Smarty_Internal_TemplateBase->fetch('blend/homepage....', NULL, NULL, NULL, false, true, false)
#17 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Admin.php(0): WHMCS\Smarty->fetch('blend/homepage....')
#18 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Admin.php(0): WHMCS\Admin->output()
#19 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Admin/Controller/HomepageController.php(0): WHMCS\Admin->display()
#20 [internal function]: WHMCS\Admin\Controller\HomepageController->index(Object(WHMCS\Http\Message\ServerRequest))
#21 /home/whmcsdev/public_html/vendor/middlewares/utils/src/CallableHandler.php(26): call_user_func_array(Array, Array)
#22 /home/whmcsdev/public_html/vendor/middlewares/fast-route/src/FastRoute.php(96): Middlewares\Utils\CallableHandler::execute(Array, Array)
#23 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/HandleProcessor.php(0): Middlewares\FastRoute->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#24 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\HandleProcessor->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#25 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\HandleProcessor->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#26 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#27 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#28 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#29 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Admin\ApplicationSupport\Route\Middleware\Assent->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#30 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#31 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#32 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#33 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Security/Middleware/Authorization.php(0): WHMCS\Security\Middleware\Authorization->delegateProcess(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#34 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/AbstractProxyMiddleware.php(0): WHMCS\Security\Middleware\Authorization->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#35 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\AbstractProxyMiddleware->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#36 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\AbstractProxyMiddleware->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#37 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#38 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#39 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#40 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/AbstractProxyMiddleware.php(0): WHMCS\Admin\ApplicationSupport\Route\Middleware\Authentication->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#41 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\AbstractProxyMiddleware->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#42 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\AbstractProxyMiddleware->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#43 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#44 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#45 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#46 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Admin\ApplicationSupport\Route\Middleware\DirectoryValidation->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#47 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#48 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#49 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/BackendPsr7Response.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#50 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/BackendPsr7Response.php(0): WHMCS\Route\Middleware\BackendPsr7Response->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#51 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\BackendPsr7Response->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#52 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#53 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#54 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#55 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/BackendDispatch.php(0): Middlewares\Utils\Dispatcher->dispatch(Object(WHMCS\Http\Message\ServerRequest))
#56 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\BackendDispatch->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#57 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\BackendDispatch->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#58 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#59 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#60 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutePathMatch.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#61 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutePathMatch->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#62 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutePathMatch->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#63 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#64 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#65 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/WhitelistFilter.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#66 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/DelegatingMiddlewareTrait.php(0): WHMCS\Route\Middleware\WhitelistFilter->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#67 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\WhitelistFilter->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#68 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#69 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#70 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableClientModuleRequest.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#71 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableClientModuleRequest->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#72 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableClientModuleRequest->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#73 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#74 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#75 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableAdminRequestUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#76 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableAdminRequestUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#77 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableAdminRequestUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#78 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#79 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#80 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#81 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#82 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#83 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#84 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#85 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/RoutableRequestQueryUri.php(0): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#86 /home/whmcsdev/public_html/vendor/whmcs/whmcs-foundation/lib/Route/Middleware/Strategy/AssumingMiddlewareTrait.php(0): WHMCS\Route\Middleware\RoutableRequestQueryUri->_process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#87 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(76): WHMCS\Route\Middleware\RoutableRequestQueryUri->process(Object(WHMCS\Http\Message\ServerRequest), Object(Middlewares\Utils\Delegate))
#88 [internal function]: Middlewares\Utils\Dispatcher->Middlewares\Utils\{closure}(Object(WHMCS\Http\Message\ServerRequest))
#89 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Delegate.php(31): call_user_func(Object(Closure), Object(WHMCS\Http\Message\ServerRequest))
#90 /home/whmcsdev/public_html/vendor/middlewares/utils/src/Dispatcher.php(56): Middlewares\Utils\Delegate->process(Object(WHMCS\Http\Message\ServerRequest))
#91 /home/whmcsdev/public_html/admin/index.php(0): Middlewares\Utils\Dispatcher->dispatch(Object(WHMCS\Http\Message\ServerRequest))
#92 {main}

 

Screenshot of Oops!.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated