Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guzzle/Http calls fail in WHMCS #5

Closed
ju5t opened this issue Jan 28, 2019 · 4 comments
Closed

Guzzle/Http calls fail in WHMCS #5

ju5t opened this issue Jan 28, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@ju5t
Copy link
Contributor

ju5t commented Jan 28, 2019

picqer/moneybird-php-client requires Guzzle 6 or higher. WHMCS includes version 5. As WHMCS includes third party modules in its update process it fails because it suddenly uses Guzzle version 6 instead of 5. Some of the parameters WHMCS passes to Guzzle are invalid in version 6.

Unfortunately, this breaks the update mechanism in WHMCS.

@ju5t ju5t added the bug Something isn't working label Jan 28, 2019
@vertizio
Copy link

Confirmed. Not able to use the addon.

Getting this error:

[WHMCS Application] ERROR: GuzzleHttp\Exception\ClientException: Client error: GET https://moneybird.com/api/v2/999999999999999999/financial_mutations/synchronization.json?filter=period%3A201906..201907%2Cmutation_type%3Adebit resulted in a 401 Unauthorized response: {"error":"No access to bank"} in /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113 Stack trace: #0 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response)) #2 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array) #3 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}() #4 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Promise\TaskQueue->run(true) #5 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn() #6 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending() #7 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList() #8 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() #9 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/guzzle/src/Client.php(106): GuzzleHttp\Promise\Promise->wait() #10 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/picqer/moneybird-php-client/src/Picqer/Financials/Moneybird/Connection.php(217): GuzzleHttp\Client->send(Object(GuzzleHttp\Psr7\Request)) #11 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/picqer/moneybird-php-client/src/Picqer/Financials/Moneybird/Actions/Synchronizable.php(32): Picqer\Financials\Moneybird\Connection->get('financial_mutat...', Array) #12 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/cron.php(119): Picqer\Financials\Moneybird\Entities\FinancialMutation->listVersions(Array) #13 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/cron.php(214): processFinancialMutations(Array, true) #14 {main} Next Picqer\Financials\Moneybird\Exceptions\ApiException: Error 401: {"error":"No access to bank"} in /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/picqer/moneybird-php-client/src/Picqer/Financials/Moneybird/Connection.php:496 Stack trace: #0 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/picqer/moneybird-php-client/src/Picqer/Financials/Moneybird/Connection.php(229): Picqer\Financials\Moneybird\Connection->parseExceptionForErrorMessages(Object(GuzzleHttp\Exception\ClientException)) #1 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/picqer/moneybird-php-client/src/Picqer/Financials/Moneybird/Actions/Synchronizable.php(32): Picqer\Financials\Moneybird\Connection->get('financial_mutat...', Array) #2 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/cron.php(119): Picqer\Financials\Moneybird\Entities\FinancialMutation->listVersions(Array) #3 /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/cron.php(214): processFinancialMutations(Array, true) #4 {main} {"exception":"[object] (Picqer\Financials\Moneybird\Exceptions\ApiException(code: 401): Error 401: {"error":"No access to bank"} at /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/picqer/moneybird-php-client/src/Picqer/Financials/Moneybird/Connection.php:496, GuzzleHttp\Exception\ClientException(code: 401): Client error: GET https://moneybird.com/api/v2/999999999999999999/financial_mutations/synchronization.json?filter=period%3A201906..201907%2Cmutation_type%3Adebit resulted in a 401 Unauthorized response:\n{"error":"No access to bank"}\n at /var/www/vhosts/localhost/whmcs.localhost/modules/addons/moneybird/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113)"} []

@ju5t
Copy link
Contributor Author

ju5t commented Jul 21, 2019

What error are you confirming? The error you have pasted here seems to be raised because you've used incorrect credentials. This is most likely a misconfiguration in your installation.

The error you are getting is:

Error 401: {"error":"No access to bank"}

To be clear, the specific bug this issue addresses only affects the internal update mechanism in WHMCS, all other functionality is unaffected.

@vertizio
Copy link

vertizio commented Jul 21, 2019 via email

@DaanVri DaanVri mentioned this issue Aug 16, 2019
Closed
@ju5t
Copy link
Contributor Author

ju5t commented Dec 8, 2020

The latest version of WHMCS should resolve this. Closing this issue. Please open a new issue if you see this on the latest version of WHMCS, in that case, there might be something else going on.

@ju5t ju5t closed this as completed Dec 8, 2020
@ghost ghost mentioned this issue Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants