You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some customers of mine start to experience problems with the following stack trace:
STACK_TRACE=java.lang.NoSuchMethodError: No virtual method error(Ljava/lang/Exception;)Lcom/github/kittinunf/result/Result$Failure; in class Lcom/github/kittinunf/result/Result$Companion; or its super classes (declaration of 'com.github.kittinunf.result.Result$Companion' appears in base.apk!classes3.dex) at com.github.kittinunf.fuel.core.DeserializableKt.response(Deserializable.kt:171) at com.github.kittinunf.fuel.core.requests.DefaultRequest.responseObject(DefaultRequest.kt:490) at com.chk.go_elocal.database.flextariff.provider.Tibber.updateStatistics(Tibber.java:201)
caused as you can see by the call of the "request.responseObject" in Java code:
Version is the current stable version 2.3.1, and it just happens in release builds (on Android).
implementation 'com.github.kittinunf.result:result:5.6.0' implementation "com.github.kittinunf.fuel:fuel:$fuel_version" implementation "com.github.kittinunf.fuel:fuel-android:$fuel_version" implementation "com.github.kittinunf.fuel:fuel-json:$fuel_version"
Strange: The same call works (in some other class) for the same customers when I use a full object path:
Triple<Request, Response, com.github.kittinunf.result.Result<FuelJson, FuelError>> result = request.responseObject(FuelJsonKt.jsonDeserializer()); com.github.kittinunf.result.Result<FuelJson, FuelError> responseResult = result.getThird();
although the "import" in the other class file has the same path.
Does anybody know what could be the reason? Ther was a gradle update at the end of november, but actually I don't know the build process good enough to know whether something like that could cause it...
The text was updated successfully, but these errors were encountered:
BTW: I did not change the Fuel version for a long time, so I guess it will be something in the build process.
Strange is: it works when it's called "manually" (called by a one-time Worker process), but (at least sometimes) it does not work in a scheduled Worker process.
Other idea: can it be that that "missing" method is called when there's a problem with the data passed to it, and I cannot reproduce it (and it has that strange pattern) as the data I get does not have that problem?
Whenever NoSuchMethodError or similar problems come up, it's usually one of two things:
A build problem where the build system uses incompatible intermediate files to building the apk. You can try to fix this (or exclude it as the reason) by fully cleaning your project in Android Studio ("Build -> Clean project") and also running "File -> Invalidate Caches".
An unintended version upgrade of another dependent library that also uses Result or Fuel. Based on your description, this is the likely reason. Gradle updates all Fuel versions in the entire dependency tree to the same version. You can check what gradle is doing by running ./gradlew yourAppGradleTarget:dependencies.
Some customers of mine start to experience problems with the following stack trace:
STACK_TRACE=java.lang.NoSuchMethodError: No virtual method error(Ljava/lang/Exception;)Lcom/github/kittinunf/result/Result$Failure; in class Lcom/github/kittinunf/result/Result$Companion; or its super classes (declaration of 'com.github.kittinunf.result.Result$Companion' appears in base.apk!classes3.dex) at com.github.kittinunf.fuel.core.DeserializableKt.response(Deserializable.kt:171) at com.github.kittinunf.fuel.core.requests.DefaultRequest.responseObject(DefaultRequest.kt:490) at com.chk.go_elocal.database.flextariff.provider.Tibber.updateStatistics(Tibber.java:201)
caused as you can see by the call of the "request.responseObject" in Java code:
Triple<Request, Response, Result<FuelJson, FuelError>> result = request.responseObject(FuelJsonKt.jsonDeserializer()); Result<FuelJson, FuelError> responseResult = result.getThird();
Version is the current stable version 2.3.1, and it just happens in release builds (on Android).
implementation 'com.github.kittinunf.result:result:5.6.0' implementation "com.github.kittinunf.fuel:fuel:$fuel_version" implementation "com.github.kittinunf.fuel:fuel-android:$fuel_version" implementation "com.github.kittinunf.fuel:fuel-json:$fuel_version"
Strange: The same call works (in some other class) for the same customers when I use a full object path:
Triple<Request, Response, com.github.kittinunf.result.Result<FuelJson, FuelError>> result = request.responseObject(FuelJsonKt.jsonDeserializer()); com.github.kittinunf.result.Result<FuelJson, FuelError> responseResult = result.getThird();
although the "import" in the other class file has the same path.
Does anybody know what could be the reason? Ther was a gradle update at the end of november, but actually I don't know the build process good enough to know whether something like that could cause it...
The text was updated successfully, but these errors were encountered: