AgentGPT
AgentGPT copied to clipboard
RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 0
I am in china, so I need to use vpn to get the response from openai, but when the vpn is on, the error occurs. error - RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 0 at new NodeError (node:internal/errors:399:5) at ServerResponse.writeHead (node:_http_server:344:11) at ServerResponse.writeHead (E:\AgentGPT-main\node_modules\next\dist\compiled\compression\index.js:46:263) at ServerResponse._implicitHeader (node:_http_server:335:8) at ServerResponse.end (E:\AgentGPT-main\node_modules\next\dist\compiled\compression\index.js:22:749) at DevServer.runEdgeFunction (E:\AgentGPT-main\node_modules\next\dist\server\next-server.js:1461:41) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async DevServer.runApi (E:\AgentGPT-main\node_modules\next\dist\server\next-server.js:468:47) at async Object.fn (E:\AgentGPT-main\node_modules\next\dist\server\next-server.js:751:37) at async Router.execute (E:\AgentGPT-main\node_modules\next\dist\server\router.js:253:36) at async DevServer.run (E:\AgentGPT-main\node_modules\next\dist\server\base-server.js:384:29) at async DevServer.run (E:\AgentGPT-main\node_modules\next\dist\server\dev\next-dev-server.js:743:20) at async DevServer.handleRequest (E:\AgentGPT-main\node_modules\next\dist\server\base-server.js:322:20) { code: 'ERR_HTTP_INVALID_STATUS_CODE'
same here
same here
Update. I pulled hahayusuf:feat/custom_base_path and misconfiged the API Base Url. The format should be: API_BASE_URL=https://your_url/v1 Now the agent can generate outputs. But please fix the API key issue... https://github.com/reworkd/AgentGPT/pull/67
me too
same here
same here ! Has anybody got this running locally in dev mode?
- Debian 11
- Nodejs 19.x
Fails to deploy Agent with error:
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /home/user/git/AgentGPT/.env
event - compiled client and server successfully in 1037 ms (288 modules)
wait - compiling /_error (client and server)...
event - compiled client and server successfully in 187 ms (289 modules)
warn - Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
wait - compiling / (client and server)...
event - compiled client and server successfully in 1200 ms (1294 modules)
wait - compiling /api/auth/[...nextauth] (client and server)...
event - compiled successfully in 41 ms (122 modules)
wait - compiling /api/chain (client and server)...
event - compiled successfully in 256 ms (174 modules)
error - RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: 0
at new NodeError (node:internal/errors:399:5)
at ServerResponse.writeHead (node:_http_server:339:11)
at ServerResponse.writeHead (/home/user/git/AgentGPT/node_modules/next/dist/compiled/compression/index.js:46:263)
at ServerResponse._implicitHeader (node:_http_server:330:8)
at ServerResponse.end (/home/user/git/AgentGPT/node_modules/next/dist/compiled/compression/index.js:22:749)
at DevServer.runEdgeFunction (/home/user/git/AgentGPT/node_modules/next/dist/server/next-server.js:1461:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DevServer.runApi (/home/user/git/AgentGPT/node_modules/next/dist/server/next-server.js:468:47)
at async Object.fn (/home/user/git/AgentGPT/node_modules/next/dist/server/next-server.js:751:37)
at async Router.execute (/home/user/git/AgentGPT/node_modules/next/dist/server/router.js:253:36)
at async DevServer.run (/home/user/git/AgentGPT/node_modules/next/dist/server/base-server.js:384:29)
at async DevServer.run (/home/user/git/AgentGPT/node_modules/next/dist/server/dev/next-dev-server.js:743:20)
at async DevServer.handleRequest (/home/user/git/AgentGPT/node_modules/next/dist/server/base-server.js:322:20) {
code: 'ERR_HTTP_INVALID_STATUS_CODE'
Same happens on Ubuntu 22.04 LTS
I am in germany and I can open https://api.openai.com/v1/ easily in webbrowser on Debian 11 and Ubunu 22 machines so it is not a connection error
Are you still experiencing this @alorbach @night3759 @Pandoxie @horysk @FakeSnake618 @muqiufeng-zang ?
Are you still experiencing this @alorbach @night3759 @Pandoxie @horysk @FakeSnake618 @muqiufeng-zang ?
It works (Y)
Added support for custom base url: https://github.com/reworkd/AgentGPT/pull/543
Going to close this as a result. I'll also include something in the documentation to describe this