Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tinker Patch Load Failed for 1.9.5 #802

Closed
arlong opened this issue Mar 26, 2018 · 10 comments
Closed

Tinker Patch Load Failed for 1.9.5 #802

arlong opened this issue Mar 26, 2018 · 10 comments
Labels

Comments

@arlong
Copy link

arlong commented Mar 26, 2018

Issue/提问须知

在提交issue之前,我们应该先查询是否已经有相关的issue以及常见问题。提交issue时,我们需要写明issue的原因,以及编译或运行过程的日志(加载进程以及Patch进程)。issue需要以下面的格式:

异常类型:加载Patch时异常

手机型号:如:MI 5S Plus(如是编译异常,则可以不填)

手机系统版本:如:Android 7.0 (如是编译异常,则可以不填)

tinker版本:如:1.9.5

gradle版本:如:2.3.3

是否使用热更新SDK: 如 TinkerPatch SDK 

系统:如:Mac

堆栈/日志:
1. 如是编译异常,请在执行gradle命令时,加上--stacktrace;
2. 日志我们需要过滤"Tinker."关键字;
3. 对于合成失败的情况,请给出:patch进程的日志,这里需要将Android Moniter右上角设为No Filter。

提问题时若使用不能用/没效果/有问题/报错此类模糊表达,但又没给出任何代码截图报错的,将绝对不会有任何反馈。这种issue也是一律直接关闭的,大家可以参阅提问的智慧

加载Patch时会报异常,日志如下:

03-26 17:40:33.810 18505-18505/tinker.sample.android W/Tinker.TinkerLoader: tryLoadPatchFiles:patch dir not exist:/data/user/0/tinker.sample.android/tinker
03-26 17:40:33.811 18505-18505/tinker.sample.android D/Tinker.DefaultAppLike: onBaseContextAttached:
03-26 17:40:33.813 18505-18505/tinker.sample.android I/Tinker.SamplePatchListener: application maxMemory:256
03-26 17:40:33.815 18505-18505/tinker.sample.android W/Tinker.Tinker: tinker patch directory: /data/user/0/tinker.sample.android/tinker
03-26 17:40:33.815 18505-18505/tinker.sample.android I/Tinker.Tinker: try to install tinker, isEnable: true, version: 1.9.5
03-26 17:40:33.816 18505-18505/tinker.sample.android I/Tinker.TinkerLoadResult: parseTinkerResult loadCode:-2, process name:tinker.sample.android, main process:true, systemOTA:false, fingerPrint:Xiaomi/natrium/natrium:7.0/NRD90M/V9.1.2.0.NBGCNEI:user/release-keys, oatDir:null, useInterpretMode:false
03-26 17:40:33.816 18505-18505/tinker.sample.android W/Tinker.TinkerLoadResult: can't find patch file, is ok, just return
03-26 17:40:33.816 18505-18505/tinker.sample.android I/Tinker.DefaultLoadReporter: patch loadReporter onLoadResult: patch load result, path:/data/user/0/tinker.sample.android/tinker, code: -2, cost: 2ms
03-26 17:40:33.816 18505-18505/tinker.sample.android W/Tinker.Tinker: tinker load fail!
03-26 17:40:33.817 18505-18505/tinker.sample.android I/Tinker.ComponentHotplug: method install() is not invoked, ignore ensuring operations.
03-26 17:40:33.817 18505-18505/tinker.sample.android D/Tinker.DefaultAppLike: onCreate
03-26 17:40:33.817 18505-18505/tinker.sample.android D/Tinker.DefaultAppLike: onTrimMemory level:5
03-26 17:40:33.890 18505-18505/tinker.sample.android E/Tinker.MainActivity: i am on onCreate classloader:dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/tinker.sample.android-1/base.apk"],nativeLibraryDirectories=[/data/app/tinker.sample.android-1/lib/arm64, /system/lib64, /vendor/lib64]]]
03-26 17:40:33.891 18505-18505/tinker.sample.android E/Tinker.MainActivity: i am on onCreate string:I am in the base apk
03-26 17:40:33.894 18505-18505/tinker.sample.android E/Tinker.MainActivity: i am on onResume
03-26 17:40:33.959 18505-18505/tinker.sample.android W/Tinker.UpgradePatchRetry: onPatchRetryLoad retry info not exist, just return
03-26 17:41:11.519 18505-18505/tinker.sample.android I/Tinker.SamplePatchListener: receive a patch file: /storage/emulated/0/patch_signed_7zip.apk, file size:3468
03-26 17:41:11.524 18505-18505/tinker.sample.android W/Tinker.UpgradePatchRetry: onPatchListenerCheck retry file is not exist, just return
03-26 17:41:11.527 18505-18505/tinker.sample.android I/Tinker.SamplePatchListener: get platform:all
03-26 17:41:24.516 18505-18505/tinker.sample.android D/Tinker.DefaultAppLike: onTrimMemory level:80

我用Tinker1.9.2版本测试是可以的,改成1.9.5版本就报这个异常,导致Patch加载不成功,看看是不是1.9.5的Bug?

@MengImmortal
Copy link

我也遇到了这个问题

@tys282000
Copy link
Collaborator

看log可能是还在apply patch,1.9.5在Android 5.0以上的系统上去掉了提升服务优先级的操作,所以apply patch的过程会变长,再等等看看会不会生效?

@arlong
Copy link
Author

arlong commented Mar 29, 2018

已经等了很长时间了,一直都没有生效,onPatchRetryLoad retry info not exist, just return,这应该是重试也失败了吧?

@bufferoverflowexception

是不是小米系统了 最近我也遇到这个问题 通过仔细看LOG 发现job service被系统拒绝了 导致无法合成
#804 (comment)

@arlong
Copy link
Author

arlong commented Mar 30, 2018

@bufferoverflowexception 是的,我的也是小米系统

@arlong
Copy link
Author

arlong commented Mar 30, 2018

@tomystang @bufferoverflowexception 应该和 #804 一个问题,自启动权限里把app的自启动权限打开就可以了

@TracyZhangLei
Copy link

1.9.5 tinker遇到了同样的问题,换回1.9.2就没事,华为手机 打开权限也不行 一直报 can't find patch file, is ok, just return

@tys282000 tys282000 added the bug label Jun 17, 2018
@tys282000
Copy link
Collaborator

确定了就是miui把jobscheduler禁掉了导致的,1.9.8版本上已修复,预计6月22号发布。

@EverdayAndroid
Copy link

1.9.8还没有发布吗?

@lijie815917
Copy link

1.9.9版本miui10还是把jobscheduler禁掉了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants