{"record":{"id":"6f2dee5b61a09fc8","repo":"linera-io/linera-protocol","slug":"wallet-not-found-at","errorCode":null,"errorMessage":"wallet not found at {}","messagePattern":"wallet not found at (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"linera-bridge/src/relay/mod.rs","lineNumber":131,"sourceCode":"        .context(\"no config directory on this platform\")?\n        .join(\"linera\");\n    let wallet_path =\n        wallet_path.map_or_else(|| default_dir.join(\"wallet.json\"), |p| p.to_path_buf());\n    let keystore_path =\n        keystore_path.map_or_else(|| default_dir.join(\"keystore.json\"), |p| p.to_path_buf());\n    let storage_path = storage_config.map_or_else(\n        || format!(\"rocksdb:{}\", default_dir.join(\"wallet.db\").display()),\n        |s| s.to_string(),\n    );\n\n    tracing::info!(\n        wallet = %wallet_path.display(),\n        keystore = %keystore_path.display(),\n        storage = %storage_path,\n        \"Resolved paths\"\n    );\n\n    anyhow::ensure!(\n        wallet_path.exists(),\n        \"wallet not found at {}\",\n        wallet_path.display(),\n    );\n\n    let signer = linera_wallet_json::Keystore::read(&keystore_path)\n        .context(\"failed to read keystore\")?\n        .into_signer();\n\n    // Parse storage path: expect \"rocksdb:/path/to/db\"\n    let db_path = storage_path\n        .strip_prefix(\"rocksdb:\")\n        .context(\"storage config must start with 'rocksdb:'\")?;\n    let mut storage = create_rocksdb_storage(Path::new(db_path), cache_sizes).await?;\n\n    // Wallet: must already exist\n    tracing::info!(path = %wallet_path.display(), \"Loading existing wallet\");\n    let wallet = PersistentWallet::read(&wallet_path).context(\"failed to read wallet\")?;","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-bridge/src/relay/mod.rs#L113-L149","documentation":"The bridge relayer refuses to start because the resolved wallet file does not exist. run() resolves the wallet path from the --wallet argument or falls back to <config_dir>/linera/wallet.json (e.g. ~/.config/linera/wallet.json), logs it under \"Resolved paths\", and hard-fails if it is missing — the relayer never creates wallets, it only uses existing ones.","triggerScenarios":"Starting the relay with --wallet pointing at a nonexistent file, or with no --wallet on a machine where ~/.config/linera/wallet.json was never created; XDG_CONFIG_HOME overridden so the default path differs from where the wallet actually lives.","commonSituations":"Fresh server/container deployments that skipped wallet creation; scripts that assume the relayer provisions its own wallet; multiple wallets on one machine and the wrong default; typo in the path.","solutions":["Check the \"Resolved paths\" log line to see exactly which path was checked.","Create the wallet first with the linera CLI (`linera wallet init --genesis <genesis.json>`) on the same machine and config dir.","Pass the correct explicit path: --wallet /path/to/wallet.json.","If XDG_CONFIG_HOME or a container home is set, verify the wallet lives under the resulting config dir or pass --wallet explicitly."],"exampleFix":"# before: relayer started with a wallet path that does not exist\nlinera-bridge-relay run --wallet /etc/linera/missing-wallet.json\n\n# after: create the wallet, then start the relayer against it\nlinera wallet init --genesis genesis.json\nlinera-bridge-relay run --wallet ~/.config/linera/wallet.json","handlingStrategy":"validation","validationCode":"let wallet_path = wallet_path.unwrap_or_else(|| default_wallet_path());\nif !wallet_path.try_exists().unwrap_or(false) {\n    eprintln!(\n        \"no wallet at {} — run `linera wallet init --genesis <file>` first\",\n        wallet_path.display()\n    );\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Create and verify the wallet with `linera wallet show` before starting the relayer.","Pass an absolute --wallet path in scripts and containers.","Check the relayer's \"Resolved paths\" log line against where the wallet actually lives.","Beware XDG_CONFIG_HOME/container homes changing the default config directory."],"tags":["wallet","config","file-not-found","bridge"],"backgroundTag":"missing-wallet-file","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}