Openprovider-WHMCS-domains
Openprovider-WHMCS-domains copied to clipboard
[BUG] Openprovider API downtime causes web server to hang and breaks entire WHMCS installation
Describe the bug
Enabling the latest version of the module (as of 12/12/2022) on a WHMCS 8.6.1 causes the entire WHMCS to stop working if the Openprovider API is experiencing downtime. Pages keep loading indefinitely, both on the frontend and the admin side. Other PHP scripts not affiliated with WHMCS load fine. Simply moving the openprovider
folder out of modules/registrars
, thereby disabling it, fixes the problem immediately.
To Reproduce Steps to reproduce the behavior:
- Move the
/modules/registrars/openprovider
folder to the/modules/registrars
directory of WHMCS - Reload the page
- Page does not load
- Move the openprovider directory out of WHMCS
- Refresh the page
- Page does load
Expected behavior I expect the OpenProvider module not to break WHMCS
Screenshots
Server info:
- Distro: Ubuntu 22.04
- PHP: 7.4 FPM
- Web server: Apache, tested with both MPM worker and prefork
Additional context This is pretty critical, since I have now had to disable the module to keep WHMCS working, which means customers are not able to purchase, manage, or renew domains.
Good to hear I'm not the only one. Seems to coincide with the planned API maintenance from previous night.
It's pretty insane that the Openprovider API going down completely kills the entire WHMCS installation, especially since these downtimes are not uncommon. The error handling for failed network requests should definitely be improved in the module.
Our WHMCS installations didn't go down but then I've lost track of what versions of the OpenProvider module we're running on. I tend to not touch them if they're working OK. I know in the past the OpenProvider account balance widget on the admin home page used to cause the page not to load if the credentials were incorrect, so it wouldn't surprise me if other errors aren't being handled gracefully.
Our WHMCS installations didn't go down but then I've lost track of what versions of the OpenProvider module we're running on. I tend to not touch them if they're working OK. I know in the past the OpenProvider account balance widget on the admin home page used to cause the page not to load if the credentials were incorrect, so it wouldn't surprise me if other errors aren't being handled gracefully.
The admin panel widget increases the page load time from 2 seconds to over 10 seconds, even when it is working, which is incredibly annoying in its own right.
Yeah I've never figured out how to disable it
Just found out that 1 of our installations did go down; it was running v5.4-REST whereas the others are on v5.6-REST. So perhaps this has been fixed in more recent releases?
I use 5.6.3. The beta for PHP 8.1. I've yet to wait for a PHP 8.1 fix for 1 module, so it's still running PHP 7.4. Will try downgrading to 5.6.2 Official. Only thing I don't understand is: Is the maintenance still busy or did something change on the API side?
Well it all seems to be working for me, although no formal announcement on twitter.
Version 5.6.2 is working for me. So a 5.6.3 beta really is a beta ;). But that does not solve the problem, as PHP 8.1 is still on the pipeline of being activated.
We were on the latest version as of yesterday, I even updated it again just in case to see if it would fix it. No change. But it probably does not happen right now because the API is back up.
5.6.3 is indeed working again. Still needs fixing though. 1 module should not brick customers whole installations...
I haven't really delved into the code but to me, it makes sense to pass all OpenProvider API calls to a function that gracefully handles any errors.
FYI, if you want to get rid of the balance widit altogether, you can just delete:
./modules/registrars/openprovider/Controllers/Hooks/Widgets/BalanceWidget.php
Edit: And also:
./modules/registrars/openprovider/Controllers/Hooks/AdminWidgetController.php
Hi @Lippur @JacketShirtsMan @willdashwood,
We have fixed the balance widget issues in the latest release - version 5.8.0.
We tried to test the reported problem in latest version by making API non-resolvable (by setting non-resolvable address for API base URL in hosts file locally) and we were unable to reproduce the behavior. So I would suggest you to upgrade to the latest version of the module.
If you experience any such issues with latest version of the module, please contact our support team with following details so that we can investigate it:
- Reseller ID
- module logs
- WHMCS, Openprovider module and PHP version details.
Thank you!