CLI output correct format?

Describe the problem/error/question

When running CLI commands, example, Export workflows and credentials (CLI commands | n8n Docs), the output isn’t straight-forward, in my case. It shows additional warnings/info etc. (might be linked to the log level).
Regardless, is that expected? And is there something that can be done about it, so that the output is only the requested data (Parsing using regex isn’t very convenient) ?

Please share your workflow

Information on your n8n setup

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

Hi @shrey-42, I am sorry you’re having trouble. This warning has been removed in v1 (along with basic auth itself):

So your best bet would be to upgrade to the current version of n8n (as with all major changes, make sure to take a backup beforehand) and then create the owner account through n8n’s user management functionality, or alternatively create the owner account on your current version of n8n.

Hi @MutedJam .

The thing is, i’ve often found that the ‘extra stuff in the output’ is not limited to just one particular warning, e.g. user management (in this case).

Btw, User Management is already enabled on my instance, but the warning’s still there.

Hi @shrey-42, I am very sorry for the trouble but I am not sure we’d consider backporting a fix for this behaviour to version 0.

Perhaps you simply want to export your data into file instead using --output=file.json and read it from there?

Yeah, that’s what my current workaround is. I just wanted to avoid this approach because then i end up having to deal with those extra, unnecessary binary files. Nevertheless, am currently on v0.236.3 and will probably upgrade to v1.x soon enough.

Thanks anyways!

Do you have the basic_auth env options still set though?

Just checked, yes.

I guess N8N_USER_MANAGEMENT_DISABLED=false isn’t currently enough to remove the warning?

Can you share all of your env options?

Sure

.env
DATA_FOLDER=*******
DOMAIN_NAME=*******
SUBDOMAIN=*******
N8N_PATH=/

N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=*******
N8N_BASIC_AUTH_PASSWORD=*******

GENERIC_TIMEZONE=Asia/Calcutta

EXECUTIONS_PROCESS=main

EXECUTIONS_DATA_SAVE_ON_ERROR=all
EXECUTIONS_DATA_SAVE_ON_SUCCESS=all
EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS=true

EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_MAX_AGE=720

EXECUTIONS_TIMEOUT=3599
EXECUTIONS_TIMEOUT_MAX=71999

N8N_ENABLE_METRICS=true
N8N_METRICS=true

NODE_FUNCTION_ALLOW_BUILTIN=*
NODE_FUNCTION_ALLOW_EXTERNAL=axios,node-html-parser,chance,jimp,uuid,yup,crypto-js

N8N_VERSION_NOTIFICATIONS_ENABLED=true

N8N_ENDPOINT_WEBHOOK=*******
N8N_ENDPOINT_WEBHOOK_TEST=*******

N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
N8N_PORT=5678
#N8N_LISTEN_ADDRESS=localhost
N8N_PROTOCOL=https
NODE_ENV=production
#WEBHOOK_TUNNEL_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/

DB_TYPE=postgresdb
DB_POSTGRESDB_DATABASE=*******
DB_POSTGRESDB_HOST=*******
DB_POSTGRESDB_PORT=*******
DB_POSTGRESDB_USER=*******
DB_POSTGRESDB_PASSWORD=*******

## ENV PARAMATERES FOR POSTGRES CONTAINER:

POSTGRES_PORT=*******
POSTGRES_DB=*******

POSTGRES_USER=*******
POSTGRES_PASSWORD=*******

POSTGRES_NON_ROOT_USER=*******
POSTGRES_NON_ROOT_PASSWORD=*******

N8N_USER_MANAGEMENT_DISABLED=false

N8N_AVAILABLE_BINARY_DATA_MODES=filesystem
N8N_DEFAULT_BINARY_DATA_MODE=filesystem

N8N_PAYLOAD_SIZE_MAX=500

N8N_METRICS_PREFIX=n8n_

N8N_LOG_LEVEL=debug
N8N_LOG_OUTPUT=console,file

N8N_LOG_FILE_LOCATION=/home/node/logs/n8n.log
N8N_LOG_FILE_MAXSIZE=50

N8N_LOG_FILE_MAXCOUNT=30

N8N_DIAGNOSTICS_ENABLED=false

CRYPTO_SECRET=*******

N8N_PUSH_BACKEND=sse #websocket

You still have these set, This is why you are seeing the message.

Technically we shouldn’t show anything extra when running the CLI other than the output but at least we know what the cause is.

1 Like

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