orhanobut / wasp

Compact and easy to use, 'all-in-one' android network solution
Apache License 2.0
584 stars 71 forks source link

Crash when getting annotations. #128

Open tasomaniac opened 9 years ago

tasomaniac commented 9 years ago

I don't even have a clue but I see this crash this morning related to Wasp. Do you think it is worth looking at?

java.lang.IncompatibleClassChangeError: Couldn't find com.orhanobut.wasp.http.Path.value
       at libcore.reflect.AnnotationAccess.toAnnotationInstance(AnnotationAccess.java:659)
       at libcore.reflect.AnnotationAccess.annotationSetToAnnotations(AnnotationAccess.java:633)
       at libcore.reflect.AnnotationAccess.getParameterAnnotations(AnnotationAccess.java:315)
       at java.lang.reflect.ArtMethod.getParameterAnnotations(ArtMethod.java:211)
       at java.lang.reflect.Method.getParameterAnnotations(Method.java:313)
       at com.orhanobut.wasp.MethodInfo.parseParamAnnotations(SourceFile:205)
       at com.orhanobut.wasp.MethodInfo.init(SourceFile:71)
       at com.orhanobut.wasp.MethodInfo.(SourceFile:65)
       at com.orhanobut.wasp.MethodInfo.newInstance(SourceFile:75)
       at com.orhanobut.wasp.NetworkHandler.fillMethods(SourceFile:81)
       at com.orhanobut.wasp.NetworkHandler.getProxyClass(SourceFile:74)
       at com.orhanobut.wasp.Wasp.create(SourceFile:66)
       at com.verisun.mobiett.core.Service.(SourceFile:90)
       at com.verisun.mobiett.core.Cache.(SourceFile:30)
       at com.verisun.core.App.getCache(SourceFile:74)
       at com.verisun.core.App.onTrimMemory(SourceFile:97)
       at android.app.ActivityThread.handleTrimMemory(ActivityThread.java:4805)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1647)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:145)
       at android.app.ActivityThread.main(ActivityThread.java:5942)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
orhanobut commented 9 years ago

Clean/Build should fix, it seems that new version had some changes in the level of binary which is not backward compatible.

If it doesn't solve the problem, we definitely need to check to find the exact problem.

tasomaniac commented 9 years ago

This crash was from the production app. It can not be a Clean/Build problem.

orhanobut commented 9 years ago

Does it happen randomly or do you have statistics of this crash? We can try to write a regression test for this case but first of all, we need to find the exact issue.

tasomaniac commented 9 years ago

It happened only once yesterday in the new version of the app where I use the new version of the library.

We are doing a staged rollout with only 5% for now. I can tell you if it goes higher.

orhanobut commented 9 years ago

Ok That sounds good, thanks