netbirdio/netbird · warning
engine is not running
Error message
engine is not running
What it means
Second gate in Android Client.getRouteManager: the connect client exists, but client.Engine() returns nil, so the engine has not started (or already stopped). Route APIs that need the running engine's route manager fail with this error until the engine is up again.
Source
Thrown at client/android/client.go:544
// SetConnectionListener set the network connection listener
func (c *Client) SetConnectionListener(listener ConnectionListener) {
c.recorder.SetConnectionListener(listener)
}
// RemoveConnectionListener remove connection listener
func (c *Client) RemoveConnectionListener() {
c.recorder.RemoveConnectionListener()
}
func (c *Client) getRouteManager() (routemanager.Manager, error) {
client := c.getConnectClient()
if client == nil {
return nil, fmt.Errorf("not connected")
}
engine := client.Engine()
if engine == nil {
return nil, fmt.Errorf("engine is not running")
}
manager := engine.GetRouteManager()
if manager == nil {
return nil, fmt.Errorf("could not get route manager")
}
return manager, nil
}
func (c *Client) SelectRoute(id string) error {
manager, err := c.getRouteManager()
if err != nil {
return err
}
return manager.SelectRoutes([]route.NetID{route.NetID(id)}, true)
}View on GitHub (pinned to 93e97f4bf1)
Solutions
- Wait for the connected/running status before issuing route operations.
- After calling Disconnect, stop issuing route API calls.
- If this persists while connected, check the engine start logs for the underlying failure.
Defensive patterns
Strategy: validation
Validate before calling
// Ensure the engine is live before route operations
client := getConnectClient()
if client == nil || client.Engine() == nil {
return fmt.Errorf("route APIs require the engine to be running")
} Try / catch
if err := client.SelectRoute(id); err != nil {
if err.Error() == "engine is not running" {
// engine stopped or still starting: wait for the connected status and retry
}
} Prevention
- Wait for the connected status event before enabling route selection in the UI.
- Stop issuing route API calls immediately after Disconnect.
- If the error persists while connected, investigate engine start failures in the logs.
When it happens
Trigger: Route API calls racing engine startup; calling route APIs after Disconnect stopped the engine while the connect client object still exists.
Common situations: Disconnect racing a route selection in the UI; engine start failure leaving a half-initialized client.
Related errors
AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16).
Data as JSON: /api/errors/44b9024fee068c8a.
Report an issue: GitHub.