Email Read Imap node encountered an error fetching new emails

Describe the problem/error/question

I am trying to use an Email trigger (IMAP) node, I successfully connected to my email account. Now when I test and send myself an email it just keeps loading and not doing anything, at some point I get this error: Email Read Imap node encountered an error fetching new emails
and this message: TypeError: Cannot read properties of null (reading ‘toUpperCase’)

I don’t get this message and error when not sending myself an email.

To clarify I host n8n via docker on my server running UNRAID and im trying to use Icloud mail.

  • n8n version: 1.26.0
  • Database: SQLite
  • Running n8n via: Docker
  • Operating system: Unraid

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

I just tried to do it with an gmail account and this seems to be working… Does anyone know what the issue with icloud mail is and if there is a solution?

I have never used this node. Can you share what your parameters/options are?

Are you sure you have the auth set up correctly?

When you used your gmail account, you used the gmail trigger?

This error looks like it would be from an error in the actual node itself. I took a look at the code and they are using toUpperCase to essentially filter different types of data from the email (text, attachments, etc.). It is also used to made the error codes uppercase.

The options i see are:

  • You are getting another IMAP error (like it cant find the Mailbox Name you specified) and is getting another error trying to display that error to you
  • Your auth isn’t set up right (though that would likely give you an error on the credential screen)
  • There is an error where they use toUpperCase to filter through data that isn’t being caught

Try to:

  1. Ensure your Mailbox Name is correct and points to an actual mailbox
  2. Change the format to different options
  3. Look at the logs (and post them here)

I’d love to dig into this more and maybe make my first contribution back to n8n to fix it!
I don’t have an email I could use right not to test the IMAP trigger but I could set something up to test with tomorrow

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.