Error "Cannot retrieve child part..." in bacht mailer
Moderators: Chris Corbyn, General Moderators
Error "Cannot retrieve child part..." in bacht mailer
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!
"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
anyone ?? chris ??
It happened two days ago once, and today has happened again.... it's quite important because it stops the sending process.
It happened two days ago once, and today has happened again.... it's quite important because it stops the sending process.
-
gmorehoudh
- Forum Commoner
- Posts: 50
- Joined: Tue Mar 04, 2008 1:49 pm
Re: Error "Cannot retrieve child part..." in bacht mailer
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.
-
gmorehoudh
- Forum Commoner
- Posts: 50
- Joined: Tue Mar 04, 2008 1:49 pm
Re: Error "Cannot retrieve child part..." in bacht mailer
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
From a backtrace:
Swift_Message_Mime->getChild
Swift_Plugin_Decorator->recursiveRestore
Swift_Plugin_Decorator->recursiveRestore
Swift_Plugin_Decorator->beforeSendPerformed
Swift->notifyListeners
Swift->send
-
gmorehoudh
- Forum Commoner
- Posts: 50
- Joined: Tue Mar 04, 2008 1:49 pm
Re: Error "Cannot retrieve child part..." in bacht mailer
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.
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;
}
-
gmorehoudh
- Forum Commoner
- Posts: 50
- Joined: Tue Mar 04, 2008 1:49 pm
Re: Error "Cannot retrieve child part..." in bacht mailer
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.
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.
-
gmorehoudh
- Forum Commoner
- Posts: 50
- Joined: Tue Mar 04, 2008 1:49 pm
Re: Error "Cannot retrieve child part..." in bacht mailer
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.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Error "Cannot retrieve child part..." in bacht mailer
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.
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.
-
gmorehoudh
- Forum Commoner
- Posts: 50
- Joined: Tue Mar 04, 2008 1:49 pm
Re: Error "Cannot retrieve child part..." in bacht mailer
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 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.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Re: Error "Cannot retrieve child part..." in bacht mailer
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.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.