{"record":{"id":"a45c8bc49f9785e4","repo":"linera-io/linera-protocol","slug":"blobsnotfound-a45c8b","errorCode":"BlobsNotFound","errorMessage":"ExecutionError::BlobsNotFound(missing_blobs)","messagePattern":"ExecutionError::BlobsNotFound\\(missing_blobs\\)","errorType":"exception","errorClass":"ExecutionError","httpStatus":null,"severity":"error","filePath":"linera-execution/src/system.rs","lineNumber":1186,"sourceCode":"    async fn check_bytecode_blobs(\n        &self,\n        module_id: &ModuleId,\n        txn_tracker: &TransactionTracker,\n    ) -> Result<Vec<BlobId>, ExecutionError> {\n        let blob_ids = module_id.bytecode_blob_ids();\n\n        let mut missing_blobs = Vec::new();\n        for blob_id in &blob_ids {\n            // First check if blob is present in created_blobs\n            if txn_tracker.created_blobs().contains_key(blob_id) {\n                continue; // Blob found in created_blobs, it's ok\n            }\n            // If not in created_blobs, check storage\n            if !self.context().extra().contains_blob(*blob_id).await? {\n                missing_blobs.push(*blob_id);\n            }\n        }\n        ensure!(\n            missing_blobs.is_empty(),\n            ExecutionError::BlobsNotFound(missing_blobs)\n        );\n\n        Ok(blob_ids)\n    }\n}\n","sourceCodeStart":1168,"sourceCodeEnd":1194,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-execution/src/system.rs#L1168-L1194","documentation":"When an application is created, the system loads the ApplicationDescription blob and then verifies that every bytecode blob of the referenced module (contract and service bytecode for each bytecode type) is available — either published in the same transaction's created blobs or present in the node's blob storage. This error carries the list of missing BlobIds: the bytecode needed to run the application does not exist where the executor looked for it.","triggerScenarios":"Executing SystemOperation::CreateApplication whose ModuleId references bytecode blobs that were never published or not propagated to this chain/validator; a module_id computed over different bytecode bytes than what was actually uploaded; blobs removed by pruning or garbage collection; an application description copied from another network (devnet vs testnet) whose blobs were never uploaded here.","commonSituations":"Publishing a module on one network and creating the application against another; a stale cached module_id after recompiling the WASM (bytes change, so the content hash changes); blob pruning on long-running testnets; replaying an old CreateApplication transaction without its companion PublishModule data.","solutions":["Publish the module bytecode first (SystemOperation::PublishModule, or linera publish-module) so the listed blob IDs exist in storage, then create the application.","Recompute the ModuleId from the exact bytecode you upload — the ID hashes the contract and service bytes, so any rebuild or recompile changes it.","If blobs were pruned or lost, re-upload the missing blobs identified by the BlobIds in the error payload, then retry creation.","Confirm client and validators point at the same network and share blob storage."],"exampleFix":"# before: create an app whose module blobs are unknown to this network\nlinera create-application $STALE_MODULE_ID --json-argument '{...}'\n\n# after: publish the bytecode blobs first, then create from the returned module ID\nlinera publish-module ./target/wasm32-unknown-unknown/release/my_app.wasm\n# use the freshly printed ModuleId; its bytecode blobs now exist in storage\nlinera create-application $NEW_MODULE_ID --json-argument '{...}'","handlingStrategy":"validation","validationCode":"// Before CreateApplication: verify every bytecode blob of the module exists\nfor blob_id in module_id.bytecode_blob_ids() {\n    if !storage.contains_blob(&blob_id).await? {\n        return Err(anyhow!(\n            \"missing blob {blob_id}: publish the module first\"\n        ));\n    }\n}","typeGuard":"fn is_blobs_not_found(e: &ExecutionError) -> bool {\n    matches!(e, ExecutionError::BlobsNotFound(_))\n}","tryCatchPattern":"match result {\n    Err(ExecutionError::BlobsNotFound(missing)) => {\n        // `missing` lists the exact BlobIds that are absent:\n        // publish/re-upload those blobs, then retry the creation.\n    }\n    Err(e) => return Err(e.into()),\n    Ok(value) => { /* ... */ }\n}","preventionTips":["Always publish a module's bytecode blobs before creating applications from its ModuleId.","Derive the ModuleId from the exact bytes you upload; any recompile changes the hashes and invalidates old IDs.","Keep module IDs per-network (devnet/testnet) in configuration to avoid cross-network references.","Handle pruning: re-publish blobs listed as missing rather than retrying the creation unchanged."],"tags":["linera","blob","bytecode","module","publish","application-creation"],"backgroundTag":"blob-not-found","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}