{"record":{"id":"3ad3ff0b3182e507","repo":"Tencent/tinker","slug":"can-t-get-the-right-intent-return-code","errorCode":null,"errorMessage":"can't get the right intent return code","messagePattern":"can't get the right intent return code","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":149,"sourceCode":"                    errorCode = ShareConstants.ERROR_LOAD_EXCEPTION_DEX;\n                    break;\n                case ShareConstants.ERROR_LOAD_PATCH_VERSION_RESOURCE_LOAD_EXCEPTION:\n                    errorCode = ShareConstants.ERROR_LOAD_EXCEPTION_RESOURCE;\n                    break;\n                case ShareConstants.ERROR_LOAD_PATCH_UNCAUGHT_EXCEPTION:\n                    errorCode = ShareConstants.ERROR_LOAD_EXCEPTION_UNCAUGHT;\n                    break;\n                default:\n                    break;\n            }\n            tinker.getLoadReporter().onLoadException(exception, errorCode);\n            return false;\n        }\n\n        switch (loadCode) {\n            case ShareConstants.ERROR_LOAD_GET_INTENT_FAIL:\n                ShareTinkerLog.e(TAG, \"can't get the right intent return code\");\n                throw new TinkerRuntimeException(\"can't get the right intent return code\");\n            case ShareConstants.ERROR_LOAD_DISABLE:\n                ShareTinkerLog.w(TAG, \"tinker is disable, just return\");\n                break;\n            // case ShareConstants.ERROR_LOAD_PATCH_NOT_SUPPORTED:\n            //     ShareTinkerLog.w(TAG, \"tinker is not supported, just return\");\n            //     break;\n            case ShareConstants.ERROR_LOAD_PATCH_DIRECTORY_NOT_EXIST:\n            case ShareConstants.ERROR_LOAD_PATCH_INFO_NOT_EXIST:\n                ShareTinkerLog.w(TAG, \"can't find patch file, is ok, just return\");\n                break;\n\n            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\");","sourceCodeStart":131,"sourceCodeEnd":167,"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#L131-L167","documentation":"Error \"can't get the right intent return code\" thrown in Tencent/tinker.","triggerScenarios":"Thrown at tinker-android/tinker-android-lib-no-op/src/main/java/com/tencent/tinker/lib/tinker/TinkerLoadResult.java:149 when the library encounters an invalid state.","commonSituations":"Thrown in TinkerLoadResult.parseTinkerResult when the load code equals ERROR_LOAD_GET_INTENT_FAIL, meaning the result intent from the patch service lacked a valid return code. Often caused by the patch process crashing before posting its result.","solutions":["Verify the patch service result intent contains ShareIntentUtil.INTENT_RETURN_CODE before reading it.","Check that TinkerPatchService ran and delivered a result intent; a missing intent means the patch process died or was never started."],"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"}