n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
49.06k stars 7.82k forks source link

Error Accessing Executions List #8192

Open dominik-mukrecki opened 10 months ago

dominik-mukrecki commented 10 months ago

Describe the bug

When attempting to access the executions list in the n8n interface, the application fails to load the list and displays HTTP 500 (Internal Server Error) and 502 (Bad Gateway) errors. This prevents the examination and management of workflow executions.

To Reproduce

Steps to reproduce the behavior:

  1. Open the n8n interface in a web browser.
  2. Navigate to the Executions section in the UI.
  3. The list of executions fails to load, and error messages are displayed in the browser's console.

Expected behavior

The expected behavior is to successfully load and display the list of workflow executions in the n8n interface, allowing users to view and manage their workflow executions.

Environment (please complete the following information):

Additional context

This issue seems to be related to server-side problems, as indicated by the HTTP status codes 500 and 502. The problem might be due to issues with the PostgreSQL database connection, configuration in queue mode, or an internal error in the n8n server. The issue is consistently reproducible when trying to access the executions list, suggesting a persistent problem with this specific functionality.

dominik-mukrecki commented 10 months ago

Additional Context

During runtime, the application encountered a TypeError, specifically related to accessing a 'data' property on a null object. Here are the details from the log entry:

error | TypeError: Cannot read properties of null (reading 'data') "{ file: 'LoggerProxy.js', function: 'exports.error' }"

Analysis of the Log Entry:

Possible Causes:

Recommended Actions:

dominik-mukrecki commented 10 months ago

Additional Observations and Attempts to Resolve the Issue

Downgrading the Version

Effective Solution: Manual Database Purging

Uncertainty About the Specific Version Causing the Issue

Need for Further Investigation

Recommendations

dominik-mukrecki commented 10 months ago

Update on the Issue with Version 1.22.3

netroy commented 10 months ago

@dominikmukrecki Thanks for the detailed report 💟. Unfortunately I'm not able to reproduce this so far. We are also not seeing this issue for any of our cloud users.

I've created a temporary project on Sentry, which should hopefully help us capture more details about this error, which we can then use to reproduce and fix the issue.

Can you please help us debug this by setting N8N_SENTRY_DSN to https://1df1121064ed9da7bafad223a045185f@o1420875.ingest.sentry.io/4506501935398912, and upgrading to 1.22.3?

Please also make sure that N8N_DIAGNOSTICS_ENABLED is either not set, or set to true.

dominik-mukrecki commented 10 months ago

@netroy You're welcome :)

I've noticed an issue in a workflow of mine within n8n, which seems prone to looping, especially when it runs every 5 minutes without new data. This could be causing the memory leak and the problems with the execution list. My proposed solution is to set up conditions to identify such looping workflows and freeze their execution. Additionally, I'm considering adding a feature to allow users to turn loop protection on or off. Sentry is already in place for in-depth debugging, and I've upgraded to n8n version 1.22.3, ensuring the diagnostic features are enabled. I'm hopeful this will address and prevent these kinds of issues in the future.

MarleTangible commented 2 weeks ago

@dominik-mukrecki can you check if the MAC address of the n8n container is duplicated by any chance? I had an issue where a connections were randomly failing because some containers on the same network had the same MAC address. This is a known issue with Portainer, especially if you're using the recreate feature.