{"record":{"id":"00c6ed09596e9e9c","repo":"Tencent/tinker","slug":"patch-lib-file-not-found-but-path-is-null-00c6ed","errorCode":null,"errorMessage":"patch lib file not found, but path is null!!!!","messagePattern":"patch lib file not found, but path is null!!!!","errorType":"exception","errorClass":"TinkerRuntimeException","httpStatus":null,"severity":"error","filePath":"tinker-android/tinker-android-lib/src/main/java/com/tencent/tinker/lib/tinker/TinkerLoadResult.java","lineNumber":261,"sourceCode":"                    ShareTinkerLog.e(TAG, \"patch lib file directory not found, warning why the path is null!!!!\");\n                    throw new TinkerRuntimeException(\"patch lib file directory not found, warning why the path is null!!!!\");\n\n                    // tinker.getLoadReporter().onLoadFileNotFound(null,\n                    //     ShareConstants.TYPE_LIBRARY, true);\n                }\n\n                break;\n            case ShareConstants.ERROR_LOAD_PATCH_VERSION_LIB_FILE_NOT_EXIST:\n                String libPath = ShareIntentUtil.getStringExtra(intentResult,\n                    ShareIntentUtil.INTENT_PATCH_MISSING_LIB_PATH);\n                if (libPath != null) {\n                    //we only pass one missing file and then we break\n                    ShareTinkerLog.e(TAG, \"patch lib file not found:%s\", libPath);\n                    tinker.getLoadReporter().onLoadFileNotFound(new File(libPath),\n                        ShareConstants.TYPE_LIBRARY, false);\n                } else {\n                    ShareTinkerLog.e(TAG, \"patch lib file not found, but path is null!!!!\");\n                    throw new TinkerRuntimeException(\"patch lib file not found, but path is null!!!!\");\n                    // tinker.getLoadReporter().onLoadFileNotFound(null,\n                    //     ShareConstants.TYPE_LIBRARY, false);\n                }\n                break;\n            case ShareConstants.ERROR_LOAD_PATCH_VERSION_DEX_CLASSLOADER_NULL:\n                ShareTinkerLog.e(TAG, \"patch dex load fail, classloader is null\");\n                break;\n            case ShareConstants.ERROR_LOAD_PATCH_VERSION_DEX_MD5_MISMATCH:\n                String mismatchPath = ShareIntentUtil.getStringExtra(intentResult,\n                    ShareIntentUtil.INTENT_PATCH_MISMATCH_DEX_PATH);\n                if (mismatchPath == null) {\n                    ShareTinkerLog.e(TAG, \"patch dex file md5 is mismatch, but path is null!!!!\");\n                    throw new TinkerRuntimeException(\"patch dex file md5 is mismatch, but path is null!!!!\");\n                } else {\n                    ShareTinkerLog.e(TAG, \"patch dex file md5 is mismatch: %s\", mismatchPath);\n                    tinker.getLoadReporter().onLoadFileMd5Mismatch(new File(mismatchPath),\n                        ShareConstants.TYPE_DEX);\n                }","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/Tencent/tinker/blob/1b7ea02c239840f563ea64fb5bd286eb98d4011e/tinker-android/tinker-android-lib/src/main/java/com/tencent/tinker/lib/tinker/TinkerLoadResult.java#L243-L279","documentation":"TinkerLoadResult's handler for ERROR_LOAD_PATCH_VERSION_LIB_FILE_NOT_EXIST reads the missing native library path from INTENT_PATCH_MISSING_LIB_PATH; if the extra is null it throws this TinkerRuntimeException because it cannot identify which .so file vanished. Like the dex twin (error 142) it is an internal-consistency guard, not a normal user-facing failure.","triggerScenarios":"Result code ERROR_LOAD_PATCH_VERSION_LIB_FILE_NOT_EXIST arrives without INTENT_PATCH_MISSING_LIB_PATH set. Occurs when an individual lib/*.so inside the versioned patch directory is deleted after installation or when loader and lib versions disagree on extras.","commonSituations":"Device cleaner / root tool removing .so files; patch containing only some ABIs while the device expects another; loader vs library version skew.","solutions":["cleanPatch() and re-apply the patch.","Make sure the patch package includes .so files for every ABI your base APK ships (tinker only patches libs present in both).","Pin all tinker artifacts to one version.","Report recurring cases upstream with the ShareTinkerLog trace."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (TinkerRuntimeException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"lib file not found, but path is null\")) {\n        Tinker.with(app).cleanPatch();\n    } else throw e;\n}","preventionTips":["Ship all base-APK ABIs in the patch","Use one tinker release everywhere"],"tags":["tinker","hotpatch","android","native-lib","missing-intent-extra"],"backgroundTag":null,"analyzedSha":"1b7ea02c239840f563ea64fb5bd286eb98d4011e","analyzedAt":"2026-08-14T15:16:52.110Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}