Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message Listener with Attachment #5

Open
zachariahtimothy opened this issue Mar 2, 2016 · 0 comments
Open

Message Listener with Attachment #5

zachariahtimothy opened this issue Mar 2, 2016 · 0 comments

Comments

@zachariahtimothy
Copy link

Thank you for such a great package, until this bug it has worked great. When listening for new email using onNewEmail, I receive the following error:
TypeError: First argument needs to be a number, array or string.
The message I am listening for has an attachment and that seems to be what is causing the error. Any help would be great, as it seems like a simple fix. Full stack trace is as follows:
Exception in setTimeout callback: TypeError: First argument needs to be a number, array or string. at decodeBase64 (decoders.js:34:10) at message.js:49:16 at Array.forEach (native) at Function._.each._.forEach (packages/underscore/packages/underscore.js:134:1) at messageFromPayload (message.js:46:7) at parseDoc (message.js:34:12) at new GMail.Message (message.js:5:18) at [object Object].GMail.Listener.handleNewMessage (listener.js:28:17) at listener.js:16:10
While debugging I found in the messageFromPayload function is trying to decode the attachment part which has no body and therefore part.body.data is undefined.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant