Error when running a signed APK #92
Comments
Hi @pinicius! This is the first time we face this issue and I'm pretty sure it is related to the obfuscation configuration. When you say "When I install the app from..." are you talking about this repository code or your own app? |
Hi @pedrovgs!
|
@pinicius could you check in your project if your release build obfuscates the app. If I remember well, Rosie does not support obfuscation. |
In both is disabled |
If this is your build tyes configuration:
You are adding the default |
If you could also paste the stack trace you've found that'd be great 😃 |
:app:preBuild UP-TO-DATE BUILD SUCCESSFUL in 2s But I don't know how to avoid it :( |
Here you can find information about how to avoid obfuscation during your build. Could you update your app and let me know if this is the issue you are facing? |
Unfortunately it does not work. I've tried with the signed debug version too and the error is the same, does it make sense? |
But you said:
I think the easiest way to figure out what's going on is to create an android project from scratch, upload it to a public repository and try to reproduce the bug. Could you do this so we can find the issue and fix it? |
I meant to sign the release of debug with my private keystore (releasekeystore) After feeding, I will try :D Thanks so much for your time |
Hi again @pedrovgs,
But the two uses cases have been executed correctly because I see in the log that the data has been load from remote and saved into database :/ The error referenced in ErrorFactory.java in line 42 it does not seem to be a TargetException or InvocationTargetException, what kind of error is happening? Why not happens executing with debugkeystore? This error not appears when I run from my repository
In both (debug and release) experiments size returns a value. Neither of the two use cases seems to be failing. Any idea? |
Happy to see you've found the original issue. In order to fix this you should debug the code execution and review what's the exception thrown. The code you can see in the stack trace is only executed if someone throws an exception, so at some point your code has to be throwing an exception you are not handling. Do you still face this issue just with the signed/release version of your app? Did you disable the obfuscation as I suggested in a previous comment? Disabling obfuscation will help us to identify where the bug is. |
Hi @pedrovgs ! But the problem continues, if I generate the apk signed with my keystore, any type of build (debug or release), the application fails. If I sign with debugkeystore, no problem. And in both cases the information is in database without any error. Right now I do not know where to look :( |
@pinicius minification is not equivalent to obfuscation, so if you don't minify the app you can still be obfuscating it as I commented here. If you are not able to disable the obfuscation and we can't find a way to reproduce this error..there is only one way to fix this. Create a repository on GitHub where you reproduce the error and share it with us so we can debug it manually and see what's going on. |
@pedrovgs One last question I have added the code they discuss in the possible solution (link that you made me reference) Even without using Proguard, the behavior is the same.
I do not understand what is going on, why does not it always fail? |
You are welcome @pinicius I'm closing this issue for now until we have a clear scenario to reproduce the error in our hands. Feel free to create the repository I mentioned so I can personally debug what's going on. |
Hi,
I do not understand what is happening.
Why these two different behaviors with the same code?
Has something similar happened to you?
Thanks in advance
The text was updated successfully, but these errors were encountered: