Skip to main content

Port Conflicts (EADDRINUSE)

Symptom

Services fail to start because ports are already occupied by previous instances or other processes.

Solution

1

Identify Processes

Find processes using the default ports:
2

Kill Existing Processes

Terminate all processes using Agentic Wallet ports:
This will terminate all processes on these ports, including non-Agentic Wallet services. Verify PIDs before killing.
3

Restart Services

Re-export environment variables and start the stack:

Alternative: Use Different Ports

Configure custom ports in .env:
.env

Escrow Configuration Issues

Health Check Says “Not Configured”

Symptom

Response:

Solution

1

Set Program ID

Add the escrow program ID to .env:
.env
2

Export Environment

Ensure environment variables are loaded:
3

Restart Services

Restart the protocol-adapters service:
4

Verify Configuration

Check that the environment variable is set:

Health Check Says “Not Deployed”

Symptom

Solution

Deploy the escrow program to devnet:
This command:
  1. Syncs the program ID in source files
  2. Builds the Anchor program
  3. Deploys to devnet
  4. Updates .env with the deployed program ID
Ensure you have sufficient SOL in your deployment wallet (set via PRIVATE_KEY in .env).

Approval Gate Transactions Not Progressing

Symptom

Transaction is stuck in approval_gate stage:
Response:

Solution

Transactions requiring approval must be explicitly approved or rejected:

List Pending Approvals

Find all transactions waiting for approval:
The policy engine can return three decisions:
  • allow - Transaction proceeds automatically
  • deny - Transaction is rejected immediately
  • require_approval - Transaction pauses at approval gate
Policies return require_approval when:
  • Transaction exceeds spending limits but is within an “operator review” threshold
  • Agent is in supervised mode
  • Protocol or token is on a watchlist
  • Custom policy rules require human review

Transfer Fails with Rent Error

Symptom

Solution

Solana accounts must maintain a minimum balance for rent exemption. If the recipient account is unfunded:
1

Fund Recipient First

Ensure the recipient wallet has enough SOL to be rent-exempt:
2

Increase Transfer Amount

Transfer enough to keep both sender and recipient above rent-exempt minimum (~0.00089 SOL).
The rent-exempt minimum for a system account is approximately 890,880 lamports (0.00089088 SOL).

DEX or DeFi Protocol Failures

Symptom

Solution

Protocol adapters are fail-closed for safety. Upstream API outages return errors instead of synthetic success.
1

Check Protocol Health

Verify the protocol adapter status:
2

Retry Later

If the upstream service is unavailable, retry the operation after the service recovers.
3

Use Alternative Protocol

If one DEX is down, try an alternative:
  • Jupiter → Orca or Raydium for swaps
  • Check protocol capabilities: GET /api/v1/protocols
Fail-closed design prevents:
  • Silent failures masquerading as success
  • Agents proceeding with stale or invalid quotes
  • Execution at unfavorable rates due to simulation drift
Instead of degrading gracefully, the system surfaces errors immediately for operator review or automatic retry.

Environment Variables Not Loaded

Symptom

Services start but behave as if configuration is missing:
  • Escrow reports “not configured” even though ESCROW_PROGRAM_ID is in .env
  • Gateway rejects valid API keys
  • RPC pool uses only the default endpoint

Solution

Export environment variables to the shell before starting services:
Running npm run dev without exporting environment variables will use default values or empty strings, not the values in .env.

Verify Environment

Check that variables are actually set:

Transaction Stuck in “Submitting” Stage

Symptom

Transaction remains in submitting for an extended period.

Diagnosis

1

Check Outbox Queue

Verify the transaction is in the outbox:
Look for processing or pending jobs.
2

Check RPC Pool Status

Verify RPC endpoints are healthy:
Look for:
  • Low health scores (< 0.5)
  • High failure counts
  • All endpoints with recent errors
3

Check Network Congestion

Devnet or mainnet may be experiencing congestion. Check:
  • Solana status page
  • Block explorer for recent block times

Solutions

The outbox queue will automatically retry failed submissions up to TX_OUTBOX_MAX_ATTEMPTS times (default: 6).

Database Lock Errors

Symptom

Solution

1

Stop All Services

Ensure no services are accessing the database:
2

Check for Stale Locks

Look for -wal and -shm files:
Remove stale WAL files if no processes are running:
3

Restart Services

Only delete WAL files when all services are stopped. Deleting WAL files while a service is running can cause data corruption.

Debugging Transaction Failures

Get Transaction Details

Look for:
  • stage - Where the transaction failed
  • status - Current status (failed, pending, etc.)
  • error - Error message
  • failedAt - Deterministic failure stage
  • history - Stage transition log

Get Execution Proof

Verify cryptographic hashes for:
  • Intent payload
  • Policy decision
  • Simulation result

Get Replay Data

Reconstruct the full execution context:
  • Original request
  • Policy evaluation
  • Simulation output
  • Proof artifacts
  • Stage history

Query Audit Events

Review audit trail for:
  • Transaction created
  • Policy evaluated
  • Simulation completed
  • Signature generated
  • Submission attempts
  • Confirmation or failure
  • validation - Request schema or parameter validation failed
  • policy - Policy engine denied the transaction
  • build - Protocol adapter failed to build transaction
  • sign - Wallet engine could not sign (missing key, incorrect signer backend)
  • send - RPC submission failed
  • confirm - Transaction did not confirm within timeout

Getting Help

If you encounter an issue not covered here:
1

Check Logs

Review service logs for error messages and stack traces.
2

Run Doctor

4

Report Issues

Open an issue on GitHub with:
  • Error messages and logs
  • doctor command output
  • Transaction ID (if applicable)
  • Steps to reproduce