{"record":{"id":"9a4009ee741bf788","repo":"MuntashirAkon/AppManager","slug":"backup-failed-for","errorCode":null,"errorMessage":"Backup failed for ","messagePattern":"Backup failed for ","errorType":"exception","errorClass":"BackupException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/io/github/muntashirakon/AppManager/backup/convert/OABConverter.java","lineNumber":374,"sourceCode":"                        if (tmpFile != null) {\n                            // Copy from the temporary file\n                            try (FileInputStream fis = new FileInputStream(tmpFile)) {\n                                IoUtils.copy(fis, tos);\n                            } finally {\n                                FileCache.getGlobalFileCache().delete(tmpFile);\n                            }\n                        }\n                        tos.closeArchiveEntry();\n                    }\n                    tos.finish();\n                }\n                // Encrypt backups\n                Path[] newBackupFiles = mBackupItem.encrypt(sos.getFiles().toArray(new Path[0]));\n                for (Path file : newBackupFiles) {\n                    mChecksum.add(file.getName(), DigestUtils.getHexDigest(mDestMetadata.info.checksumAlgo, file));\n                }\n            } catch (IOException e) {\n                throw new BackupException(\"Backup failed for \" + dataFile, e);\n            }\n        }\n    }\n}\n","sourceCodeStart":356,"sourceCodeEnd":379,"githubUrl":"https://github.com/MuntashirAkon/AppManager/blob/0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5/app/src/main/java/io/github/muntashirakon/AppManager/backup/convert/OABConverter.java#L356-L379","documentation":"OABConverter.backupData wraps any IOException raised during the per-data-file backup pipeline (zip extraction, tar creation, splitting, checksum, encryption) into BackupException('Backup failed for <dataFile>'). It marks which source data file the pipeline failed on; the cause holds the real error.","triggerScenarios":"Any IOException while streaming the decrypted APK through ZipInputStream into a (possibly compressed, split) tar output, computing checksums, or encrypting the produced backup files via mBackupItem.encrypt.","commonSituations":"Insufficient free space in the backup directory triggering split/write failures; corrupted source zip streams; destination storage unmounted or full; encryption key issues surfacing as IO errors.","solutions":["Free up storage space in the destination backup location","Check the cause stack trace to identify which pipeline stage (zip read, tar write, encrypt) failed","Verify the destination path is writable and the storage is mounted","Retry conversion after replacing a corrupted source data file"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// preflight before conversion\nif (new File(mBackupItem.getUnencryptedBackupPath()).getUsableSpace() < requiredBytes) {\n    throw new IOException(\"Not enough free space for backup\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    converter.convert(...);\n} catch (BackupException e) {\n    Throwable cause = e.getCause();\n    if (cause instanceof IOException && cause.getMessage() != null && cause.getMessage().contains(\"No space\")) {\n        // free storage and retry\n    }\n}","preventionTips":["Check free disk space before starting conversion","Validate source archives are readable end-to-end","Ensure destination storage is mounted and writable","Retry transient I/O failures once before aborting"],"tags":["android","backup","io","tar","zip"],"backgroundTag":"file-write-failed","analyzedSha":"0152f468fc9463ee02dc2ca83f6fe4989a2c4ca5","analyzedAt":"2026-09-12T14:03:37.243Z","contentChangedAt":"2026-09-12T14:03:37.243Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}