MuntashirAkon/AppManager · warning · FileNotFoundException
File not found in VirusTotal.
Error message
File not found in VirusTotal.
What it means
When VT reports code NotFoundError for the file, fetchFileReportOrScan attempts to initiate an upload/scan. If response.uploadFile() fails (scanning disabled or upload refused), it throws FileNotFoundException("File not found in VirusTotal."). It means the file has never been seen by VT and a new scan could not be started.
Solutions
- Enable file upload/scan in App Manager's scanner settings, or accept that unknown files cannot be reported.
- Check network connectivity and VT API permissions, then retry.
- Catch FileNotFoundException and inform the user the file is unknown to VT and could not be uploaded.
Example fix
// before
VtFileReport r = vt.fetchFileReportOrScan(file);
// after
try {
VtFileReport r = vt.fetchFileReportOrScan(file);
} catch (FileNotFoundException e) {
showNotice("File unknown to VirusTotal; upload disabled or failed.");
} Defensive patterns
Strategy: fallback
Validate before calling
// Ensure VT scanning/upload is enabled in settings before lookup: boolean uploadEnabled = settings.isVtUploadEnabled();
Try / catch
try {
VtFileReport r = vt.fetchFileReportOrScan(file);
} catch (FileNotFoundException e) {
showNotice("File not known to VirusTotal and upload disabled/failed.");
} Prevention
- Enable 'upload files to VirusTotal' if you want unknown files scanned.
- Inform users when a file has never been submitted to VT.
- Check connectivity before initiating uploads.
When it happens
Trigger: Calling fetchFileReportOrScan for a file VT has no record of (NotFoundError) while uploadFile() returns false because VT scanning is disabled in settings or the upload endpoint rejects the request.
Common situations: Scanning a private/never-uploaded APK with 'upload to scan' disabled in App Manager; VT account without upload permission; network restrictions blocking the upload.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/36de9f75b69372ec.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/scanner/vt/VirusTotal.java:126
if (responseReport.response != null && responseReport.response.hasReport()) {
// A report is found
response.onReportReceived(responseReport.response);
return;
}
// No report found: either failed or still queued
boolean queued = responseReport.response != null && !responseReport.response.hasReport();
if (!queued && !responseReport.shouldRetry()) {
// Retry is not available
throw new FileNotFoundException("Fetch error: " + responseReport.error);
}
// Scan or retry
VtError error = Objects.requireNonNull(responseReport.error);
boolean waitFirst = false;
if ("NotFoundError".equals(error.code)) {
// Initiate scan
if (!response.uploadFile()) {
// Scanning disabled
throw new FileNotFoundException("File not found in VirusTotal.");
}
waitFirst = true;
PowerManager.WakeLock wakeLock = CpuUtils.getPartialWakeLock("vt_upload");
wakeLock.acquire();
try {
long fileSize = file.length();
if (fileSize > 650_000_000) {
throw new IOException("APK is larger than 650 MB.");
}
boolean largeFile = fileSize > 32_000_000L;
response.onUploadInitiated();
String filename = file.getName();
ResponseV3<String> uploadResponse;
try (InputStream is = file.openInputStream()) {
uploadResponse = largeFile
? uploadLargeFile(filename, is)
: uploadFile(filename, is);
}View on GitHub (pinned to 0152f468fc)