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

Cannot read properties of undefined (reading 'rpcUrls') #1251

Closed
lorcann-rauzduel opened this issue Dec 19, 2024 · 1 comment
Closed

Cannot read properties of undefined (reading 'rpcUrls') #1251

lorcann-rauzduel opened this issue Dec 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@lorcann-rauzduel
Copy link

Describe the bug

Swap execution fails with "Cannot read properties of undefined (reading 'rpcUrls')" error during LiFi SDK initialization. The issue occurs because the RPC URLs configuration doesn't match the format expected by the SDK.

To Reproduce

  1. Initialize SwapAction with a WalletProvider
  2. Attempt to execute a swap with a prompt
  3. Error occurs during configuration creation in SwapAction constructor

Expected behavior

Swap should execute normally

Screenshots

Logs :

 ["✓ Normalized action: swap"] 

 ["ℹ Executing handler for action: swap"] 
Error in swap handler: Cannot read properties of undefined (reading 'rpcUrls')
 ◎ LOGS
   Evaluating 
   GET_FACTS 

 ◎ LOGS
   Evaluating 
   UPDATE_GOAL 

 ◎ LOGS
   Creating Memory 
   3131de6c-ba7b-0dad-b05f-eeed7ceae7ca 
   Error: Cannot read properties of undefined (reading 'rpcUrls') 

Additional context

my .env file :

.....
# EVM
EVM_PRIVATE_KEY=my_private_key
EVM_PROVIDER_URL=my_eth_mainnet_provider
ETHEREUM_PROVIDER_ARBITRUM_=my_arbitrum_mainnet_provider
ETHEREUM_PROVIDER_ARBITRUM_SEPOLIA=my_arbitrum_sepolia_provider

my character file :


    "name": "user-agent",
    "clients": ["twitter", "telegram"],
    "modelProvider": "anthropic",
    "settings": {
        "secrets": {},
        "voice": {},
        "chains": { "evm": ["arbitrum", "arbitrumSepolia"] }
    },
    "plugins": ["@ai16z/plugin-evm"],
@AIFlowML
Copy link
Collaborator

AIFlowML commented Jan 6, 2025

Issue fixed and mentioned in #1456
I cosider this closed but worth a check.

@AIFlowML AIFlowML closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants