Error setting my openclaw
kameroongod
FREEOP

19 days ago

When i try to Run setup I get these logs:
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

at ServerResponse.setHeader (node:_http_outgoing:700:11)

at ServerResponse.json (/app/node_modules/express/lib/response.js:249:10)

at ServerResponse.header (/app/node_modules/express/lib/response.js:686:10)

at file:///app/src/server.js:874:37

at ServerResponse.json (/app/node_modules/express/lib/response.js:249:10)

at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {

at file:///app/src/server.js:880:28

at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

[/setup/api/run] error: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

at ServerResponse.setHeader (node:_http_outgoing:700:11)

at ServerResponse.header (/app/node_modules/express/lib/response.js:686:10)

I tried with MiniMax and OpenRouter API keys, no luck. With and without telegram and no luck as well..

$10 Bounty

20 Replies

For the OpenClaw template, double check the doc setup bits:HTTP Proxy port = 8080, ...volume mounted at /data, and SETUP_PASSWORD set. After fixing those, redeploy and try /setup again.


kameroongod
FREEOP

19 days ago

I have all already.. both the settings and volume mounted at /data


kameroongod

I have all already.. both the settings and volume mounted at /data

can you also confirm the service Networking -> HTTP Proxy is enabled and set to 8080


Make sure OPENCLAW_STATE_DIR and OPENCLAW_WORKSPACE_DIR are inside /data as well


dharmateja

Make sure OPENCLAW_STATE_DIR and OPENCLAW_WORKSPACE_DIR are inside /data as well

kameroongod
FREEOP

19 days ago

They are both under /data

and here's my proxy


kameroongod

They are both under /dataand here's my proxy

Change OPENCLAW_STATE_DIR to /data/.openclaw not .clawdbot
https://docs.openclaw.ai/install/railway#variables


dharmateja

Change OPENCLAW_STATE_DIR to /data/.openclaw not .clawdbothttps://docs.openclaw.ai/install/railway#variables

Then Redeploy, then re-run /setup


dharmateja

Then Redeploy, then re-run /setup

kameroongod
FREEOP

19 days ago

=/

new config:


same logs:


kameroongod

=/ new config:same logs:

can you share the log lines before ERR_HTTP_HEADERS_SENT?


dharmateja

can you share the log lines before ERR_HTTP_HEADERS_SENT?

kameroongod
FREEOP

19 days ago

my full logs since redeploying and trying again

Attachments


kameroongod

my full logs since redeploying and trying again

You re deployed right ?


dharmateja

You re deployed right ?

kameroongod
FREEOP

19 days ago

yes


kameroongod

yes

did you try setting up using web UI rather than telegram


dharmateja

did you try setting up using web UI rather than telegram

kameroongod
FREEOP

19 days ago

i am using web UI


kameroongod

i am using web UI

Looks like this isn’t a issue from your side .. it’s in the template..../setup/api/run is hitting ERR_HTTP_HEADERS_SENT ... when the setup flow fails mid run and the route ends up trying to respond twice ..(so many users won’t see it if their setup succeeds on the first try)...I’ve opened a PR to fix the handler .
https://github.com/vignesh07/clawdbot-railway-template/


vishwajeetcoderr-dev
FREE

19 days ago

DM me on telegram i will give solution - @python_manager


dharmateja

Looks like this isn’t a issue from your side .. it’s in the template..../setup/api/run is hitting ERR_HTTP_HEADERS_SENT ... when the setup flow fails mid run and the route ends up trying to respond twice ..(so many users won’t see it if their setup succeeds on the first try)...I’ve opened a PR to fix the handler .https://github.com/vignesh07/clawdbot-railway-template/

kameroongod
FREEOP

18 days ago

i see thanks! i'll see if there are other templates i can use as well


kameroongod

i see thanks! i'll see if there are other templates i can use as well

try now.. issue has been fixed


dharmateja

try now.. issue has been fixed

kameroongod
FREEOP

17 days ago

new error now xD

<--- Last few GCs ---> [44:0xa10a000] 6034 ms: Mark-Compact 473.4 (487.1) -> 469.6 (485.6) MB, pooled: 0 MB, 499.47 / 0.00 ms (average mu = 0.430, current mu = 0.015) allocation failure; scavenge might not succeed [44:0xa10a000] 6040 ms: Scavenge (interleaved) 471.7 (485.6) -> 470.9 (489.6) MB, pooled: 0 MB, 2.51 / 0.00 ms (average mu = 0.430, current mu = 0.015) allocation failure; <--- JS stacktrace ---> FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory ----- Native stack trace ----- 1: 0xe40d24 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [openclaw] 2: 0x1216be0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [openclaw] 3: 0x1216eb7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [openclaw] 4: 0x1444875 [openclaw] 5: 0x145e109 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [openclaw] 6: 0x14327b8 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [openclaw] 7: 0x14336e5 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [openclaw] 8: 0x140c3be v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [openclaw] 9: 0x186da1c v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [openclaw] 10: 0x1dcb476 [openclaw]

Attachments


kameroongod
FREEOP

17 days ago

Ok i figured something with help of chatgpt it works now! Many thanks


Loading...