Zackriya-Solutions/meetily · error · anyhow::Error

Progress byte count overflow

Error message

Progress byte count overflow

What it means

Like the streamed counter, `bytes_since_report` (used to throttle progress-event emission) is advanced with a checked_add per chunk. An overflow triggers this defensive error. It is an internal invariant guard on progress-accounting state and should be unreachable with correct loop logic.

Source

Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:1064

                let next_confirmed_bytes = confirmed_bytes
                    .checked_add(chunk_bytes)
                    .ok_or_else(|| anyhow!("Progress overflow while downloading {}", artifact.filename))?;
                if next_confirmed_bytes > total_bytes {
                    return Err(anyhow!("Download progress exceeds the catalog total"));
                }

                writer
                    .write_all(&chunk)
                    .await
                    .map_err(|error| anyhow!("Failed to write {}: {}", artifact.filename, error))?;
                artifact_bytes = next_artifact_bytes;
                confirmed_bytes = next_confirmed_bytes;
                streamed_bytes = streamed_bytes
                    .checked_add(chunk_bytes)
                    .ok_or_else(|| anyhow!("Streamed byte count overflow"))?;
                bytes_since_report = bytes_since_report
                    .checked_add(chunk_bytes)
                    .ok_or_else(|| anyhow!("Progress byte count overflow"))?;

                let progress = Self::in_flight_progress(confirmed_bytes, total_bytes, 0.0);
                let elapsed = last_report.elapsed();
                if progress.percent > last_percent
                    || elapsed >= Duration::from_millis(500)
                    || artifact_bytes == artifact.exact_bytes
                {
                    let speed_mbps = if elapsed.as_secs_f64() > 0.0 {
                        bytes_since_report as f64 / (1024.0 * 1024.0) / elapsed.as_secs_f64()
                    } else {
                        0.0
                    };
                    if let Some(callback) = &progress_callback {
                        callback(Self::in_flight_progress(
                            confirmed_bytes,
                            total_bytes,
                            speed_mbps,
                        ));

View on GitHub (pinned to a2cb62e827)

Solutions

  1. Restart the app and retry the download to clear corrupted state.
  2. Verify the loop resets bytes_since_report after emitting a progress report (after the 500ms/percent-change threshold branch).
  3. File a bug with logs if reproducible; it is not caused by user configuration.

Example fix

// before: bytes_since_report accumulated without reset on emit
if elapsed >= Duration::from_millis(500) {
    emit_progress(progress);
}
// after: reset after emitting
if elapsed >= Duration::from_millis(500) {
    emit_progress(progress);
    bytes_since_report = 0;
}
Defensive patterns

Strategy: try-catch

Try / catch

// Same posture as 52: internal invariant — fail fast with reset and bug report
if let Err(e) = result {
    if e.to_string().contains("Progress byte count overflow") {
        log::error!("Progress accounting overflow — bytes_since_report not reset?");
        reset_progress_state();
        return Err(e);
    }
}

Prevention

When it happens

Trigger: `bytes_since_report.checked_add(chunk_bytes)` returns None in the chunk loop — corrupted progress-accounting state or an unbounded accumulation bug in the reporting path.

Common situations: Effectively never seen in normal use; would point to a code bug where bytes_since_report is not reset after each progress report or the loop never terminates.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12). Data as JSON: /api/errors/205a5d9813d3a23b. Report an issue: GitHub.