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

Drop-In UI crashes #67

Closed
andhie opened this issue Dec 10, 2015 · 8 comments
Closed

Drop-In UI crashes #67

andhie opened this issue Dec 10, 2015 · 8 comments

Comments

@andhie
Copy link

andhie commented Dec 10, 2015

Following the code in https://developers.braintreepayments.com/guides/drop-in/android/v2

In app.gradle

compile 'com.braintreepayments.api:braintree:2.1.0'
compile 'com.braintreepayments.api:drop-in:2.1.0'

starting Drop-In UI

public void onBraintreeSubmit(View v) {
  PaymentRequest paymentRequest = new PaymentRequest()
      .clientToken(clientToken);
  startActivityForResult(paymentRequest.getIntent(this), REQUEST_CODE);
}

After the UI is launched, just click on the PayPal image/button. it will crash immediately

java.lang.ArrayIndexOutOfBoundsException: too much data for RSA block
   at com.android.org.bouncycastle.jce.provider.JCERSACipher.engineDoFinal(JCERSACipher.java:457)
   at javax.crypto.Cipher.doFinal(Cipher.java:1111)
   at com.paypal.android.sdk.onetouch.core.cy.a(Unknown Source)
   at com.paypal.android.sdk.onetouch.core.AuthorizationRequest.getBrowserSwitchUrl(Unknown Source)
   at com.paypal.android.sdk.onetouch.core.AuthorizationRequest.getRecipeToExecute(Unknown Source)
   at com.paypal.android.sdk.onetouch.core.PayPalOneTouchCore.getStartIntent(Unknown Source)
   at com.braintreepayments.api.PayPal$1.onConfigurationFetched(PayPal.java:128)
   at com.braintreepayments.api.BraintreeFragment$7.run(BraintreeFragment.java:409)
   at com.braintreepayments.api.BraintreeFragment.postOrQueueCallback(BraintreeFragment.java:341)
   at com.braintreepayments.api.BraintreeFragment.waitForConfiguration(BraintreeFragment.java:401)
   at com.braintreepayments.api.PayPal.authorizeAccount(PayPal.java:105)
   at com.braintreepayments.api.PaymentButton.onClick(PaymentButton.java:194)
   at android.view.View.performClick(View.java:4084)
   at android.view.View$PerformClick.run(View.java:16966)
   at android.os.Handler.handleCallback(Handler.java:615)
   at android.os.Handler.dispatchMessage(Handler.java:92)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:4745)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
   at dalvik.system.NativeStart.main(Native Method)
@lkorth
Copy link
Member

lkorth commented Dec 10, 2015

Thanks for letting us know about this @andhie.

This is actually an issue for any integration using PayPal, not just Drop-in. We'll take a look and get a fix out.

@JinCheng55555
Copy link

Dear, Ikorth
I want to know how to import project to android studio. I am a beginner in android development.
I am interested in your Drop-in UI . I want to make auto payment in android app. If you know about this,
let me teach.
Thank you for your attention.

@lkorth
Copy link
Member

lkorth commented Dec 16, 2015

@JinCheng55555: there are lots of resources online that have tutorials on using Android Studio and our documentation also includes the lines to add for the dependency.

Issues in this repo should be used for specific issues relating to the code in this repo. This issue is already about a specific crash in Drop-in and comments should only be made that pertain to this issue.

@cristianlucaci
Copy link

@lkorth can you please advise if this issue only affects version 2.1.0? Getting the same error myself.

@lkorth
Copy link
Member

lkorth commented Dec 28, 2015

@cristianlucaci this crash is present in all 2.x versions.

@lkorth
Copy link
Member

lkorth commented Dec 28, 2015

We have a fix for this issue and will be releasing it in the near future.

@cristianlucaci
Copy link

Hi @lkorth ,
any ETA for the fix? Thanks

@lkorth
Copy link
Member

lkorth commented Jan 8, 2016

@cristianlucaci 2.1.1 was just released with this fix

@lkorth lkorth closed this as completed Jan 8, 2016
lkorth added a commit that referenced this issue Jan 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants