What's New Digest

What's New Digest 5.0.6

No permission to download
NOTICE TO ALL USERS OF THIS ADDON

Please disable the addon or put it into test mode immediately until I have identified the cause of people receiving multiple emails.

1600152885383.png

There's obviously a code path I haven't tested yet.

I will do more testing until I can identify the issue and issue a fix.

I do apologise for the inconvenience!
 
V2.2.0 beta 6

Just this second put it into test mode

Just installed monolog just waiting on an email which could be delayed will the amount of emails been sent out, I will message you the email now.

Which version of the addon?
 
V5.0.2 but was happening also with v5.0.1

Thanks - yes, the 5.0.2 fix would be unrelated to the issues you're seeing.

Once you've got some information to send me - please send it through via PM (or PM me for a contact email if you'd prefer to email me).

In the meantime, I'll do a deep dive into the code logic to see if I can identify where things are going wrong.
 
NOTICE TO ALL USERS OF THIS ADDON

Please disable the addon or put it into test mode immediately until I have identified the cause of people receiving multiple emails.

View attachment 235039

There's obviously a code path I haven't tested yet.

I will do more testing until I can identify the issue and issue a fix.

I do apologise for the inconvenience!
Fyi, it is not sending multiple emails to my users.
 
Wonder if it sends multiple emails also in test mode. I just tested this and it is sending as it should also in test mode.
 
I am currently on version 5.0.2 with the sparkpost adapter 1.0. I updated the software throughout the day as updates came out. I don't have the specific timing.
It's a really weird one worst part I didn't get any errors so I was unable to track it down.

I my self haven't received any more emails from this but only time will tell :LOL:
Funnily enough - that makes things worse! If it was consistent, then it would be easier to find the error :oops: :unsure:
 
It's a really weird one worst part I didn't get any errors so I was unable to track it down.

I suspect there is a logic error somewhere - meaning that it's a fault in the way I've programmed the code - for example, I'm not stopping things when they should, or looping too many times or something, hence the extra emails being sent.

If there was broken code that throws an error, I would most likely have found it and fixed it already.

So I don't think the code is broken - just wrong.

FYI - I'm still in the process of writing unit tests to try and identify the source of the issue.
 
Received the following this morning:
Server error log
  • SparkPost\SparkPostException: Job Hampel\SparkPostMail:MessageEvent: {"errors": [ {"message": "Could not proceed (500 error)"} ] }
  • src/addons/Hampel/SparkPostMail/vendor/sparkpost/sparkpost/lib/SparkPost/SparkPostPromise.php:77
  • Generated by: Unknown account
  • Sep 17, 2020 at 7:22 AM

Stack trace​

#0 src/addons/Hampel/SparkPostMail/SubContainer/SparkPost.php(61): SparkPost\SparkPostPromise->wait()
#1 src/addons/Hampel/SparkPostMail/Job/MessageEvent.php(41): Hampel\SparkPostMail\SubContainer\SparkPost->getMessageEvents(1, 1000, Array, 1600350709, 1600352534)
#2 src/XF/Job/Manager.php(253): Hampel\SparkPostMail\Job\MessageEvent->run(G)
#3 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#4 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#5 job.php(42): XF\Job\Manager->runQueue(false, 8)
#6 {main}

-------------

Previous GuzzleHttp\Exception\ServerException: Server error: GET https://api.sparkpost.com/api/v1/events/message?page=1&per_page=1000&events=bounce,policy_rejection,out_of_band,generation_rejection,spam_complaint,list_unsubscribe,link_unsubscribe&from=2020-09-17T13%3A51&to=2020-09-17T14%3A22 resulted in a 500 Internal Server Error response:
{"errors": [ {"message": "Could not proceed (500 error)"} ] }

- src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
#0 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), Array)
#3 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(118): GuzzleHttp\Promise\TaskQueue->run()
#5 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(145): GuzzleHttp\Handler\CurlMultiHandler->tick()
#6 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
#7 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn()
#8 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(267): GuzzleHttp\Promise\Promise->waitIfPending()
#9 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(225): GuzzleHttp\Promise\Promise->invokeWaitList()
#10 src/addons/Hampel/SparkPostMail/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#11 src/addons/Hampel/SparkPostMail/vendor/php-http/guzzle6-adapter/src/Promise.php(95): GuzzleHttp\Promise\Promise->wait(false)
#12 src/addons/Hampel/SparkPostMail/vendor/sparkpost/sparkpost/lib/SparkPost/SparkPostPromise.php(73): Http\Adapter\Guzzle6\Promise->wait(true)
#13 src/addons/Hampel/SparkPostMail/SubContainer/SparkPost.php(61): SparkPost\SparkPostPromise->wait()
#14 src/addons/Hampel/SparkPostMail/Job/MessageEvent.php(41): Hampel\SparkPostMail\SubContainer\SparkPost->getMessageEvents(1, 1000, Array, 1600350709, 1600352534)
#15 src/XF/Job/Manager.php(253): Hampel\SparkPostMail\Job\MessageEvent->run(G)
#16 src/XF/Job/Manager.php(195): XF\Job\Manager->runJobInternal(Array, G)
#17 src/XF/Job/Manager.php(79): XF\Job\Manager->runJobEntry(Array, G)
#18 job.php(42): XF\Job\Manager->runQueue(false, 8)
#19 {main}

Request state​

array(4) {
["url"] => string(18) "/community/job.php"
["referrer"] => string(93) "https://www.jdelist.com/community/threads/cost-per-unit-used-to-calculate-cost-of-sales.2813/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Received the following this morning:
Server error log
  • SparkPost\SparkPostException: Job Hampel\SparkPostMail:MessageEvent: {"errors": [ {"message": "Could not proceed (500 error)"} ] }
  • src/addons/Hampel/SparkPostMail/vendor/sparkpost/sparkpost/lib/SparkPost/SparkPostPromise.php:77
  • Generated by: Unknown account
  • Sep 17, 2020 at 7:22 AM

That's a temporary SparkPost problem - I got the same thing as well and have since received a few alerts from SparkPost notifying us about degraded performance of their API. It will resolve itself - there's no further action you need to take.

Anytime you get a 500 error from SparkPost - it's just a temporary problem with the service.
 
Sim updated What's New Digest with a new update entry:

v5.0.3 Critical Bugfix

Critical bugfix release - all users of v5.x should update to this version immediately
  • rewrite job to fix some logic issues
  • fix repo query which wasn't counting users the same way that we were selecting them
  • remove redundant PreferenceFieldId helper class - field no longer used
  • remove redundant listener function - has been moved to adapter addon

Read the rest of this update entry...
 
Okay - I spent quite a lot of time writing extensive unit tests to check the execution logic for the job which queues the emails for sending - and found a couple of issues which might have been responsible for the additional emails some people were receiving.

I'm pretty confident that the addon will work as expected now - please upgrade to v5.0.3 as soon as possible.

I did a test send to just over 5,000 members on one of my sites - and it worked flawlessly.

If you have my Monolog addon installed - it would be useful if you could set the file logging to Debug level for the next week or so, just in case further issues arise - that way I'll have a much better chance of identifying the source of any problems.

Thanks for your patience and once again, apologies for any inconvenience this issue caused.
 
Hi Sim

I am interested in using your add-on but does it also cover additions to the Media Gallery - not just Forums?

Many thanks
 
Top Bottom