gogetssl / whmcs-addon

GOGETSSL WHMCS SSL Addon
MIT License
38 stars 22 forks source link

WHMCS cron job failed due to errors thrown by the module #238

Closed DennisSkov closed 1 year ago

DennisSkov commented 1 year ago

Describe the bug WHMCS cron job throws an error and stops due to an error in the module.

[04-Apr-2023 02:02:54 Europe/Copenhagen] [WHMCS Application] ERROR: Error: Attempt to modify property "fields" on null in /home/username/public_html/client/modules/addons/SSLCENTERWHMCS/eServices/provisioning/Renew.php:311 Stack trace: #0 /home/username/public_html/client/modules/addons/SSLCENTERWHMCS/eServices/provisioning/Renew.php(131): MGModule\SSLCENTERWHMCS\eServices\provisioning\Renew->getOrderParams() #1 /home/username/public_html/client/modules/addons/SSLCENTERWHMCS/eServices/provisioning/Renew.php(38): MGModule\SSLCENTERWHMCS\eServices\provisioning\Renew->renewCertificate() #2 /home/username/public_html/client/modules/servers/SSLCENTERWHMCS/SSLCENTERWHMCS.php(95): MGModule\SSLCENTERWHMCS\eServices\provisioning\Renew->run() #3 [internal function]: SSLCENTERWHMCS_Renew(Array) #4 /home/username/public_html/client/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): call_user_func('SSLCENTERWHMCS_...', Array) #5 /home/username/public_html/client/vendor/whmcs/whmcs-foundation/lib/Module/Server.php(0): WHMCS\Module\AbstractModule->call('Renew', Array) #6 /home/username/public_html/client/includes/modulefunctions.php(0): WHMCS\Module\Server->call('Renew', Array) #7 /home/username/public_html/client/includes/modulefunctions.php(0): ModuleCallFunction('Renew', 4753, Array, 0) #8 /home/username/public_html/client/includes/invoicefunctions.php(0): ServerRenew(4753) #9 /home/username/public_html/client/includes/invoicefunctions.php(0): makeHostingPayment(4753, Object(WHMCS\Billing\Invoice)) #10 /home/username/public_html/client/vendor/whmcs/whmcs-foundation/lib/Billing/Invoice.php(0): processPaidInvoice(589077, true, Object(WHMCS\Carbon)) #11 /home/username/public_html/client/includes/ccfunctions.php(0): WHMCS\Billing\Invoice->addPayment('90.00', 'txn_3MsxKqF9KOd...', '3.06', 'stripe', true) #12 /home/username/public_html/client/includes/ccfunctions.php(0): captureCCPayment(589077) #13 /home/username/public_html/client/vendor/whmcs/whmcs-foundation/lib/Cron/Task/ProcessCreditCardPayments.php(0): ccProcessing(Object(WHMCS\Cron\Task\ProcessCreditCardPayments)) #14 [internal function]: WHMCS\Cron\Task\ProcessCreditCardPayments->__invoke() #15 /home/username/public_html/client/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): call_user_func_array(Object(WHMCS\Cron\Task\ProcessCreditCardPayments), Array) #16 /home/username/public_html/client/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHMCS\Scheduling\Task\AbstractTask->execute() #17 /home/username/public_html/client/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Scheduling\Task\AbstractTask->run() #18 /home/username/public_html/client/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Cron\Console\Command\AbstractCronCommand->executeCollection(Object(WHMCS\Scheduling\Task\Collection)) #19 /home/username/public_html/client/vendor/symfony/console/Command/Command.php(298): WHMCS\Cron\Console\Command\AbstractCronCommand->execute(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #20 /home/username/public_html/client/vendor/symfony/console/Application.php(1028): Symfony\Component\Console\Command\Command->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #21 /home/username/public_html/client/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand(Object(WHMCS\Cron\Console\Command\SkipCommand), Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #22 /home/username/public_html/client/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #23 /home/username/whmcs_files/crons/cron.php(0): Symfony\Component\Console\Application->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #24 {main} {"exception":"[object] (Error(code: 0): Attempt to modify property \"fields\" on null at /home/username/public_html/client/modules/addons/SSLCENTERWHMCS/eServices/provisioning/Renew.php:311)"} []

To Reproduce No idea. Seems to happen randomly during the daily WHMCS cron when WHMCS is processing payments.

Expected behavior WHMCS' cron job should be able to finish, despite any errors in the module.

vlad-evg commented 1 year ago

Dear Dennis,

Issue fixed https://github.com/gogetssl/whmcs-addon/releases/tag/v2.8.8