openid / AppAuth-Android

Android client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
https://openid.github.io/AppAuth-Android
Apache License 2.0
2.77k stars 873 forks source link

Avoid Fatal Exception: net.openid.appauth.d: grant request is invalid in Firebase Crashlytics #1049

Closed Kobreizhyashi closed 3 months ago

Kobreizhyashi commented 3 months ago

Hi !

We are using this SDK as all of you for our authentication process, in the last version.

I'm getting this error in my Crashlytics, I know this is due to the auth service we are using but the problem is I really don't want crashlytics to log crashes (not a real one in fact) from code which is unreachable. Did someone ever faced this problem ?

Fatal Exception: net.openid.appauth.d: grant request is invalid
       at net.openid.appauth.AuthorizationService$TokenRequestTask.onPostExecute(AuthorizationService.java:671)
       at net.openid.appauth.AuthorizationService$TokenRequestTask.onPostExecute(AuthorizationService.java:579)
       at android.os.AsyncTask.finish(AsyncTask.java:771)
       at android.os.AsyncTask.-$$Nest$mfinish()
       at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:240)
       at android.os.Looper.loop(Looper.java:351)
       at android.app.ActivityThread.main(ActivityThread.java:8381)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)

Regards, KT

CompileConnected commented 3 months ago

Hi @Kobreizhyashi if you don't want crashlytics to log the crash. just do simple try catch on the code. so crashlytics dont collect your crash.

Also next time please ask on firebase forum, because crashlytics is for collection crash on your app. AppAuth is for authentication not collecting crash.

Kobreizhyashi commented 3 months ago

Yeah you're right ! Sorry mate ! :)

CompileConnected commented 3 months ago

don;t forget to close the issue