linera-io/linera-protocol · warning

Cannot process inbox for follow-only chain {chain_id}. Use `

Error message

Cannot process inbox for follow-only chain {chain_id}. Use `linera assign` to take ownership of the chain first.

What it means

'linera process-inbox' refuses to run for a chain the wallet tracks as follow-only: the wallet has the chain's id and can read it, but holds no signing key, so it cannot propose blocks to process incoming bundles. The fix is built into the message: 'linera assign' registers a new owner key on the chain, converting it to a full (ownable) chain.

Source

Thrown at linera-service/src/cli/main.rs:526

                context.update_wallet_from_client(&chain_client).await?;
                let time_total = time_start.elapsed();
                info!(
                    "Synchronized chain information in {} ms",
                    time_total.as_millis()
                );
            }

            ProcessInbox { chain_id } => {
                let mut context = options
                    .create_client_context(storage, wallet, keystore)
                    .await?;
                let chain_id = chain_id.unwrap_or_else(|| context.default_chain());
                let follow_only = context
                    .wallet()
                    .get(chain_id)
                    .is_some_and(|chain| chain.is_follow_only());
                if follow_only {
                    anyhow::bail!(
                        "Cannot process inbox for follow-only chain {chain_id}. \
                         Use `linera assign` to take ownership of the chain first."
                    );
                }
                let chain_client = context.make_chain_client(chain_id).await?;
                info!("Processing the inbox of chain {}", chain_id);
                let time_start = Instant::now();
                let certificates = context.process_inbox(&chain_client).await?;
                let time_total = time_start.elapsed();
                info!(
                    "Processed incoming messages with {} blocks in {} ms",
                    certificates.len(),
                    time_total.as_millis()
                );
            }

            QueryShardInfo { chain_id } => {
                let context = options

View on GitHub (pinned to 6c226ddcb3)

Solutions

  1. Take ownership: run 'linera assign --chain-id <chain_id>' to register your key on the chain (requires the chain to permit assignment), then re-run process-inbox.
  2. If you did not intend to process that chain, target a chain you own: pass --chain-id of an owned chain, or set your default chain.
  3. If the chain should be ownable but is wrongly marked follow-only (wallet import quirk), inspect the wallet entry and fix its state or re-import.
  4. Automations should check the follow-only flag in the wallet before invoking process-inbox on arbitrary chains.

Example fix

# before
$ linera process-inbox --chain-id 745a... 
Error: Cannot process inbox for follow-only chain 745a.... Use `linera assign` to take ownership of the chain first.

# after
$ linera assign --chain-id 745a...
$ linera process-inbox --chain-id 745a...
Defensive patterns

Strategy: validation

Validate before calling

// Before process-inbox, check wallet state:
let chain = context.wallet().get(chain_id)
    .with_context(|| format!("chain {chain_id} not in wallet"))?;
anyhow::ensure!(!chain.is_follow_only(),
    "chain {chain_id} is follow-only; run `linera assign` first");

Try / catch

// Match on the message and convert to the remediation:
match run_process_inbox(chain_id).await {
    Err(e) if e.to_string().contains("follow-only chain") => {
        eprintln!("run: linera assign --chain-id {chain_id}");
        return Err(e);
    }
    other => other,
}

Prevention

When it happens

Trigger: Running ProcessInbox with --chain-id (or as default chain) pointing to a chain added read-only (e.g. tracked for observation, a publicly-readable chain like a service chain), where wallet.get(chain_id).is_follow_only() is true. The check runs before make_chain_client, so no network work happens first.

Common situations: Following a shared/application chain with 'linera track' or via a wallet import that marks it follow-only, then trying to operate on it; switching a workflow from watching to acting without taking ownership; default_chain pointing at the tracked chain after wallet reordering.

Related errors


AI-assisted analysis of linera-io/linera-protocol@6c226ddcb3 (2026-08-22). Data as JSON: /api/errors/a80967164c6c52dc. Report an issue: GitHub.