MuntashirAkon/AppManager · error · FileNotFoundException
Fetch error:
Error message
Fetch error:
What it means
VirusTotal.fetchFileReportOrScan fetches a file report and, when no report exists and the response is neither queued nor retryable, throws FileNotFoundException("Fetch error: " + responseReport.error). It signals the VT lookup definitively failed (e.g. quota/auth errors) with no retry path.
Solutions
- Read the appended responseReport.error in the message to identify the VT error code and fix the cause (API key, quota).
- Verify the VirusTotal API key in App Manager settings is valid.
- Retry later if the error indicates quota exhaustion; consider a premium key for higher limits.
- Catch FileNotFoundException around the call and show the error instead of crashing the scanner flow.
Example fix
// before
VtFileReport report = vt.fetchFileReportOrScan(file); // throws
// after
try {
VtFileReport report = vt.fetchFileReportOrScan(file);
} catch (FileNotFoundException e) {
Log.w(TAG, "VT lookup failed: " + e.getMessage());
} Defensive patterns
Strategy: try-catch
Validate before calling
// Verify the API key before scanning:
if (apiKey == null || apiKey.isEmpty()) {
throw new IllegalStateException("VirusTotal API key not configured.");
} Try / catch
try {
VtFileReport r = vt.fetchFileReportOrScan(file);
} catch (FileNotFoundException e) {
Log.w(TAG, "VT fetch failed: " + e.getMessage()); // message contains VT error
} Prevention
- Keep a valid VirusTotal API key configured.
- Watch for quota exhaustion and back off instead of retrying immediately.
- Handle non-retryable VT errors distinctly from transient ones.
When it happens
Trigger: Calling fetchFileReportOrScan when the VT API returns a non-recoverable error (invalid API key, exceeded quota, request refused) such that responseReport.shouldRetry() is false and the report is not queued.
Common situations: Expired or missing VirusTotal API key; daily/public-API rate quota exhausted; VT service error responses.
Related errors
- File not found in VirusTotal.
- Scan error:
- ADB daemon not running.
- APK is larger than 650 MB.
- Could not connect to ADB.
AI-assisted analysis of MuntashirAkon/AppManager@0152f468fc (2026-09-12).
Data as JSON: /api/errors/5828c71d7f8a4367.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/io/github/muntashirakon/AppManager/scanner/vt/VirusTotal.java:117
public VirusTotal(@NonNull String apiKey) {
mApiKey = Objects.requireNonNull(apiKey);
}
public void fetchFileReportOrScan(@NonNull Path file,
@NonNull String checksum,
@NonNull FullScanResponseInterface response)
throws IOException {
ResponseV3<VtFileReport> responseReport = fetchFileReport(checksum);
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.");
}View on GitHub (pinned to 0152f468fc)