TracecatHQ / tracecat

The open source Tines / Splunk SOAR alternative.
https://tracecat.com
GNU Affero General Public License v3.0
2.24k stars 142 forks source link

[Not reproduced] Error creating new user in self-hosted #138

Closed Ohmsnipe closed 1 month ago

Ohmsnipe commented 2 months ago

Describe the bug Error Code on UI

Unhandled Runtime Error

Error: Error creating new user
Call Stack
newUserFlow
/app/.next/server/chunks/[root of the server]__cd8245._.js (1226:23)
process.processTicksAndRejections
node:internal/process/task_queues (95:5)
async
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (39:406)
async t4
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (38:6379)
async rk
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (39:25934)
async doRender
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (1394:30)
async cacheEntry.responseCache.get.routeKind
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (1543:40)
async DevServer.renderToResponseWithComponentsImpl
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (1463:28)
async DevServer.renderPageComponent
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (1856:24)
async DevServer.renderToResponseImpl
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (1894:32)
async DevServer.pipeImpl
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (911:25)
async NextNodeServer.handleCatchallRenderRequest
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js (271:17)
async DevServer.handleRequestImpl
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (807:17)
async
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/next-dev-server.js (331:20)
async Span.traceAsyncFn
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/trace/trace.js (151:20)
async DevServer.handleRequest
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/next-dev-server.js (328:24)
async invokeRender
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js (163:21)
async handleRequest
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js (342:24)
async requestHandlerImpl
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js (366:13)
async Server.requestListener
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/start-server.js (140:13)

To Reproduce Steps to reproduce the behavior:

Follow Installation. Dont Change the Authentication Settings. Local User ist not working.
I dont have a static ngrok account just created a local one by your command.

Expected behavior SuccessfullLogin

daryllimyt commented 2 months ago

Hi, thanks for trying Tracecat. Our Linux users seem to run into this a lot (Docker DNS resolution issue with host.docker.internal) and have found success with this section of the docs: https://docs.tracecat.com/installation#linux-users. If you're not using Linux, feel free to ping us on Discord and we'll try our best to help.

Ohmsnipe commented 2 months ago

Hi, thanks for trying Tracecat. Our Linux users seem to run into this a lot (Docker DNS resolution issue with host.docker.internal) and have found success with this section of the docs: https://docs.tracecat.com/installation#linux-users. If you're not using Linux, feel free to ping us on Discord and we'll try our best to help.

Hey even when setting host.docker.internal. And left auth on disabled with 0.

Same Errror:
Unhandled Runtime Error

Error: Error creating new user
Call Stack
newUserFlow
/app/.next/server/chunks/[root of the server]__cd8245._.js (1226:23)
process.processTicksAndRejections
node:internal/process/task_queues (95:5)
async
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (39:406)
async t4
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (38:6379)
async rk
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (39:25934)
async doRender
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (1394:30)
async cacheEntry.responseCache.get.routeKind
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (1543:40)
async DevServer.renderToResponseWithComponentsImpl
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (1463:28)
async DevServer.renderPageComponent
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (1856:24)
async DevServer.renderToResponseImpl
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (1894:32)
async DevServer.pipeImpl
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (911:25)
async NextNodeServer.handleCatchallRenderRequest
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js (271:17)
async DevServer.handleRequestImpl
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js (807:17)
async
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/next-dev-server.js (331:20)
async Span.traceAsyncFn
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/trace/trace.js (151:20)
async DevServer.handleRequest
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/next-dev-server.js (328:24)
async invokeRender
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js (163:21)
async handleRequest
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js (342:24)
async requestHandlerImpl
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js (366:13)
async Server.requestListener
/app/node_modules/.pnpm/next@14.1.0_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/start-server.js (140:13)
walid-arabi-mic commented 2 months ago

I have the same error !!!! any fix for this issue ?

topher-lo commented 2 months ago

Hi all! Thanks for reporting this, but it's hard for us to debug this without information about your OS and environment.

We can confirm the docker-compose works in a clean Linux box with the standard etc/hosts configuration and no proxies / non-standard networking setup.

walid-arabi-mic commented 2 months ago

OS: Linux projects 6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Docker logs:

Capture d’écran du 2024-05-15 15-29-40

Ohmsnipe commented 2 months ago

Linux HOSTNAME 6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Ohmsnipe commented 2 months ago

I tried it one last time but sadly getting the same error. Before I maybe did a mistake with copying the .env and using your env script.

I removed all volumes and containers, and tried once more. But sadly I did not have any success.

topher-lo commented 1 month ago

I tried it one last time but sadly getting the same error. Before I maybe did a mistake with copying the .env and using your env script.

I removed all volumes and containers, and tried once more. But sadly I did not have any success.

Will try to spin up an environment reproduce your error 🫡

Really appreciate all the info here. Helps a lot when it comes to debugging different environments

@Ohmsnipe

topher-lo commented 1 month ago

OS: Linux projects 6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Docker logs:

@walid-arabi-mic I think you are onto something. Could you share any logs from the FastAPI API service?

topher-lo commented 1 month ago

@walid-arabi-mic @Ohmsnipe did you set TRACECAT__DISABLE_AUTH=0? It should be TRACECAT__DISABLE_AUTH=1 i.e. set DISABLE_AUTH to true.

Hey even when setting host.docker.internal. And left auth on disabled with 0.

topher-lo commented 1 month ago

Sorry we give up. This is impossible to reproduce: we tried Ubuntu, EC2 ubuntu, Mac with docker-desktop, WSL2 with docker desktop, so I cannot risk breaking what works right now with docker desktop.

The best bet is to MAKE SURE TRACECAT__DISABLE_AUTH=1 and you have docker desktop installed.

If you have some step-by-step setup that allows one of @daryllimyt or myself to reproduce this error, please reopen this.

topher-lo commented 1 month ago

Added a warning and list of tested environments in our docs: https://docs.tracecat.com/installation#prerequisites