User Management Feature problem (User attempted to access a workflow without permissions)

We are in the process of updating our version of N8N and have decided to continue with Basic Auth at the moment and disable the new User Management feature using the N8N_USER_MANAGEMENT_DISABLED=true

However when we upgrade to any version greater than 0.164.1 some of our workflows fail to open.

The UI starts and i can see we are on the latest version.

After checking the logs i can see the issue to be below

{“level”:“info”,“message”:“User attempted to access a workflow without permissions”,“metadata”:{“file”:“Server.js”,“timestamp”:“2022-06-13T13:26:09.960Z”,“userId”:“12fbd939-95d9-41fa-b82f-a34a935ab455”,“workflowId”:“8”}}

Do you have any idea how to resolve this other that backup the workflows - upgrade and then recreate them? I would rather not have to do that because we have a large selection potentially effected.

Interesting this is not the same for all workflows which is strange because i’m the only developer.

Any advice would be appreciated.

Our set-up is N8N (1 node) running in Docker on a t4g.small instance with the default container resource limits.

Database is Postgres running in Docker


Hi @messi198310, I am very sorry to hear you’re having trouble.

This sounds unexpected to me. Does this issue persist even after clearing your browser cache and cookies (you can find instructions for this here for example)?

If so, could you check if your shared_workflow database table contains any records with a userId not belonging to the single user of the user table?

Thanks for the response @MutedJam

I have connected to the Postgres DB and can see that the workflows that don’t open after the update have no record in the shared_workflow table :confused:

Even when i roll back to version 0.164.1 there is still no record in the table but they work in the UI

And does the original error persist for you after clearing your browser cache & cookies (or using incognito mode)? The authentication mechanism has changed for n8n versions including user management, even if you don’t actually use that feature.

Yes the same after both browser reset and incognito mode.

{“level”:“info”,“message”:“User attempted to access a workflow without permissions”,“metadata”:{“file”:“Server.js”,“timestamp”:“2022-06-14T07:43:20.273Z”,“userId”:“12fbd939-95d9-41fa-b82f-a34a935ab455”,“workflowId”:“6”}}

and that record does not exist in the db table

Thanks for confirming @messi198310, I tried creating a few workflows on a fresh instance of [email protected] and then upgrading to 0.181.2 while having configured N8N_USER_MANAGEMENT_DISABLED=true.

Following the upgrade, all my workflows did have an entry in shared_workflow. Is there a chance your migration path looked different then above or that a previous migration got interrupted?

Either way, I can’t think of any straightforward way of resolving this unfortunately. I think the safest way would be to export workflows & credentials through the CLI, backup your database, drop the old tables, then restart n8n and import your workflows & credentials through the CLI again.

You could alternatively try creating the missing records manually (I just did that on my end it seemed to work after restarting n8n), but again, I’d only try this after creating a database backup.

Thanks again for the response @MutedJam

I decided to go with the inserting rows approach as its only our dev environment and that worked a treat.

Will just have to check each environment during our upgrade path and fix retrospectively.

thanks again for the excellent support.

1 Like