Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

decrypt result in app crash #180

Open
CarlTien opened this issue Sep 12, 2017 · 6 comments
Open

decrypt result in app crash #180

CarlTien opened this issue Sep 12, 2017 · 6 comments

Comments

@CarlTien
Copy link

try {
return crypto.decrypt(ff, Entity.create(date));
} catch (Throwable e) {
dosomething.....
} finally {
dosomething..........
}

i find an error when i run "return crypto.decrypt(ff, Entity.create(date)); " ,but i can't catch the error using catch (Throwable e) and code in the finally block can't run either , and this result in my app crash . Could you please give me some help?

@KarimFikani
Copy link

Please paste the crash log

@CarlTien
Copy link
Author

i can't catch the crash , so there did not have any crash log

@idish
Copy link

idish commented Dec 11, 2017

Guys,
I'm thinking that it is very wrong that decrypt/encrypt methods may result in native exceptions (since v2.01) making our apps being vulnerable to crashes without any stack trace or ability to catch those exceptions (It happened to me as well).
There must be a solution regarding this issue. (maybe wrap somehow the native exceptions with java exceptions?)

@CarlTien
Copy link
Author

agree!!! realy hope "wrap somehow the native exceptions with java exceptions"

@ptsiogas
Copy link

ptsiogas commented Dec 5, 2018

Hi guys,

We get the above crash since version 2.0.0
Logs:
Fatal Exception: java.lang.NegativeArraySizeException: -30 at com.facebook.cipher.Cipher.decrypt(Unknown Source:11) at com.facebook.crypto.Crypto.decrypt(Unknown Source:2) at gr.alpha.bonusapp.AuthEncryption.AESHelper.decryptString(Unknown Source:29) at gr.alpha.bonusapp.AuthEncryption.AESHelper.decryptString(Unknown Source:12) at gr.alpha.bonusapp.Singletons.UserStore.getAccessToken(Unknown Source:21) at gr.alpha.bonusapp.Services.RestClient$AuthorizationInterceptor.intercept(Unknown Source:8) at okhttp3.internal.http.RealInterceptorChain.request(Unknown Source:161) at okhttp3.internal.http.RealInterceptorChain.request(Unknown Source:6) at okhttp3.RealCall.getResponseWithInterceptorChain(Unknown Source:115) at okhttp3.RealCall$AsyncCall.execute(Unknown Source:4) at okhttp3.internal.NamedRunnable.run(Unknown Source:17) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)

Is there a particular reason for this. Do we have a workaround?

@chitgoks
Copy link

chitgoks commented Jul 7, 2019

same here

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

No branches or pull requests

5 participants