Tencent / tinker

Tinker is a hot-fix solution library for Android, it supports dex, library and resources update without reinstall apk.
Other
17.17k stars 3.34k forks source link

多次补丁仅仅第一次成功,但是卸载重装每个补丁都可以合成应用成功。 #1329

Closed MoYuFly closed 4 years ago

MoYuFly commented 4 years ago

异常类型:多次补定只有第一次能成功,后面都是下载成功,合成,应用不成功,(都是基于基准包打的补丁,而且补丁都是没有问题的,因为卸载基准包,再次安装,上述问题不存在)

手机型号:小米8,多亲2s

手机系统版本:安卓9.0

tinker版本:如:1.9.13

gradle版本:如:3.0.0

是否使用热更新SDK: TinkerPatch SDK

系统:如:win10

堆栈/日志: 2020-01-09 17:56:18.899 24503-24503/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true 2020-01-09 17:56:18.901 24503-24503/? D/Tinker.TinkerInternals: same fingerprint:Xiaomi/dipper/dipper:9/PKQ1.180729.001/V11.0.4.0.PEACNXM:user/release-keys 2020-01-09 17:56:18.902 24503-24503/? W/Tinker.TinkerInternals: getSafeModeCount: preferName:tinker_own_config_com.szmg.zhinews count:0 2020-01-09 17:56:18.907 24503-24503/? W/Tinker.TinkerInternals: setSafeModeCount: preferName:tinker_own_config_com.szmg.zhinews count:1 2020-01-09 17:56:18.907 24503-24503/? W/Tinker.TinkerDexLoader: there is no dex to load 2020-01-09 17:56:18.908 24503-24503/? W/Tinker.ResourcePatcher: try to clear typedArray cache! 2020-01-09 17:56:18.909 24503-24503/? I/Tinker.ResourcePatcher: checkResUpdate success, found test resource assets file only_use_to_test_tinker_resource.txt 2020-01-09 17:56:18.909 24503-24503/? I/Tinker.ResourceLoader: monkeyPatchExistingResources resource file:/data/user/0/com.szmg.zhinews/tinker/patch-4b109c59/res/resources.apk, use time: 2 2020-01-09 17:56:18.909 24503-24503/? I/Tinker.IncrementCompMgr: package has no incremental component meta, skip init. 2020-01-09 17:56:18.909 24503-24503/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok! 2020-01-09 17:56:18.909 24503-24503/? D/Tinker.DefaultAppLike: onBaseContextAttached: 2020-01-09 17:56:18.912 24503-24503/? W/Tinker.TinkerInternals: setSafeModeCount: preferName:tinker_own_config_com.szmg.zhinews count:0 2020-01-09 17:56:18.912 24503-24503/? I/Tinker.ReflectApp: with app application from manifest applicationName:com.szmg.zhinewspush.TheApp 2020-01-09 17:56:18.913 24503-24503/? I/Tinker.ReflectApp: replaceApplicationLike delegateClass:class com.tinkerpatch.sdk.loader.TinkerPatchApplicationLike 2020-01-09 17:56:18.918 24503-24503/? I/Tinker.ComponentHotplug: method install() is not invoked, ignore ensuring operations. 2020-01-09 17:56:18.918 24503-24503/? D/Tinker.DefaultAppLike: onCreate 2020-01-09 17:56:18.972 24503-24503/? I/Tinker.ServerUtils: with app key from manifest appKey:d144c87e7764f61f 2020-01-09 17:56:18.972 24503-24503/? I/Tinker.ServerUtils: with app version from manifest appVersion:4.0 2020-01-09 17:56:18.973 24503-24503/? I/Tinker.VersionInfo: readVersionInfo file path:/data/user/0/com.szmg.zhinews/tinker_server/d144c87e7764f61f_version.info, appVersion: 4.0, uuid:c54b1b9e-43a6-4ab2-9576-5c0a4e4d1ad0, abi:arm64-v8a, patchVersion:2, patchMd5:52b9e9aa1153f1bf210253454a909a7f, grayValue:5, crashTimes:0, retryTimes:2, applySuccess:0, patchSuccess:0 2020-01-09 17:56:18.978 24503-24503/? I/Tinker.Debugger: debugger attached 2020-01-09 17:56:18.979 24503-24503/? D/Tinker.Debugger: getBoolean(): key=.com.tinker.debugtool.debug, value=true 2020-01-09 17:56:18.979 24503-24503/? I/Tinker.ServerClient: installTinkerServer, debug value: true, appVersion: 4.0, appKey: d144c87e7764f61f 2020-01-09 17:56:18.981 24503-24503/? W/Tinker.Tinker: tinker patch directory: /data/user/0/com.szmg.zhinews/tinker 2020-01-09 17:56:18.981 24503-24503/? I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.9.13 2020-01-09 17:56:18.981 24503-24503/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0, process name:com.szmg.zhinews, main process:true, systemOTA:false, fingerPrint:Xiaomi/dipper/dipper:9/PKQ1.180729.001/V11.0.4.0.PEACNXM:user/release-keys, oatDir:odex, useInterpretMode:false 2020-01-09 17:56:18.981 24503-24503/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:4b109c59c9d4d978912600dc2116dd11, newVersion:4b109c59c9d4d978912600dc2116dd11, current:4b109c59c9d4d978912600dc2116dd11 2020-01-09 17:56:18.982 24503-24503/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success 2020-01-09 17:56:18.982 24503-24503/? I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/com.szmg.zhinews/tinker, code: 0, cost: 18ms 2020-01-09 17:56:18.982 24503-24503/? I/Tinker.TinkerPatch: Init TinkerPatch sdk success, version:1.2.13 2020-01-09 17:56:19.135 24503-24503/? W/Tinker.UpgradePatchRetry: onPatchRetryLoad patch file: /data/user/0/com.szmg.zhinews/tinker_temp/temp.apk is not exist, just return

2020-01-09 17:56:19.137 24503-24503/? E/Tinker.ReportUtil: checkTinkerApplySuccess, current patch md5:52b9e9aa1153f1bf210253454a909a7f is not equal with tinker version 4b109c59c9d4d978912600dc2116dd11

2020-01-09 17:56:19.137 24503-24503/? W/Tinker.ClientImpl: [retryAllReportFails], there is no fail report, just return 2020-01-09 17:56:19.142 24503-24503/? I/Tinker.UrlConnectionFetcher: loadData from url: http://q.tinkerpatch.com/dev/d144c87e7764f61f/4.0?d=c54b1b9e-43a6-4ab2-9576-5c0a4e4d1ad0&v=1578563779141, method:GET, body:null 2020-01-09 17:56:19.174 24556-24556/? W/Tinker.TinkerLoader: tryLoadPatchFiles:isEnabledForResource:true 2020-01-09 17:56:19.176 24556-24556/? D/Tinker.TinkerInternals: same fingerprint:Xiaomi/dipper/dipper:9/PKQ1.180729.001/V11.0.4.0.PEACNXM:user/release-keys 2020-01-09 17:56:19.177 24556-24556/? W/Tinker.TinkerInternals: getSafeModeCount: preferName:tinker_own_config_com.szmg.zhinews:pushcore count:0 2020-01-09 17:56:19.180 24556-24556/? W/Tinker.TinkerInternals: setSafeModeCount: preferName:tinker_own_config_com.szmg.zhinews:pushcore count:1 2020-01-09 17:56:19.180 24556-24556/? W/Tinker.TinkerDexLoader: there is no dex to load 2020-01-09 17:56:19.181 24556-24556/? W/Tinker.ResourcePatcher: try to clear typedArray cache! 2020-01-09 17:56:19.181 24556-24556/? I/Tinker.ResourcePatcher: checkResUpdate success, found test resource assets file only_use_to_test_tinker_resource.txt 2020-01-09 17:56:19.181 24556-24556/? I/Tinker.ResourceLoader: monkeyPatchExistingResources resource file:/data/user/0/com.szmg.zhinews/tinker/patch-4b109c59/res/resources.apk, use time: 1 2020-01-09 17:56:19.182 24556-24556/? I/Tinker.IncrementCompMgr: package has no incremental component meta, skip init. 2020-01-09 17:56:19.182 24556-24556/? I/Tinker.TinkerLoader: tryLoadPatchFiles: load end, ok! 2020-01-09 17:56:19.182 24556-24556/? D/Tinker.DefaultAppLike: onBaseContextAttached: 2020-01-09 17:56:19.184 24556-24556/? W/Tinker.TinkerInternals: setSafeModeCount: preferName:tinker_own_config_com.szmg.zhinews:pushcore count:0 2020-01-09 17:56:19.185 24556-24556/? I/Tinker.ReflectApp: with app application from manifest applicationName:com.szmg.zhinewspush.TheApp 2020-01-09 17:56:19.185 24556-24556/? I/Tinker.ReflectApp: replaceApplicationLike delegateClass:class com.tinkerpatch.sdk.loader.TinkerPatchApplicationLike 2020-01-09 17:56:19.189 24556-24556/? I/Tinker.ComponentHotplug: method install() is not invoked, ignore ensuring operations. 2020-01-09 17:56:19.189 24556-24556/? D/Tinker.DefaultAppLike: onCreate 2020-01-09 17:56:19.246 24556-24556/? I/Tinker.ServerUtils: with app key from manifest appKey:d144c87e7764f61f 2020-01-09 17:56:19.246 24556-24556/? I/Tinker.ServerUtils: with app version from manifest appVersion:4.0 2020-01-09 17:56:19.247 24556-24556/? I/Tinker.VersionInfo: readVersionInfo file path:/data/user/0/com.szmg.zhinews/tinker_server/d144c87e7764f61f_version.info, appVersion: 4.0, uuid:c54b1b9e-43a6-4ab2-9576-5c0a4e4d1ad0, abi:arm64-v8a, patchVersion:2, patchMd5:52b9e9aa1153f1bf210253454a909a7f, grayValue:5, crashTimes:0, retryTimes:2, applySuccess:0, patchSuccess:0 2020-01-09 17:56:19.250 24556-24556/? I/Tinker.Debugger: debugger attached 2020-01-09 17:56:19.251 24556-24556/? D/Tinker.Debugger: getBoolean(): key=.com.tinker.debugtool.debug, value=true 2020-01-09 17:56:19.251 24556-24556/? I/Tinker.ServerClient: installTinkerServer, debug value: true, appVersion: 4.0, appKey: d144c87e7764f61f 2020-01-09 17:56:19.252 24556-24556/? W/Tinker.Tinker: tinker patch directory: /data/user/0/com.szmg.zhinews/tinker 2020-01-09 17:56:19.253 24556-24556/? I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.9.13 2020-01-09 17:56:19.253 24556-24556/? I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:0, process name:com.szmg.zhinews:pushcore, main process:false, systemOTA:false, fingerPrint:Xiaomi/dipper/dipper:9/PKQ1.180729.001/V11.0.4.0.PEACNXM:user/release-keys, oatDir:odex, useInterpretMode:false 2020-01-09 17:56:19.253 24556-24556/? I/Tinker.TinkerLoadResult: parseTinkerResult oldVersion:4b109c59c9d4d978912600dc2116dd11, newVersion:4b109c59c9d4d978912600dc2116dd11, current:4b109c59c9d4d978912600dc2116dd11 2020-01-09 17:56:19.253 24556-24556/? I/Tinker.TinkerLoadResult: oh yeah, tinker load all success 2020-01-09 17:56:19.253 24556-24556/? I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/com.szmg.zhinews/tinker, code: 0, cost: 16ms 2020-01-09 17:56:19.253 24556-24556/? I/Tinker.TinkerPatch: Init TinkerPatch sdk success, version:1.2.13 2020-01-09 17:56:19.257 24556-24556/? W/Tinker.UpgradePatchRetry: onPatchRetryLoad retry is not main process, just return 2020-01-09 17:56:19.276 24503-24571/? I/Tinker.UrlConnectionFetcher: response code 200 msg: OK 2020-01-09 17:56:19.276 24503-24571/? I/Tinker.ClientImpl: tinker server sync respond:{"v":2} 2020-01-09 17:56:19.276 24503-24571/? I/Tinker.VersionInfo: VersionCheck: target version 2 is not latest. current version is 2 2020-01-09 17:56:19.277 24503-24571/? I/Tinker.PatchFileUtil: safeDeleteFile, try to delete path: /data/user/0/com.szmg.zhinews/tinker_server/4.0_2.apk 2020-01-09 17:56:19.277 24503-24571/? D/Tinker.PatchRequestCallback: [beforePatchRequest] retry patch install more than 3 times, version: 2, patch:/data/user/0/com.szmg.zhinews/tinker_server/4.0_2.apk 2020-01-09 17:56:19.277 24503-24571/? I/Tinker.ClientImpl: Fetch result: needn't update, gray: 5

MoYuFly commented 4 years ago

问题已解决,更新到最新版本解决问题。