Page 1 of 1
Error "Cannot retrieve child part..." in bacht mailer
Posted: Thu Aug 21, 2008 5:27 pm
by daneel
Hi, I just have had this error message:
"Cannot retrieve child part identified by '48adde59933fd' as it does not exist. Consider using hasChild() to check."
It was thrown 20 times, using the bachtMailer function. I have configured it not to allow more than 20 succesive failures, so it stoped there.
Does anyone know what that means and why is thrown ?
Thanks!
Re: Error "Cannot retrieve child part..." in bacht mailer
Posted: Fri Aug 22, 2008 4:03 pm
by daneel
anyone ?? chris ??
It happened two days ago once, and today has happened again.... it's quite important because it stops the sending process.
Re: Error "Cannot retrieve child part..." in bacht mailer
Posted: Wed Nov 19, 2008 2:14 pm
by gmorehoudh
I'm also having this problem in batchSend(). It's using my overridden send() method, and the first mail is sent successfully and every subsequent one fails silently, but by inserting some debug code into BatchMailer I was able to determine this was the Swift_MimeException being thrown.
Re: Error "Cannot retrieve child part..." in bacht mailer
Posted: Wed Nov 19, 2008 5:48 pm
by gmorehoudh
I have traced this in my case to the Decorator plugin so far.
From a backtrace:
Swift_Message_Mime->getChild
Swift_Plugin_Decorator->recursiveRestore
Swift_Plugin_Decorator->recursiveRestore
Swift_Plugin_Decorator->beforeSendPerformed
Swift->notifyListeners
Swift->send
Re: Error "Cannot retrieve child part..." in bacht mailer
Posted: Wed Nov 19, 2008 6:21 pm
by gmorehoudh
And it's because the Decorator plugin chokes when I attach a message to another message, which I do in non-live mode in our code so I can prepend debugging information. One message will get sent (with send() or batchSend()), seemingly without the replacements made by Decorator (though I haven't got to debug that part yet because of this, so who knows), and all subsequent messages throw the Swift_MimeException.
This function will produce a Swift_Message that triggers the behavior every time.
Code: Select all
protected function wrap_nonlive_message(Swift_Message $message, Swift_RecipientList $recipients, $info = null) {
$nonlive_message = new Swift_Message('DEV EMAIL: ' . $message->getSubject());
$to_string = "\r\nTo: " . implode(", ", $recipients->getTo());
$to_string .= "\r\nCc: " . implode(", ", $recipients->getCc());
$to_string .= "\r\nBcc: " . implode(", ", $recipients->getBcc());
$dev_email_info = "THIS EMAIL HAS BEEN SENT DURING TESTING\r\n" .
"IF RUN LIVE, IT WILL REALLY GO TO:\r\n" . $to_string . "\r\n\r\n" .
"extra info: [[ " . $info . " ]]\r\n\r\n" .
"---------------------------------\r\n\r\n";
// attach useful info
$dev_email_info_swift = new Swift_Message_Part($dev_email_info);
$nonlive_message->attach($dev_email_info_swift);
// now attach the original message to the new wrapped dev one
$nonlive_message->attach($message);
return $nonlive_message;
}
Re: Error "Cannot retrieve child part..." in bacht mailer
Posted: Thu Nov 20, 2008 7:50 pm
by gmorehoudh
See also:
viewtopic.php?f=52&t=91119
The decorator plugin still has bugs which break things when dealing with certain MIME structures.
Sadly, I don't believe I can invest the time (at work) to find and fix them due to time constraints, so I'm probably just going to opt for a workaround. It's unfortunate that this project seems to be abandonware at the moment, since clearly only the developer understands it well enough to give good support.
Re: Error "Cannot retrieve child part..." in bacht mailer
Posted: Fri Nov 21, 2008 2:04 pm
by gmorehoudh
I have developed a workaround for my case (in which I was attempting to use the same Swift instance with the same Decorator instance to send 3 emails). I have to re-instantiate Swift and re-attach Decorator each time, then it appears to work in limited testing.
Re: Error "Cannot retrieve child part..." in bacht mailer
Posted: Fri Dec 05, 2008 10:22 pm
by Chris Corbyn
This entire class has been rewritten in version 4, along with the MIME components so the potential for this same bug isn't there. Everything is simpler.
I'm gathering a small team of developers to help get v4 out of the door now. I've gained two excellent developers over the past 24 hours and I'm seeking one more.
Re: Error "Cannot retrieve child part..." in bacht mailer
Posted: Mon Dec 08, 2008 1:23 pm
by gmorehoudh
I can tell you we are anxiously awaiting v4 here, especially with my talent for finding esoteric bugs in v3.
I took a (very) brief stab at digging into Swift 3 to see if I could figure out what was causing this bug and maybe submit a patch, but at this point my manager can't justify me spending the time on it since it would take me quite some time to figure out how the internals work. However, we will definitely be among the first smoke testing v4 I think as some of the old MIME structuring bugs I uncovered affect another project of ours which we're waiting on refactoring until v4 comes out.
Re: Error "Cannot retrieve child part..." in bacht mailer
Posted: Mon Dec 08, 2008 3:18 pm
by Chris Corbyn
gmorehoudh wrote:I can tell you we are anxiously awaiting v4 here, especially with my talent for finding esoteric bugs in v3.
I took a (very) brief stab at digging into Swift 3 to see if I could figure out what was causing this bug and maybe submit a patch, but at this point my manager can't justify me spending the time on it since it would take me quite some time to figure out how the internals work. However, we will definitely be among the first smoke testing v4 I think as some of the old MIME structuring bugs I uncovered affect another project of ours which we're waiting on refactoring until v4 comes out.
I don't believe that there's any potential for bugs of this nature in v4. The composition of the MIME documents is very elegant compared to that in v3. There have been changes to the API though so it's not a drop-in replacement.