n8n-io/n8n

Directly visiting an Execution URL that's Running auto-redirects to the WRONG Execution

dkindlund opened this issue · 7 comments

Bug Description

For a given workflow, I store the execution URL for each invocation as it runs into a database. While the execution is running, if I then visit that Execution URL directly, n8n silently redirects the browser to a different (completed) Execution ID.

In the video below, I tried to visit /executions/51595 while it is running, and you can see the browser get redirected to the completed /executions/51659 -- which makes no sense:

execution-redirect.mp4

To Reproduce

  1. Run any workflow
  2. Obtain the Execution ID
  3. Attempt to directly visit that Execution ID by plugging that URL directly into the address bar WHILE the execution is still running
  4. See n8n redirect the a different completed execution

Expected behavior

I expect n8n to show the execution ID that's currently running.

Operating System

Google Cloud Run

n8n Version

1.31.2

Node.js Version

18.16

Database

PostgreSQL

Execution mode

main (default)

Hey @dkindlund,

I may have missed it in the video but is 51595 the actual id for the workflow that is running or is it for an execution that is not longer stored or for a different workflow id?

Have you also tried on the latest release of n8n to see if the issue is there as well?

Hey @Joffcom , 51595 was the execution ID of the running workflow. 51659 was the execution ID of an already successfully completed workflow.

I haven't tried running the latest release of n8n; I can try to re-test on the latest version, but I'd be curious if you're able to reproduce this issue on that latest version on your end.

Hey @dkindlund,

For me using Firefox on 1.39.0 it is taking me to the running execution when I use the ID. For fun I have also opened a new tab and inputted the direct URL and everything looks good.

Okay, it might a side-effect of a Chrome AdBlocker extension then... I'll retest on my end.. Thanks for the sanity check, @Joffcom

Okay, even with the extension disabled, I'm still seeing it for long running executions. @Joffcom , is it possible for you to re-test on your end and attempt to visit the Execution URL after the execution has ran for at least 5 minutes?

Specifically, I don't see this behavior with shorter running executions... but those that have a run time > 5 mins -- that's where I'm seeing this sort of side-effect. Does that make sense?

Hey @dkindlund,

Tested with a 6 minute and I am not seeing it.

image

Is it all workflows you see this on or a specific one? Does it also happen in all browsers or if you visit the IP of your n8n instance directly bypassing all proxies?

Okay, it looks like upgrading to v1.39.1 appears to have resolved this issue. Closing accordingly.