/_ah/bounce

101 views
Skip to first unread message

johnP

unread,
Jan 18, 2017, 5:13:00 PM1/18/17
to Google App Engine
24 hours ago started getting constant errors - it's not even hitting my code...

'str' object has no attribute 'get_payload'
Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/webapp/mail_handlers.py", line 114, in post
    self.receive(BounceNotification(self.request.POST))
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/webapp/mail_handlers.py", line 168, in __init__
    post_vars.get('raw-message', ''))
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/mail.py", line 939, in __init__
    self.update_from_mime_message(mime_message)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/mail.py", line 1513, in update_from_mime_message
    super(InboundEmailMessage, self).update_from_mime_message(mime_message)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/mail.py", line 1422, in update_from_mime_message
    super(EmailMessage, self).update_from_mime_message(mime_message)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/mail.py", line 1295, in update_from_mime_message
    self._update_payload(mime_message)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/mail.py", line 1228, in _update_payload
    self._update_payload(alternative)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/mail.py", line 1223, in _update_payload
    payload = mime_message.get_payload()
AttributeError: 'str' object has no attribute 'get_payload'

Nicholas (Google Cloud Support)

unread,
Jan 23, 2017, 3:29:18 PM1/23/17
to Google App Engine
This is indeed an odd error message that seems to be emanating from the Mail API when attempting to sent bounce notifications to the /_ah/bounce endpoint of your application.  If you believe this to be an issue with the platform, I'd recommend filing a new issue on the App Engine public issue tracker.  Be sure to include the following in your report:
  • The minimal code from your application required to reproduce this error, most importantly the code using the Mail API and the code handling requests to the /_ah/bounce endpoint
  • A timeline of when this issue began and/or ended
  • Any other relevant logs you think may be related
If/when filing a public issue, feel free to link to it here so that others that may also be encountering this can follow through and support the report.  Thanks for your patience.

johnP

unread,
Jan 23, 2017, 8:49:44 PM1/23/17
to Google App Engine

Attila-Mihaly Balazs

unread,
Feb 7, 2017, 6:44:58 AM2/7/17
to Google App Engine
@johnP: did you make the issue private intentionally?

Thanks,
Attila

Nicholas (Google Cloud Support)

unread,
Feb 7, 2017, 10:41:21 AM2/7/17
to Google App Engine
I made the issue private as it contained a fair amount of project-sensitive information.  Nevertheless, I've created a generalized and publicly available reproduction of the issue which includes a usable workaround provided by another contributor on the reported issue.  Once this issue is properly triaged, I will sanitize its contents of sensitive information and make it public again.

Jason Myers

unread,
Feb 9, 2017, 3:01:21 PM2/9/17
to Google App Engine
We've noticed this issue too.  I also noticed that the bounce messages are now coming in as `quoted-printable` encoded (notice for example the mime boundaries are `; boundary=3DXXXXX`).  This must have changed recently.

If you have access to the payload before it is passed through to BounceNotification, you can decoding the incoming payload raw-message as `quoted-printable` to temporarily fix the issue

This has happened in the past with blobstore POSTs (that started using `quoted-printable`), see https://code.google.com/p/googleappengine/issues/detail?id=10109


On Wednesday, January 18, 2017 at 5:13:00 PM UTC-5, johnP wrote:
Reply all
Reply to author
Forward
0 new messages