Skip to main content

Troubleshooting

This page focuses on the most common issues when connecting the Neovim extension to the Lattice daemon.

Quick Checks

  1. In Neovim:

    vim
    :LovelaceHealth
    
  2. In a shell:

    bash
    lattice-ctl daemon status
    ls -la ~/.lovelace/lattice/daemon.sock
    

If :LovelaceHealth is green and pairing/trust is set up, most issues are resolved.

Plugin Loading Issues

Commands Not Found

Symptom: E492: Not an editor command: LovelaceHealth

Fixes:

  • Ensure the plugin is installed and loaded by your plugin manager
  • Restart Neovim after installation
  • Check for Lua errors:
    vim
    :messages
    

Connection Problems

Socket Not Found

Symptom: :LovelaceHealth shows "Not connected to daemon"

Fixes:

  1. Start the daemon:

    bash
    lattice-ctl daemon start
    lattice-ctl daemon status
    
  2. Verify the default socket path exists:

    bash
    ls -la ~/.lovelace/lattice/daemon.sock
    
  3. If you use a custom socket, set either:

    • Plugin config: daemon.socket_path = "/path/to/daemon.sock"
    • Environment: LATTICE_SOCKET=/path/to/daemon.sock

The plugin discovers sockets in this order:

  • daemon.socket_path
  • LATTICE_SOCKET
  • LATTICE_SOCKET_PATH
  • LOVELACE_SOCKET_PATH
  • ~/.lovelace/lattice/daemon.sock
  • /tmp/lovelace-daemon.sock

Connection Refused

Symptom: Socket exists, but connection fails

Fixes:

  • The daemon process may be stopped. Start it:
    bash
    lattice-ctl daemon start
    
  • If you need a restart:
    bash
    lattice-ctl daemon stop
    lattice-ctl daemon start
    

Permission Denied

Symptom: Permission errors when connecting to the socket

Fixes:

bash
ls -la ~/.lovelace/lattice/daemon.sock
lattice-ctl daemon stop
lattice-ctl daemon start

Pairing / Trust Issues

Device Not Set Up

Symptom: :LovelaceHealth shows:

## Pairing / Trust

✗ Device not set up

Fix:

vim
:LovelaceAuth

Then:

  1. Press c to copy the pairing code
  2. Approve it on a trusted device (example):
    bash
    ada pair approve apple-banana-cherry-date
    
  3. Press r to refresh (or re-run :LovelaceHealth)

Pairing Code Expired

Pairing codes expire quickly (typically ~5 minutes). Generate a new code:

vim
:LovelaceAuth

Rate Limited

If pairing initiation is rate limited, wait briefly (often ~30 seconds) and try again.

Task Issues

Task Submission Failed

Fixes:

  • Verify connectivity:
    vim
    :LovelaceHealth
    
  • Verify pairing/trust:
    vim
    :LovelaceAuth
    
  • Check details:
    vim
    :messages
    

Task Stuck in Queued

Fixes:

  • Check agents:
    vim
    :LovelaceAgents
    
  • Check the task list:
    vim
    :LovelaceTasks
    
  • Restart daemon if agents are not running:
    bash
    lattice-ctl daemon stop
    lattice-ctl daemon start
    

Cancel Doesn’t Work

If :LovelaceCancel fails, ensure you are running a daemon version that supports cancelTask. Upgrade the daemon and retry.

Workspace Issues

Wrong Workspace Detected

Use:

vim
:LovelaceSession

If the workspace is wrong, :cd into the correct project root and re-run :LovelaceSession.

You can also pin a workspace ID via config:

lua
require("lovelace").setup({
  tasks = {
    default_workspace = "ws_..."
  }
})

Getting Logs

To view daemon logs:

bash
# systemd
journalctl -u lattice-daemon -f

# or run daemon in foreground for debugging
lattice-ctl daemon start --foreground