Errors when downloading inbox
Closed this issue · 3 comments
road2react commented
Getting errors when downloading inbox:
Error: execute command
Caused by:
0: download mail
1: decode body
2: decompress
3: decompression
4: provided output is too small for the decompressed data, actual 50154, expected 50172
Error: execute command
Caused by:
0: download mail
1: decode body
2: decompress
3: decompression
4: expected another byte, found none
Command used: cargo run --release -- download --folder Inbox --path Inbox
crepererum commented
Looks like I misunderstood something about the compression. Could you perform the following steps to help me investigate?
- figure out affected email: I've just merged #170 which should now print the UI URL whenever a download / decode fails
- use UI: try to export that URL via the UI as EML. Does that work?
road2react commented
The email accessed using the link is exported successfully using the web ui
Email has an empty body
road2react commented
I changed the code in compression.rs
to
use anyhow::{Context, Result};
pub(crate) fn decompress_value(v: &[u8]) -> Result<Vec<u8>> {
if v.is_empty() {
return Ok(vec![]);
}
lz4_flex::block::decompress(v, v.len() * 12).context("decompression")
}
and now it is working correctly.