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

setup fails with 401 via Docker instance #8898

Closed
max19931 opened this issue Mar 15, 2024 · 5 comments
Closed

setup fails with 401 via Docker instance #8898

max19931 opened this issue Mar 15, 2024 · 5 comments

Comments

@max19931
Copy link

Bug Description

docker volume create n8n_data
docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n

on open and fillout a little Failure message comes up "Problem setting up owner Request failed with status code 401", email is test@localhost.local, firstname is also test, as well as the Last Name.

docker logging showed only the bootup logs from the container, with the last line been 'Press "o" to open browser', which doesn't even function as the container can not spawn a app outside of the container.

To Reproduce

docker volume create n8n_data
docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n

open browser to the port either localhost:5678 or IP:5678 and the navigation should redirect to /setup and fill out the form with the content of the issue text and press next.

Expected behavior

not failing

Operating System

Docker container

n8n Version

latest docker container

Node.js Version

container version

Database

SQLite (default)

Execution mode

main (default)

@netroy
Copy link
Member

netroy commented Mar 15, 2024

are you using http://localhost:5678/ or some other IP/hostname ?
This likely due to the auth cookie now being allowed to be used only in a secure context.
You can try disabling the secure flag by adding -e N8N_SECURE_COOKIE=false to the docker run command.

@max19931
Copy link
Author

i pulled up the webpage on a different maschine as the docker container was running on a headless box.

the main problem is that the setup is failing, and no logging was produced. i rerun it earlier and encountered the same issue and checked docker logs(but it didn't return anything new, only the boot up text when n8n is launched.

@max19931
Copy link
Author

without docker the mess it creates is even bigger as most of the required packages are deprecated!

@netroy
Copy link
Member

netroy commented Mar 15, 2024

pulled up the webpage on a different maschine

Yeah, we did not anticipate that many users who are running n8n on headless system will not have https configured. But since there have been a couple of complaints, I'm looking into addressing this.
Until then, can you please add the env variable N8N_SECURE_COOKIE=false to the docker container or setup https 🙏🏽 ?

the setup is failing, and no logging was produced

Sorry about this. I'm working on adding explicit error message in the frontend for scenarios like these.

most of the required packages are deprecated

We've updated quite a lot of packages since the last stable release (2 weeks ago), so hopefully soon you should not be seeing more than a couple of deprecated packages.
We are actively working towards replacing those remaining ones as well, but those packages are often 7 level deep dependencies, and not at all easy to replace.

@Joffcom
Copy link
Member

Joffcom commented Mar 25, 2024

I am going to move this to closed as it should be resolved now.

@Joffcom Joffcom closed this as completed Mar 25, 2024
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