Infinite Loop?

Posted on
Tue Sep 14, 2021 1:21 pm
HFTobeason offline
Posts: 297
Joined: Nov 07, 2003

Infinite Loop?

I'm not 100% sure what's going on here, but it seems that, if Email+ is configured to send "Informational Messages", and an error occurs so that an email is sent via Email+, if there's an error in the email itself, I get an infinite loop where Email+'s attempt to send an email generates an error which in turn triggers Email+ to send an error email, ad infinitum... At least I think this is what's happening... This is a snippet of the last few iterations as I disabled the plugin:

Code: Select all
   Email+ Error                    Email+ Fastmail SMTP: SMTP server connection error: (554, '5.5.1 Error: no valid recipients')
   Trigger                         Indigo Error
   Email+                          sending email '[Indigo] Error' to 'HFTobeason@icloud.com' using Email+ Fastmail SMTP
   Email+                          sending email '[Indigo]' to '' using Email+ Fastmail SMTP
   Email+ Error                    Email+ Fastmail SMTP: SMTP server connection error: (554, '5.5.1 Error: no valid recipients')
   Trigger                         Indigo Error
   Email+                          sending email '[Indigo] Error' to 'HFTobeason@icloud.com' using Email+ Fastmail SMTP
   Email+                          sending email '[Indigo]' to '' using Email+ Fastmail SMTP
   Email+ Error                    Email+ Fastmail SMTP: SMTP server connection error: (554, '5.5.1 Error: no valid recipients')
   Trigger                         Indigo Error
   Email+                          sending email '[Indigo] Error' to 'HFTobeason@icloud.com' using Email+ Fastmail SMTP
   Email+                          sending email '[Indigo]' to '' using Email+ Fastmail SMTP
   Email+ Error                    Email+ Fastmail SMTP: SMTP server connection error: (554, '5.5.1 Error: no valid recipients')
   Trigger                         Indigo Error
   Email+                          sending email '[Indigo] Error' to 'HFTobeason@icloud.com' using Email+ Fastmail SMTP
   Email+                          sending email '[Indigo]' to '' using Email+ Fastmail SMTP
   Email+ Error                    Email+ Fastmail SMTP: SMTP server connection error: (554, '5.5.1 Error: no valid recipients')
   Trigger                         Indigo Error
   Email+                          sending email '[Indigo] Error' to 'HFTobeason@icloud.com' using Email+ Fastmail SMTP
   Email+                          sending email '[Indigo]' to '' using Email+ Fastmail SMTP
   Email+ Error                    Email+ Fastmail SMTP: SMTP server connection error: (554, '5.5.1 Error: no valid recipients')
   Trigger                         Indigo Error
   Email+                          sending email '[Indigo] Error' to 'HFTobeason@icloud.com' using Email+ Fastmail SMTP
   Warning                         process (pid 98306) failed to quit after polite request -- forcing it to quit now
   Stopped plugin "Email+ 2021.1.1"

Indigo 2021.1.1

Posted on
Tue Sep 14, 2021 1:36 pm
FlyingDiver offline
User avatar
Posts: 7184
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Infinite Loop?

Yeah, that's certainly possible. You need to put a condition in that Trigger that doesn't send email if it's an email error. ;)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Sep 14, 2021 1:44 pm
HFTobeason offline
Posts: 297
Joined: Nov 07, 2003

Re: Infinite Loop?

Thank you for your reply. Any suggestions as to how one might accomplish that? I don't see anything obvious to a non-programmer type...

Posted on
Tue Sep 14, 2021 1:44 pm
FlyingDiver offline
User avatar
Posts: 7184
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Infinite Loop?

How is that trigger defined in the first place?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Sep 14, 2021 2:46 pm
HFTobeason offline
Posts: 297
Joined: Nov 07, 2003

Re: Infinite Loop?

See attached screenshots.
Attachments
Screen Shot 2021-09-14 at 16.41.29.jpg
Screen Shot 2021-09-14 at 16.41.29.jpg (101.96 KiB) Viewed 2557 times
Screen Shot 2021-09-14 at 16.41.23.jpg
Screen Shot 2021-09-14 at 16.41.23.jpg (104.9 KiB) Viewed 2557 times
Screen Shot 2021-09-14 at 16.41.19.jpg
Screen Shot 2021-09-14 at 16.41.19.jpg (91.24 KiB) Viewed 2557 times

Posted on
Tue Sep 14, 2021 3:11 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Infinite Loop?

The easiest technique, but not 100% guaranteed to work, would be to add an additional Action to that Trigger of type Server Actions->Enable/Disable/Reload Actions->Disable Trigger then select the Trigger itself as the target to be disabled. Lastly, turn on the Auto-enable after checkbox with a value of around 10 seconds.

The last part is where it is a bit fuzzy. If you disable the Trigger for too long it might miss other valid errors, and if you set it too short it might get re-enabled before the action has had time to send out the email and you'll hit the infinite loop again.

Image

Posted on
Tue Sep 14, 2021 3:31 pm
jay (support) offline
Site Admin
User avatar
Posts: 18185
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Infinite Loop?

The root problem seems to be that somehow a send action was created without any recipients. We should validate that not only when the action is saved in the UI but also before the message is added to the queue (which would cover the case of scripting the email send). I've added a todo to look into these issues to see if we can better deal with situations like this.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Sep 14, 2021 3:46 pm
FlyingDiver offline
User avatar
Posts: 7184
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Infinite Loop?

First thing to do is get that out of the queue. Restarting the Email+ plugin should do it. Then make sure all your actions have valid email recipients in them.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Sep 14, 2021 4:22 pm
HFTobeason offline
Posts: 297
Joined: Nov 07, 2003

Re: Infinite Loop?

I traced the root of the problem to a spurious "send email" action in a trigger. Somehow that action must have had nothing filled in re recipient, etc. I just tried to create a send email action with absolutely nothing entered in the email form, and Indigo allowed it - which seems kinda dangerous...per Jay's comment above. Anyway, I traced back all the times the infinite error loop started over the last few weeks, and they were all launched by the same action trigger - which I've now fixed.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest