{"record":{"id":"1854c37cae5fdc76","repo":"bevyengine/bevy","slug":"encountered-an-io-error-while-loading-asset-0","errorCode":null,"errorMessage":"encountered an io error while loading asset: {0}","messagePattern":"encountered an io error while loading asset: (.+?)","errorType":"exception","errorClass":"AssetWriterError","httpStatus":null,"severity":"error","filePath":"crates/bevy_asset/src/io/mod.rs","lineNumber":325,"sourceCode":"    fn read_meta_bytes<'a>(\n        &'a self,\n        path: &'a Path,\n    ) -> BoxedFuture<'a, Result<Vec<u8>, AssetReaderError>> {\n        Box::pin(Self::read_meta_bytes(self, path))\n    }\n}\n\n/// A convenience type for an [`AsyncWrite`] object plus the traits it needs to satisfy.\npub type Writer = dyn AsyncWrite + Unpin + Send + Sync;\n\n/// A convenience type for a stream of pathnames plus the traits it needs to satisfy.\npub type PathStream = dyn Stream<Item = PathBuf> + Unpin + Send;\n\n/// Errors that occur while loading assets.\n#[derive(Error, Debug)]\npub enum AssetWriterError {\n    /// Encountered an I/O error while loading an asset.\n    #[error(\"encountered an io error while loading asset: {0}\")]\n    Io(#[from] std::io::Error),\n}\n\n/// Performs write operations on an asset storage. [`AssetWriter`] exposes a \"virtual filesystem\"\n/// API, where asset bytes and asset metadata bytes are both stored and accessible for a given\n/// `path`. This trait is not object safe, if needed use a dyn [`ErasedAssetWriter`] instead.\n///\n/// This trait defines asset-agnostic mechanisms to write bytes to a storage system.\n/// For the per-asset-type saving/loading logic, see [`AssetSaver`](crate::saver::AssetSaver) and [`AssetLoader`](crate::loader::AssetLoader).\n///\n/// For a complementary version of this trait that can read assets from storage, see [`AssetReader`].\npub trait AssetWriter: Send + Sync + 'static {\n    /// Writes the full asset bytes at the provided path.\n    fn write<'a>(\n        &'a self,\n        path: &'a Path,\n    ) -> impl ConditionalSendFuture<Output = Result<Box<Writer>, AssetWriterError>>;\n    /// Writes the full asset meta bytes at the provided path.","sourceCodeStart":307,"sourceCodeEnd":343,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_asset/src/io/mod.rs#L307-L343","documentation":"AssetWriterError::Io: the asset writer encountered an underlying std::io::Error while writing asset bytes or metadata (disk full, permissions, interrupted write, etc.). The write to the asset destination failed at the OS level.","triggerScenarios":"Thrown at crates/bevy_asset/src/io/mod.rs:325 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped io::Error for the concrete cause","Free disk space / fix permissions on the asset output directory","Retry the write: transient io failures during processing may succeed on reprocessing"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}