Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevMode runs but connecting UI results in /agents endpoint ECONNREFUSED #2033

Open
sicco-moonbeam opened this issue Jan 8, 2025 · 9 comments
Labels

Comments

@sicco-moonbeam
Copy link

sicco-moonbeam commented Jan 8, 2025

Describe the bug
After DevMode starts without error, going to http://localhost:5173/ results in the following error:

3:20:22 PM [vite] http proxy error: /agents
Error: connect ECONNREFUSED ::1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) 

I do not get this error when running pnpm run start combined with pnpm run start:client in another terminal

To Reproduce

Expected behavior

  • UI loads with C3P0 character and no errors in logs.

Additional context

Cached:    53 cached, 53 total
  Time:    1.464s >>> FULL TURBO

(node:27576) ExperimentalWarning: CommonJS module C:\Users\naets\AppData\Roaming\nvm\v23.3.0\node_modules\npm\node_modules\debug\src\node.js is loading ES Module C:\Users\naets\AppData\Roaming\nvm\v23.3.0\node_modules\npm\node_modules\supports-color\index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)      

> @elizaos/[email protected] dev C:\Users\naets\OneDrive\Documents\Moonbeam\Workspaces\eliza-storage\packages\client-direct
> tsup --format esm --dts --watch "--" "--characters=characters/c3po.character.json"


> @elizaos/[email protected] dev C:\Users\naets\OneDrive\Documents\Moonbeam\Workspaces\eliza-storage\packages\core
> tsup --format esm --dts --watch "--" "--characters=characters/c3po.character.json"


> [email protected] dev C:\Users\naets\OneDrive\Documents\Moonbeam\Workspaces\eliza-storage\client
> vite "--" "--characters=characters/c3po.character.json"


  VITE v5.4.11  ready in 273 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI Building entry: src/index.ts
CLI tsup v8.3.5
CLI Using tsup config: C:\Users\naets\OneDrive\Documents\Moonbeam\Workspaces\eliza-storage\packages\client-direct\tsup.config.ts
CLI Running in watch mode
CLI Using tsconfig: tsconfig.json
CLI tsup v8.3.5
CLI Using tsup config: C:\Users\naets\OneDrive\Documents\Moonbeam\Workspaces\eliza-storage\packages\core\tsup.config.ts
CLI Running in watch mode
CLI Target: esnext
CLI Target: node18
CLI Cleaning output folder
ESM Build start
CLI Cleaning output folder
ESM Build start
ESM dist\index.js     19.41 KB
ESM dist\index.js.map 41.17 KB
ESM ⚡️ Build success in 37ms
CLI Watching for changes in "."
CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
ESM dist\index.js     155.08 KB
ESM dist\index.js.map 378.03 KB
ESM ⚡️ Build success in 71ms
CLI Watching for changes in "."
CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
DTS Build start
DTS Build start
DTS ⚡️ Build success in 2377ms
DTS ⚡️ Build success in 2837ms
3:20:21 PM [vite] http proxy error: /agents
Error: connect ECONNREFUSED ::1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16)        
(node:50944) ExperimentalWarning: CommonJS module C:\Users\naets\OneDrive\Documents\Moonbeam\Workspaces\eliza-storage\node_modules\tailwindcss\lib\lib\load-config.js is loading ES Module C:\Users\naets\OneDrive\Documents\Moonbeam\Workspaces\eliza-storage\client\tailwind.config.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)      
3:20:22 PM [vite] http proxy error: /agents
Error: connect ECONNREFUSED ::1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) (x2)   
3:20:22 PM [vite] http proxy error: /agents
Error: connect ECONNREFUSED ::1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) (x3)   
3:20:23 PM [vite] http proxy error: /agents
Error: connect ECONNREFUSED ::1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) (x4)   
3:20:25 PM [vite] http proxy error: /agents
Error: connect ECONNREFUSED ::1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) (x5)   
3:20:29 PM [vite] http proxy error: /agents
Error: connect ECONNREFUSED ::1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) (x6)   
@sicco-moonbeam sicco-moonbeam added the bug Something isn't working label Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Hello @sicco-moonbeam! Welcome to the ai16z community. Thank you for opening your first issue; we appreciate your contribution. You are now a ai16z contributor!

@AIFlowML
Copy link
Collaborator

AIFlowML commented Jan 9, 2025

Hello here.
What version are you loading ?

@sicco-moonbeam
Copy link
Author

I'm on tag v0.1.7-alpha.2

@elliotvaucher
Copy link

elliotvaucher commented Jan 9, 2025

Same issue here.

Edit : solved for me. The problem was only to wait enough time so the pnpm start command had the time to actually build the character from the json file, and then running pnpm start:client when the first process was finished.

@BigBumSquirrel
Copy link

@elliotvaucher interesting - how long did you have to wait?

@BigBumSquirrel
Copy link

BigBumSquirrel commented Jan 9, 2025

So just to rule out human error or some sort of "it's still building in the background", here is what I did:

Terminal 1:

  • pnpm run clean
  • pnpm install
  • pnpm run build
  • pnpm run dev
  • wait until all build messages in terminal stop; last lines are:

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
ESM dist\index.js     19.41 KB
ESM dist\index.js.map 41.17 KB
ESM ⚡️ Build success in 86ms
CLI Watching for changes in "."
CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
ESM dist\index.js     155.08 KB
ESM dist\index.js.map 378.03 KB
ESM ⚡️ Build success in 166ms
CLI Watching for changes in "."
CLI Ignoring changes in "**/{.git,node_modules}/**" | "dist"
DTS Build start
DTS Build start
DTS ⚡️ Build success in 3703ms
DTS ⚡️ Build success in 4210ms

(no more logs after this, even after 10 minutes).

Terminal 2:

  • pnpm run start:client
  • wait for vite message, i.e.:
Port 5173 is in use, trying another one...

  VITE v5.4.11  ready in 266 ms

  ➜  Local:   http://localhost:5174/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

Result:

(node:40112) ExperimentalWarning: CommonJS module C:\Users\naets\OneDrive\Documents\Moonbeam\Workspaces\eliza-storage\node_modules\tailwindcss\lib\lib\load-config.js is loading ES Module C:\Users\naets\OneDrive\Documents\Moonbeam\Workspaces\eliza-storage\client\tailwind.config.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
4:00:39 PM [vite] http proxy error: /agents
Error: connect ECONNREFUSED ::1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16)
4:00:40 PM [vite] http proxy error: /agents
Error: connect ECONNREFUSED ::1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) (x2)
4:00:42 PM [vite] http proxy error: /agents
Error: connect ECONNREFUSED ::1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) (x3)

@BigBumSquirrel
Copy link

Ok, comparing with pnpm run start, the issue seems to be that the agent actually never fully starts up - I don't get the initialization messages; e.g.:

 ℹ INFORMATIONS
   Plugins are:
   []

 ["ℹ Successfully loaded character from: C:\\Users\\naets\\OneDrive\\Documents\\Moonbeam\\Workspaces\\eliza-storage\\characters\\c3po.character.json"]

 ["◎ sqlite-vec extensions loaded successfully."]

 ["ℹ Using Database Cache..."]

 ✓ SUCCESS
   SUCCESS
   Creating runtime for character
   C-3PO

 ℹ INFORMATIONS
   Initializing AgentRuntime with options:
   {"character":"C-3PO","modelProvider":"openai","characterModelProvider":"openai"}

 ✓ SUCCESS
   Agent ID
   e61b079d-5226-06e9-9763-a33094aa8d82

 ["ℹ Setting model provider..."]

 ℹ INFORMATIONS
   Model Provider Selection:
   {"characterModelProvider":"openai","optsModelProvider":"openai","finalSelection":"openai"}

 ℹ INFORMATIONS
   Selected model provider:
   openai

 ℹ INFORMATIONS
   Selected image model provider:
   openai

 ["✓ Registering action: CONTINUE"]

 ["✓ Registering action: FOLLOW_ROOM"]

 ["✓ Registering action: UNFOLLOW_ROOM"]

 ["✓ Registering action: IGNORE"]

 ["✓ Registering action: NONE"]

 ["✓ Registering action: MUTE_ROOM"]

 ["✓ Registering action: UNMUTE_ROOM"]

 ["✓ Registering action: CURRENT_NEWS"]

 ["✓ Registering action: HELLO_WORLD"]

 ["✓ Registering action: DESCRIBE_IMAGE"]

 ◎ LOGS
   Registering service:
   browser

 ["✓ Service browser registered successfully"]

 ◎ LOGS
   Registering service:
   image_description

 ["✓ Service image_description registered successfully"]

 ◎ LOGS
   Registering service:
   text_generation

 ["✓ Service text_generation registered successfully"]

 ◎ LOGS
   Registering service:
   pdf

 ["✓ Service pdf registered successfully"]

 ◎ LOGS
   Registering service:
   speech_generation

 ["✓ Service speech_generation registered successfully"]

 ◎ LOGS
   Registering service:
   transcription

 ["✓ Service transcription registered successfully"]

 ◎ LOGS
   Registering service:
   video

 ["✓ Service video registered successfully"]

 ◎ LOGS
   Registering service:
   aws_s3

 ["✓ Service aws_s3 registered successfully"]

 ["✓ Registering action: GENERATE_IMAGE"]

 ["✓ Service browser initialized successfully"]

 ["◎ Initializing ImageDescriptionService"]

 ["✓ Service image_description initialized successfully"]

 ["ℹ Initializing LlamaService..."]

 ["✓ Service text_generation initialized successfully"]

 ["✓ Service pdf initialized successfully"]

 ["✓ Service speech_generation initialized successfully"]

 ["✓ Service transcription initialized successfully"]

 ["✓ Service video initialized successfully"]

Initializing AwsS3Service
 ["✓ Service aws_s3 initialized successfully"]

 ["◎ Initializing ImageDescriptionService"]

 ["ℹ Initializing LlamaService..."]

Initializing AwsS3Service
 ◎ LOGS
   initializeClients
   ["discord"]
   for
   C-3PO

 ["✓ Registering action: JOIN_VOICE"] 

 ["✓ Registering action: LEAVE_VOICE"]

 ["✓ Registering action: SUMMARIZE_CONVERSATION"]

 ["✓ Registering action: CHAT_WITH_ATTACHMENTS"]

 ["✓ Registering action: TRANSCRIBE_MEDIA"]

 ["✓ Registering action: DOWNLOAD_MEDIA"]

 ◎ LOGS
   client keys
   ["discord"]

 ["◎ Run `pnpm start:client` to start the client and visit the outputted URL (http://localhost:5173) to chat with your agents. When running multiple agents, use client with different port `SERVER_PORT=3001 pnpm start:client`"]

 ["✓ REST API bound to 0.0.0.0:3000. If running locally, access it at http://localhost:3000."]

 ["✓ Logged in as c3p0-agent#9980"] 

 ["✓ Slash commands registered"] 

 ["✓ Use this URL to add the bot to your server:"]

 ["✓ https://discord.com/api/oauth2/authorize?client_id=1324127960499884112&permissions=515433295168&scope=bot%20applications.commands"]        

No suitable voice channel found to join.

So the issue actually seems to be that dev mode hangs on my machine.

@elliotvaucher
Copy link

Sorry, I should have mentioned I used start and not the dev mode.

@sicco-moonbeam
Copy link
Author

@elliotvaucher ah ok - yes, that works for me as well. So dev mode is broken for you too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants