flowable/flowable-engine · error · FlowableException
Could not completely read inputstream
Error message
Could not completely read inputstream
What it means
Thrown by InputStreamSource.getBytesFromInputStream when the stream ended before the expected number of bytes was read (offset < bytes.length). This indicates a truncated stream: the byte-count expectation did not match the actual stream content. Note the message has no suffix detail.
Solutions
- Verify the source resource is complete and not truncated (re-download/re-upload it)
- Check network stability if the stream comes from a remote URL/repository
- Compare the resource's declared size with the bytes actually available
- Regenerate or redeploy the corrupted artifact
Defensive patterns
Strategy: validation
Validate before calling
long expected = resource.length();
long actual = Files.size(Paths.get(path));
if (expected != actual) throw new IllegalStateException("truncated resource: " + path); Try / catch
try {
InputStream is = source.getInputStream();
} catch (FlowableException e) {
if (e.getMessage().contains("completely read")) {
throw new IllegalStateException("artifact truncated — re-upload the resource");
}
} Prevention
- Verify checksums/sizes of deployment artifacts before upload
- Use stable connections when reading remote resources
- Re-download any resource suspected of partial transfer
When it happens
Trigger: The wrapped stream reports fewer bytes than the buffer expected — stream truncated at source (partial download, early EOF) or length metadata larger than actual data.
Common situations: Corrupted or partially uploaded deployment artifacts; network interruptions reading remote resources; reading streams whose available length was miscomputed.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Could not read from inputstream
- couldn't read input stream
- An error occurs creating a web-service client for WSDL '" +…
- Bundle cannot be generated
- byte array for resource
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/16bfdeab399443a5.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/util/io/InputStreamSource.java:69
}
@Override
public String toString() {
return "InputStream";
}
public byte[] getBytesFromInputStream(InputStream inStream) throws IOException {
long length = inStream.available();
byte[] bytes = new byte[(int) length];
int offset = 0;
int numRead = 0;
while (offset < bytes.length && (numRead = inStream.read(bytes, offset, bytes.length - offset)) >= 0) {
offset += numRead;
}
if (offset < bytes.length) {
throw new FlowableException("Could not completely read inputstream ");
}
// Close the input stream and return bytes
inStream.close();
return bytes;
}
}
View on GitHub (pinned to d6d39ce1c6)