linera-io/linera-protocol · error · ChainClientError

Signer doesn't have key to sign for chain {0}

Error message

Signer doesn't have key to sign for chain {0}

What it means

Error "Signer doesn't have key to sign for chain {0}" thrown in linera-io/linera-protocol.

Source

Thrown at linera-core/src/client/chain_client/mod.rs:814

            warn!(%self.chain_id, ?preferred_owner,
                "Chain is one of the owners but its Signer instance doesn't contain the key",
            );
            return Err(Error::CannotFindKeyForChain(self.chain_id));
        }

        Ok(preferred_owner)
    }

    /// Prepares the chain for a new owner by fetching the chain description and validating access.
    ///
    /// This is useful when assigning a chain to a client that may not have the owner key,
    /// e.g. when a faucet creates a chain with `open_multi_leader_rounds`.
    ///
    /// Returns the chain info if the owner can propose on this chain (either because they are
    /// an owner, or because `open_multi_leader_rounds` is enabled).
    #[instrument(level = "trace")]
    pub async fn prepare_for_owner(&self, owner: AccountOwner) -> Result<Box<ChainInfo>, Error> {
        ensure!(
            self.has_key_for(&owner).await?,
            Error::CannotFindKeyForChain(self.chain_id)
        );
        // Ensure we have the chain description blob.
        self.client
            .get_chain_description_blob(self.chain_id)
            .await?;

        // Get chain info.
        let info = self.chain_info().await?;

        // Validate that the owner can propose on this chain.
        ensure!(
            info.manager
                .ownership
                .can_propose_in_multi_leader_round(&owner),
            Error::NotAnOwner(self.chain_id)
        );

View on GitHub (pinned to 6c226ddcb3)

Solutions

  1. Import or generate the owner's key for chain {0} in the signer/keystore, e.g. `linera keygen` and ensure the wallet holds the private key for the chain owner.
  2. Point the client at the correct signer (wallet path or signer service) that contains the key for this chain's owner.
  3. Verify the signer service is running and unlocked so the key is available at signing time.

When it happens

Trigger: The configured signer lacks the private key for the owner required to sign on the given chain.

Common situations: The wallet does not contain the owner's key, or a different key owner was set as default for the chain.


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