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: notifications-receiver@domain1111111.ru). 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 (send@domain1111111.ru), 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] <2084639+tennox@users.noreply.github.com>
@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 <matt@mashio.net>
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 n8n-workflow@0.92.0

⬆️ Set n8n-workflow@0.92.0 on n8n-core

🔖 Release n8n-core@0.110.0

⬆️ Set n8n-core@0.110.0 and n8n-workflow@0.92.0 on n8n-node-dev

🔖 Release n8n-node-dev@0.49.0

⬆️ Set n8n-core@0.110.0 and n8n-workflow@0.92.0 on n8n-nodes-base

🔖 Release n8n-nodes-base@0.167.0

🔖 Release n8n-design-system@0.15.0

⬆️ Set n8n-design-system@0.15.0 and n8n-workflow@0.92.0 on n8n-editor-ui

🔖 Release n8n-editor-ui@0.136.0

⬆️ Set n8n-core@0.110.0, n8n-editor-ui@0.136.0, n8n-nodes-base@0.167.0 and n8n-workflow@0.92.0 on n8n

🔖 Release n8n@0.169.0

📚 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 n8n-workflow@0.93.0

⬆️ Set n8n-workflow@0.93.0 on n8n-core

🔖 Release n8n-core@0.111.0

⬆️ Set n8n-core@0.111.0 and n8n-workflow@0.93.0 on n8n-node-dev

🔖 Release n8n-node-dev@0.50.0

⬆️ Set n8n-core@0.111.0 and n8n-workflow@0.93.0 on n8n-nodes-base

🔖 Release n8n-nodes-base@0.168.0

🔖 Release n8n-design-system@0.16.0

⬆️ Set n8n-design-system@0.16.0 and n8n-workflow@0.93.0 on n8n-editor-ui

🔖 Release n8n-editor-ui@0.137.0

⬆️ Set n8n-core@0.111.0, n8n-editor-ui@0.137.0, n8n-nodes-base@0.168.0 and n8n-workflow@0.93.0 on n8n

🔖 Release n8n@0.170.0

⬆️ Update package-lock.json file

📚 Update CHANGELOG.md with version 0.170.0

Co-Authored-By: Jonathan Bennetts <jonathan.bennetts@gmail.com>
Co-Authored-By: ricardo <ricardoespinoza105@gmail.com>
Co-Authored-By: Manuel [tennox] <2084639+tennox@users.noreply.github.com>
Co-Authored-By: Justin Halter <jhalter@weare5stones.com>
Co-Authored-By: Yann Jouanique <yann.jouanique@oneacrefund.org>
Co-Authored-By: Jan Oberhauser <jan.oberhauser@gmail.com>
Co-Authored-By: Marcin Koziej <marcin@cahoots.pl>
Co-Authored-By: Niv <nivbelleli@gmail.com>
Co-Authored-By: michael-radency <michael.k@radency.com>
Co-Authored-By: Yassine Fathi <hi@m4tt72.com>
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