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..
20 Replies
19 days ago
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.
19 days ago
kameroongod
I have all already.. both the settings and volume mounted at /data
19 days ago
can you also confirm the service Networking -> HTTP Proxy is enabled and set to 8080
19 days ago
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
19 days ago
kameroongod
They are both under /dataand here's my proxy
19 days ago
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
19 days ago
Then Redeploy, then re-run /setup
dharmateja
Then Redeploy, then re-run /setup
19 days ago
kameroongod
=/ new config:same logs:
19 days ago
can you share the log lines before ERR_HTTP_HEADERS_SENT?
dharmateja
can you share the log lines before ERR_HTTP_HEADERS_SENT?
19 days ago
my full logs since redeploying and trying again
Attachments
kameroongod
my full logs since redeploying and trying again
19 days ago
You re deployed right ?
dharmateja
You re deployed right ?
19 days ago
yes
kameroongod
yes
19 days ago
did you try setting up using web UI rather than telegram
dharmateja
did you try setting up using web UI rather than telegram
19 days ago
kameroongod
i am using web UI
19 days ago
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/
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/
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
17 days ago
try now.. issue has been fixed
dharmateja
try now.. issue has been fixed
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
17 days ago
Ok i figured something with help of chatgpt it works now! Many thanks