{"record":{"id":"d77c34a5753ba917","repo":"Tencent/tinker","slug":"error-load-patch-version-file-not-exist-but-file","errorCode":null,"errorMessage":"error load patch version file not exist, but file is null","messagePattern":"error load patch version file not exist, but file is null","errorType":"exception","errorClass":"TinkerRuntimeException","httpStatus":null,"severity":"error","filePath":"tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/tinker/TinkerLoadResult.java","lineNumber":179,"sourceCode":"            case ShareConstants.ERROR_LOAD_PATCH_INFO_CORRUPTED:\n                ShareTinkerLog.e(TAG, \"path info corrupted\");\n                tinker.getLoadReporter().onLoadPatchInfoCorrupted(oldVersion, newVersion, patchInfoFile);\n                break;\n\n            case ShareConstants.ERROR_LOAD_PATCH_INFO_BLANK:\n                ShareTinkerLog.e(TAG, \"path info blank, wait main process to restart\");\n                break;\n\n            case ShareConstants.ERROR_LOAD_PATCH_VERSION_DIRECTORY_NOT_EXIST:\n                ShareTinkerLog.e(TAG, \"patch version directory not found, current version:%s\", currentVersion);\n                tinker.getLoadReporter().onLoadFileNotFound(patchVersionDirectory,\n                    ShareConstants.TYPE_PATCH_FILE, true);\n                break;\n\n            case ShareConstants.ERROR_LOAD_PATCH_VERSION_FILE_NOT_EXIST:\n                ShareTinkerLog.e(TAG, \"patch version file not found, current version:%s\", currentVersion);\n                if (patchVersionFile == null) {\n                    throw new TinkerRuntimeException(\"error load patch version file not exist, but file is null\");\n                }\n                tinker.getLoadReporter().onLoadFileNotFound(patchVersionFile,\n                    ShareConstants.TYPE_PATCH_FILE, false);\n                break;\n            case ShareConstants.ERROR_LOAD_PATCH_PACKAGE_CHECK_FAIL:\n                ShareTinkerLog.i(TAG, \"patch package check fail\");\n                if (patchVersionFile == null) {\n                    throw new TinkerRuntimeException(\"error patch package check fail , but file is null\");\n                }\n                int errorCode = intentResult.getIntExtra(ShareIntentUtil.INTENT_PATCH_PACKAGE_PATCH_CHECK, ShareConstants.ERROR_LOAD_GET_INTENT_FAIL);\n                tinker.getLoadReporter().onLoadPackageCheckFail(patchVersionFile, errorCode);\n                break;\n            case ShareConstants.ERROR_LOAD_PATCH_VERSION_DEX_DIRECTORY_NOT_EXIST:\n                if (dexDirectory != null) {\n                    ShareTinkerLog.e(TAG, \"patch dex file directory not found:%s\", dexDirectory.getAbsolutePath());\n                    tinker.getLoadReporter().onLoadFileNotFound(dexDirectory,\n                        ShareConstants.TYPE_DEX, true);\n                } else {","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/Tencent/tinker/blob/1b7ea02c239840f563ea64fb5bd286eb98d4011e/tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/tinker/TinkerLoadResult.java#L161-L197","documentation":"Error \"error load patch version file not exist, but file is null\" thrown in Tencent/tinker.","triggerScenarios":"Thrown at tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/tinker/TinkerLoadResult.java:179 when the library encounters an invalid state.","commonSituations":"Thrown in TinkerLoadResult.parseTinkerResult when the load code reports the patch version file is missing but the patchVersionFile reference is unexpectedly null. Indicates inconsistent patch state, e.g. patch directory deleted mid-load.","solutions":["Ensure the patch version file (patch.info) exists under the patch version directory before loading.","Handle ERROR_LOAD_PATCH_VERSION_FILE_NOT_EXIST via LoadReporter.onLoadFileNotFound instead of letting the null file propagate."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1b7ea02c239840f563ea64fb5bd286eb98d4011e","analyzedAt":"2026-08-14T15:16:52.110Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}