Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL EXCEPTION: DefaultDispatcher-worker-1 & APIException in 13.1.2 #2100

Closed
bootiyar opened this issue Jan 25, 2020 · 2 comments · Fixed by #2105
Closed

FATAL EXCEPTION: DefaultDispatcher-worker-1 & APIException in 13.1.2 #2100

bootiyar opened this issue Jan 25, 2020 · 2 comments · Fixed by #2105
Assignees
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally

Comments

@bootiyar
Copy link

bootiyar commented Jan 25, 2020

I have a Fatal Exception when I try to confirm Payment

exceptions:
1- FATAL EXCEPTION: DefaultDispatcher-worker-1
2- APIException: Your card was declined.

Stripe sdk version : 13.1.2
Device : Samsung Galaxy
Android : 10

Log:

2020-01-25 10:52:37.230 24926-25185/x.x.x E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1
    Process: X.X.X, PID: 24926
    java.lang.RuntimeException: Request-id: req_yOXXXXXXXXXXXXX
    com.stripe.android.exception.APIException: Your card was declined.
        at android.os.Parcel.writeException(Parcel.java:1898)
        at com.stripe.android.PaymentController$Result.writeToParcel(Unknown Source:24)
        at android.os.Parcel.writeParcelable(Parcel.java:1801)
        at android.os.Parcel.writeValue(Parcel.java:1707)
        at android.os.Parcel.writeArrayMapInternal(Parcel.java:928)
        at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1584)
        at android.os.Bundle.writeToParcel(Bundle.java:1253)
        at android.os.Parcel.writeBundle(Parcel.java:997)
        at android.content.Intent.writeToParcel(Intent.java:10495)
        at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:3823)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1705)
        at android.app.Activity.startActivityForResult(Activity.java:5192)
        at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:676)
        at android.app.Activity.startActivityForResult(Activity.java:5150)
        at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:663)
        at com.stripe.android.view.AuthActivityStarter$Host.startActivityForResult$stripe_release(AuthActivityStarter.kt:33)
        at com.stripe.android.PaymentRelayStarter$Companion$create$1.start(PaymentRelayStarter.kt:28)
        at com.stripe.android.PaymentRelayStarter$Companion$create$1.start(PaymentRelayStarter.kt:21)
        at com.stripe.android.StripePaymentController$Companion.handleError(StripePaymentController.kt:899)
        at com.stripe.android.StripePaymentController$Companion.access$handleError(StripePaymentController.kt:838)
        at com.stripe.android.StripePaymentController$ConfirmStripeIntentCallback.onError(StripePaymentController.kt:542)
        at com.stripe.android.ApiOperation.dispatchResult(ApiOperation.kt:40)
        at com.stripe.android.ApiOperation.access$dispatchResult(ApiOperation.kt:13)
        at com.stripe.android.ApiOperation$execute$1$1.invokeSuspend(ApiOperation.kt:32)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     Caused by: Request-id: req_yOXXXXXXXXX
    com.stripe.android.exception.APIException: Your card was declined.
        at com.stripe.android.exception.APIException$Companion.create$stripe_release(APIException.kt:24)
        at com.stripe.android.StripeApiRepository.confirmPaymentIntent(StripeApiRepository.kt:112)
        at com.stripe.android.StripePaymentController$ConfirmStripeIntentTask.getResult$stripe_release(StripePaymentController.kt:522)
        at com.stripe.android.ApiOperation$execute$1.invokeSuspend(ApiOperation.kt:22)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:561)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:727)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:667)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:655)
     Caused by: Request-id: req_yOVtpXXXXXX
    com.stripe.android.exception.CardException: Your card was declined.
        at com.stripe.android.StripeApiRepository.handleApiError(StripeApiRepository.kt:885)
        at com.stripe.android.StripeApiRepository.makeApiRequest$stripe_release(StripeApiRepository.kt:919)
2020-01-25 10:52:37.230 24926-25185/rsf.co.peyk E/AndroidRuntime:     at com.stripe.android.StripeApiRepository.fetchStripeModel(StripeApiRepository.kt:903)
        at com.stripe.android.StripeApiRepository.confirmPaymentIntent(StripeApiRepository.kt:106)
        	... 8 more
@bootiyar bootiyar changed the title APIException: Your card was declined. in 13.1.2 FATAL EXCEPTION: DefaultDispatcher-worker-1 & APIException in 13.1.2 Jan 25, 2020
@mshafrir-stripe mshafrir-stripe self-assigned this Jan 27, 2020
@mshafrir-stripe mshafrir-stripe added the triaged Issue has been reviewed by Stripe and is being tracked internally label Jan 27, 2020
@mshafrir-stripe
Copy link
Collaborator

@bootiyar thanks for filing! I'm able to reproduce the issue. I'll have a fix ready today.

mshafrir-stripe added a commit that referenced this issue Jan 27, 2020
Summary
Update `PaymentController.Result`'s parceling
logic to manually parcel. This prevents
using `Parcel.writeException()`, which is
what the autogenerated parceling logic uses.
That method only supports certain exception
subtypes, and will throw any exception that
is unsupported [0].

Motivation
Fixes #2100

Testing
Added a test to run a `PaymentController.Result`
instance through a parceling/unparceling roundtrip.

[0] https://developer.android.com/reference/android/os/Parcel#writeException(java.lang.Exception)
mshafrir-stripe added a commit that referenced this issue Jan 27, 2020
Summary
Update `PaymentController.Result`'s parceling
logic to manually parcel. This prevents
using `Parcel.writeException()`, which is
what the autogenerated parceling logic uses.
That method only supports certain exception
subtypes, and will throw any exception that
is unsupported [0].

Motivation
Fixes #2100

Testing
Added a test to run a `PaymentController.Result`
instance through a parceling/unparceling roundtrip.

[0] https://developer.android.com/reference/android/os/Parcel#writeException(java.lang.Exception)
@bootiyar
Copy link
Author

Thanks @mshafrir-stripe - 13.1.3 worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged Issue has been reviewed by Stripe and is being tracked internally
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants