bevyengine/bevy · error · AssetReaderError

Encountered an I/O error while loading asset: {0}

Error message

Encountered an I/O error while loading asset: {0}

What it means

AssetReaderError::Io: an underlying std::io::Error occurred while the asset reader was opening/reading the asset bytes (permissions, interrupted read, device error, etc.). The error is shared via Arc so it can surface in multiple loading futures.

Source

Thrown at crates/bevy_asset/src/io/mod.rs:56

    task::{Context, Poll},
};
use futures_io::{AsyncRead, AsyncSeek, AsyncWrite};
use futures_lite::Stream;
use std::{
    io::SeekFrom,
    path::{Path, PathBuf},
};
use thiserror::Error;

/// Errors that occur while loading assets.
#[derive(Error, Debug, Clone)]
pub enum AssetReaderError {
    /// Path not found.
    #[error("Path not found: {}", _0.display())]
    NotFound(PathBuf),

    /// Encountered an I/O error while loading an asset.
    #[error("Encountered an I/O error while loading asset: {0}")]
    Io(Arc<std::io::Error>),

    /// The HTTP request completed but returned an unhandled [HTTP response status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status).
    /// - If the request returns a 404 error, expect [`AssetReaderError::NotFound`].
    /// - If the request fails before getting a status code (e.g. request timeout, interrupted connection, etc), expect [`AssetReaderError::Io`].
    #[error("Encountered HTTP status {0:?} when loading asset")]
    HttpError(u16),
}

impl PartialEq for AssetReaderError {
    /// Equality comparison for `AssetReaderError::Io` is not full (only through `ErrorKind` of inner error)
    #[inline]
    fn eq(&self, other: &Self) -> bool {
        match (self, other) {
            (Self::NotFound(path), Self::NotFound(other_path)) => path == other_path,
            (Self::Io(error), Self::Io(other_error)) => error.kind() == other_error.kind(),
            (Self::HttpError(code), Self::HttpError(other_code)) => code == other_code,
            _ => false,

View on GitHub (pinned to 396ca72708)

Solutions

  1. Inspect the wrapped io::Error kind/message for the filesystem cause
  2. Fix file permissions or path accessibility for the asset root
  3. Retry the load: transient io failures (especially on network/processed sources) often resolve on a subsequent attempt
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/bevy_asset/src/io/mod.rs:56 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20). Data as JSON: /api/errors/430cb132f6fbf68a. Report an issue: GitHub.