linera-io/linera-protocol · error
When storage is not selected, the storage-service needs to b
Error message
When storage is not selected, the storage-service needs to be enabled
What it means
linera net up assembles local test networks. When no --storage option is given, it must fall back to an embedded storage service, but that fallback only exists in binaries compiled with the storage-service feature. Without the option and without the feature, StorageConfigProvider::new panics: there is no way to source a storage configuration.
Source
Thrown at linera-service/src/cli/net_up_utils.rs:58
let binary = get_service_storage_binary().await?.display().to_string();
let service = StorageService::new(&service_endpoint, binary);
let service_guard = Some(service.run().await?);
let inner_storage_config = InnerStorageConfig::Service {
endpoint: service_endpoint,
};
let namespace = "table_default".to_string();
let config = StorageConfig {
inner_storage_config,
namespace,
};
Ok(StorageConfigProvider {
config,
_service_guard: service_guard,
})
}
#[cfg(not(feature = "storage-service"))]
None => {
panic!("When storage is not selected, the storage-service needs to be enabled");
}
#[cfg(feature = "storage-service")]
Some(storage) => {
let config = StorageConfig::from_str(storage)?;
Ok(StorageConfigProvider {
config,
_service_guard: None,
})
}
#[cfg(not(feature = "storage-service"))]
Some(storage) => {
let config = StorageConfig::from_str(storage)?;
Ok(StorageConfigProvider { config })
}
}
}
pub fn inner_storage_config(&self) -> &InnerStorageConfig {View on GitHub (pinned to 6c226ddcb3)
Solutions
- Pass an explicit --storage option (e.g. --storage rocksdb:./tmp/dev-net or a service: URL) so the provider never needs the embedded fallback
- Or build linera with the storage-service feature: cargo build --features storage-service (or install the official release binary, which includes it)
- Verify with `linera net up --help` that the binary understands the storage options you pass
Example fix
# before linera net up # binary lacks storage-service feature # after (option 1: explicit storage) linera net up --storage rocksdb:./tmp/dev-net # after (option 2: feature-enabled build) cargo build -p linera-service --features storage-service && ./target/debug/linera net up
Defensive patterns
Strategy: validation
Validate before calling
# Shell: detect the unsupported combination before running linera net up --help >/dev/null 2>&1 || exit 1 # always pass storage explicitly to avoid the feature-dependent fallback: linera net up --storage rocksdb:./tmp/dev-net
Prevention
- Pin test scripts to always pass --storage
- Build the linera binary with the storage-service feature if you rely on the embedded default
- Smoke-test `linera net up` in CI with the exact binary artifact you ship
When it happens
Trigger: Running `linera net up` with no --storage argument on a linera binary compiled without the storage-service feature (e.g. a custom minimal build or default-features = false dependency graph).
Common situations: Building linera-service from source with a trimmed feature set; downstream crates that reuse net-up tooling in tests; using an old or stripped binary that predates the storage-service integration.
Related errors
- Cannot apply default storage because the feature 'rocksdb' w
- Only allowed options are grpc and grpcs
- A Wasm runtime is required to load user applications. Please
- An Evm runtime is required to load user applications. Please
- Wallet already exists: {}
AI-assisted analysis of linera-io/linera-protocol@6c226ddcb3 (2026-08-22).
Data as JSON: /api/errors/ca27922aadc92725.
Report an issue: GitHub.