Closed durzel closed 7 years ago
Have tried disabling the whole thing now, and now I'm getting this error in cron:
PHP Fatal error: Uncaught Error: Call to a member function getId() on null in /home/magento/.modman/mc-magento/app/code/community/Ebizmarts/MailChimp/Model/ProcessWebhook.php:120
Stack trace:
#0 /home/magento/.modman/mc-magento/app/code/community/Ebizmarts/MailChimp/Model/ProcessWebhook.php(44): Ebizmarts_MailChimp_Model_ProcessWebhook->_subscribe(Array)
#1 /home/magento/.modman/mc-magento/app/code/community/Ebizmarts/MailChimp/Model/Cron.php(41): Ebizmarts_MailChimp_Model_ProcessWebhook->processWebhookData()
#2 /home/magento/.modman/Aoe_Scheduler/app/code/community/Aoe/Scheduler/Model/Schedule.php(217): Ebizmarts_MailChimp_Model_Cron->processWebhookData(Object(Aoe_Scheduler_Model_Schedule))
#3 /home/magento/.modman/Aoe_Scheduler/app/code/community/Aoe/Scheduler/Model/Schedule.php(623): Aoe_Scheduler_Model_Schedule->runNow(true)
#4 /home/magento/.modman/Aoe_Scheduler/app/code/community/Aoe/Scheduler/Model/Observer.php(39): Aoe_Scheduler_Model_Schedule->process()
#5 /home/magento/public_html/app/code/core/Mage/Core/Model/App.p in /home/magento/.modman/mc-magento/app/code/community/Ebizmarts/MailChimp/Model/ProcessWebhook.php on line 120
Seems like the whole thing is falling apart.
Magento CE 1.9.3.3 M4M 1.1.7
It shouldn't be this difficult to use, should it?
Looks like this is possibly an infinite loop somewhere in loadListSubscriber, certainly the MySQL process list shows a seemingly never ending series of queries that look like this:
SELECT
newsletter_subscriber.* FROM
newsletter_subscriberWHERE (subscriber_email=:subscriber_email)
Will try and do some more debugging..
Ok, further debugging seems to show that even if you disable the extension completely if there are pending requests in the mailchimp_webhook_request then they will be processed by mailchimp_process_webhook_data cron, even if the data in them is no longer valid (e.g. subscribers that don't exist), and even if the extension is disabled at every scope.
As a consequence loadListSubscriber can return a NULL object, which is not sanity checked anywhere that it is called, therefore bombing out on getId() pretty much everywhere. Haven't delved deep yet to see how this could be reconciled, will keep looking, but I've fixed my cron errors for now at least.
@durzel this problem (checking for null subscriber) is already pushed to develop. we are releasing a new version next week.
Have disabled Ecommerce on our Magento install after it was taking forever and a day to sync orders (5800 orders has taken nearly 4 days), and was producing regular cron errors (#312)
Now, every time mailchimp_process_webhook_data runs it produces the following errors:
AOE_Scheduler shows the task is endlessly "Running"...
This has only happened since disabling Ecommerce, previously the webhook process has been running without any issues.