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

Error in EmailReadImap when email is too long #2091

Closed
Aracon opened this issue Aug 17, 2021 · 3 comments
Closed

Error in EmailReadImap when email is too long #2091

Aracon opened this issue Aug 17, 2021 · 3 comments

Comments

@Aracon
Copy link

Aracon commented Aug 17, 2021

Describe the bug
When email is too long and credentials are correct, EmailReadImap fails with error in console and endless execution in web interface. Log fragment below.

To Reproduce
Steps to reproduce the behavior:

  1. Create credentials with long email (my example: [email protected]). Credentials name is the same as email. Credentials should be correct (if they are incorrect, node shows login error as expected).
  2. Create ReadImapNode with these credentials
  3. Run this node

When I use shorter email ([email protected]), node works correctly.

Expected behavior
Node executes or shows some error in web interface.

Environment (please complete the following information):

  • OS: Ubuntu Linux 20.04
  • n8n Version 0.134.0 from Docker container
  • Node.js Version: using n8n from Docker container
  • Database system: default
  • Operation mode: default

Additional context
Log fragment (from console with "sudo docker-compose up" running):

n8n_1      | (node:60) UnhandledPromiseRejectionWarning: Error: command or literal size is too large
n8n_1      |     at Connection._resTagged (/usr/local/lib/node_modules/n8n/node_modules/imap/lib/Connection.js:1502:11)
n8n_1      |     at Parser.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/imap/lib/Connection.js:194:10)
n8n_1      |     at Parser.emit (events.js:315:20)
n8n_1      |     at Parser._resTagged (/usr/local/lib/node_modules/n8n/node_modules/imap/lib/Parser.js:175:10)
n8n_1      |     at Parser._parse (/usr/local/lib/node_modules/n8n/node_modules/imap/lib/Parser.js:139:16)
n8n_1      |     at Parser._tryread (/usr/local/lib/node_modules/n8n/node_modules/imap/lib/Parser.js:82:15)
n8n_1      |     at TLSSocket.Parser._cbReadable (/usr/local/lib/node_modules/n8n/node_modules/imap/lib/Parser.js:53:12)
n8n_1      |     at TLSSocket.emit (events.js:315:20)
n8n_1      |     at emitReadable_ (internal/streams/readable.js:569:12)
n8n_1      |     at processTicksAndRejections (internal/process/task_queues.js:79:21)
n8n_1      | (Use `node --trace-warnings ...` to show where the warning was created)
n8n_1      | (node:60) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
n8n_1      | (node:60) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@tennox
Copy link
Contributor

tennox commented Nov 26, 2021

I want to point out that there's two parts to this issue:
the error itself (email too large)
and the unhandled promise rejection, which I also encountered with a totally different error, and which has the problematic consequence that the workflow keeps running and is not stopped with error.

tennox added a commit to tennox/n8n that referenced this issue Nov 26, 2021
@tennox
Copy link
Contributor

tennox commented Nov 26, 2021

I have submitted a PR to address the second part

janober pushed a commit that referenced this issue Mar 19, 2022
* Fix: EmailReadImap unhandled promise rejection

Related to #2091 (but only partially)

See #2091 (comment)

* Send errors from email read imap to logger

Co-authored-by: Manuel [tennox] <[email protected]>
@Joffcom
Copy link
Member

Joffcom commented Mar 21, 2022

Hey @Aracon & @tennox,

This one should be fixed in the latest release (0.169.0), I am going to mark this one as closed if it happens again let us know and we can always open it back up.

@Joffcom Joffcom closed this as completed Mar 21, 2022
Wowasshi pushed a commit to IT-Global-SVC/n8n that referenced this issue Mar 30, 2022
* ✨ Make it possible to download binary data

* ⚡ Fix lint issues and add support for filesystem mode

* ⚡ Design adjustment

📜 Change to the Sustainable Use License n8n-io#2932

🚨 Temporarily skip some regularly failing tests (n8n-io#3002)

feat: Add support for reading ids from file with executeBatch command (n8n-io#3008)

feat(Mattermost Node): Add support for Channel Search (n8n-io#2687)

* Squashed commit of the following:

commit 9f76bdca9b4af4fd3ee429d1c381c3ed5529434c
Author: Matt Walther <[email protected]>
Date:   Sun Jan 16 16:40:34 2022 -0600

    Mattermost Channel Search

* Add more boilerplate so Search action renders

* Changed order of search to make the operations alphabetical

* :zap: Add pagination

bug(EmailReadImap Node): Improve error handling (n8n-io#2991)

* Fix: EmailReadImap unhandled promise rejection

Related to n8n-io#2091 (but only partially)

See n8n-io#2091 (comment)

* Send errors from email read imap to logger

feat(HTTP Request Node): Allow Delete requests with body (n8n-io#2900)

delete request with body parameters

feat(KoBoToolbox Node): Add KoBoToolbox Regular and Trigger Node (n8n-io#2765)

* First version

* Added hooks

* Added Credentials test

* Add support for downloading attachments

* Slight restructure of downloaded binaries

* Added Trigger node

* Some linting

* Reverting package-lock changes

* Minor GeoJSON parsing fixes

* KoboToolbox: improve GeoJSON format

* Kobo: Support for get/set validation status

* Remove some logs

* [kobo] Fix default attachment options

* Proper debug logging

* Support for hook log status filter

* Kobo: Review fixes

* [kobo]: Add Get All Forms + lookup Form ID

* [kobo] Lookup Form ID in Trigger node

* [kobo] Update branded spelling

* [kobo] Support pagination

* ⚡ fix linting issue

* ⚡ Improvements to n8n-io#2510

* ⚡ Download files using n8n helper

* ⚡ Improvements

* ⚡ Improvements

* 🐛 Fix filenames

* ⚡ Fix some issues

feat(Linear Node): Add Linear Node (n8n-io#2971)

* ✨ Linear node

* ⚡ Improvements

fix(GitHub Node): Fix credential tests and  File > List operation (n8n-io#2999)

* Fixed credential test failing

* Fixed File list operation not working

fix(Telegram Node): Fix sending binary data when disable notification is set (n8n-io#2990)

feat(Mailjet Node): Add credential tests and support for sandbox, JSON parameters & variables (n8n-io#2987)

* Add Variables JSON to Mailjet Batch send

* ⚡ Improvements

* ⚡ Add credential verification

* ⚡ Small improvement

⬆️ Update package-lock.json file

🔖 Release [email protected]

⬆️ Set [email protected] on n8n-core

🔖 Release [email protected]

⬆️ Set [email protected] and [email protected] on n8n-node-dev

🔖 Release [email protected]

⬆️ Set [email protected] and [email protected] on n8n-nodes-base

🔖 Release [email protected]

🔖 Release [email protected]

⬆️ Set [email protected] and [email protected] on n8n-editor-ui

🔖 Release [email protected]

⬆️ Set [email protected], [email protected], [email protected] and [email protected] on n8n

🔖 Release [email protected]

📚 Update CHANGELOG.md

📚 Fix CHANGELOG.md file

⚡ Add Odoo and RedisTrigger node codex (n8n-io#3005)

* .168.2fixed: Auto stash before rebase of "refs/heads/codex/0.168.2fixed"

Odoo and Redis Trigger codex files update

* Update RedisTrigger.node.json

:zap: Add KoBoToolbox and Linear codex files (n8n-io#3040)

KoBoToolbox
KoBoToolbox Trigger
Linear

:books: Add missing full stop to license text

* (fix): Added missing full stop to license

GitHub does not render the single line breaks in the *Limitations* section. The added full stop makes it easier to read our license.

* :books: Add also to other files

fix(AWS Lambda Node): Fix "Invocation Type" > "Continue Workflow" (n8n-io#3010)

* 🔨 fix for running in continue workflow

* ⚡ Minor simplification

📚 Add one more missing full stop to license text

fix(core): Add logs and error catches for possible failures in queue mode (n8n-io#3032)

fix(Supabase Node): Fix Row > Get operation (n8n-io#3045)

fix(Supabase Node): Send token also via Authorization Bearer (n8n-io#2814)

Send Authorization Bearer in headers
Fix typo in validateCredentials function

fix(Wise Node): Fix issue when executing a transfer (n8n-io#3039)

:zap: Fix credentials import success message (n8n-io#3038)

:books: Add missing full stop to license text (n8n-io#3028)

Adding "." L15.

In addition, the markdown display don't show line break as in the editor.

:books: Add note to changelog linking to historic log (n8n-io#3031)

feat(HTTP Request Node): Add support for OPTIONS method (n8n-io#3030)

fix(Xero Node): Fix some operations and add support for setting address and phone number (n8n-io#3048)

* 🐛 Fix issue when sending Organization ID - Xero node

* 👕 Fix linting issue

feat(Crypto Node): Add Generate operation to generate random values (n8n-io#2541)

* ✨ Add generate action to crypto node

* ⚡ small fixes, nodelinter issues fixes

* ⚡ Improvements

* ⚡ Fix order

feat(Reddit Node): Add possibility to query saved posts (n8n-io#3034)

* chore: add nvmrc with required node version

* feat: added saved posts to reddit node with credentials on User resource

* Changed Details order

* Fixed lint issue

* Moved saved posts to profile as it only works for the logged in user, This avoids the breaking change

* Removed .nvmrc

* ⚡ Improvements

feat(Jira Node): Add Simplify Output option to Issue > Get (n8n-io#2408)

* ✨ Add option to use Jira field display names

* 🚸 Make mapped fields more deterministic

* ♻️ Refactor Jira user loadOptions

* Moved and renamed the option as well as only returning the fields to

* Tweaked Friendly Fields to make it "Simplify Output" following similar patterns to other nodes

* ⚡ Improvements

feat(Zendesk Node): Add ticket status "On-hold"

🔖 Release [email protected]

⬆️ Set [email protected] on n8n-core

🔖 Release [email protected]

⬆️ Set [email protected] and [email protected] on n8n-node-dev

🔖 Release [email protected]

⬆️ Set [email protected] and [email protected] on n8n-nodes-base

🔖 Release [email protected]

🔖 Release [email protected]

⬆️ Set [email protected] and [email protected] on n8n-editor-ui

🔖 Release [email protected]

⬆️ Set [email protected], [email protected], [email protected] and [email protected] on n8n

🔖 Release [email protected]

⬆️ Update package-lock.json file

📚 Update CHANGELOG.md with version 0.170.0

Co-Authored-By: Jonathan Bennetts <[email protected]>
Co-Authored-By: ricardo <[email protected]>
Co-Authored-By: Manuel [tennox] <[email protected]>
Co-Authored-By: Justin Halter <[email protected]>
Co-Authored-By: Yann Jouanique <[email protected]>
Co-Authored-By: Jan Oberhauser <[email protected]>
Co-Authored-By: Marcin Koziej <[email protected]>
Co-Authored-By: Niv <[email protected]>
Co-Authored-By: michael-radency <[email protected]>
Co-Authored-By: Yassine Fathi <[email protected]>
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

3 participants