Android Pay fails with Request Failed: unexpected error
See original GitHub issueHi there,
I am starting Braintree Android v2 Drop In using the following code with a production client roken generated on my nodejs server application. PayPal and CC work fine but I am getting an error when tapping on Android Pay. Error is included below the code. Please help me here!
Cart cart = Cart.newBuilder()
.setCurrencyCode("USD")
.setTotalPrice("1.00")
.addLineItem(LineItem.newBuilder()
.setCurrencyCode("USD")
.setDescription("Description")
.setQuantity("1")
.setUnitPrice("1.00")
.setTotalPrice("1.00")
.build())
.build();
PaymentRequest paymentRequest = new PaymentRequest()
.clientToken(clientToken)
.actionBarTitle("Test")
.primaryDescription("Test desc")
.secondaryDescription("1 Item")
.amount("$1.00")
.submitButtonText("Give Now");
paymentRequest.androidPayCart(cart);
paymentRequest.androidPayRequestCode(MASKED_WALLET_REQUEST_CODE);
startActivityForResult(this, paymentRequest.getIntent(getActivity()), DROPIN_ACTIVITY_REQUEST_CODE);
The Eror that comes up on the screen is “Request Failed”, “An unexpected error has occurred. Please try again later”.
I am getting the following logcat when the error occurs.
09-13 00:49:40.802 3499-4137/? E/Parcel: Class not found when unmarshalling: com.google.android.gms.wallet.shared.BuyFlowConfig
java.lang.ClassNotFoundException: com.google.android.gms.wallet.shared.BuyFlowConfig
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at android.os.Parcel.readParcelableCreator(Parcel.java:2404)
at android.os.Parcel.readParcelable(Parcel.java:2358)
at android.os.Parcel.readValue(Parcel.java:2264)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2614)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.BaseBundle.getString(BaseBundle.java:920)
at android.content.Intent.getStringExtra(Intent.java:6195)
at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:2699)
at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:2161)
at com.android.server.am.ActivityManagerService.startActivityInPackage(ActivityManagerService.java:6855)
at com.android.server.am.PendingIntentRecord.sendInner(PendingIntentRecord.java:310)
at com.android.server.am.ActivityManagerService.startActivityIntentSender(ActivityManagerService.java:6613)
at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:292)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3990)
at android.os.Binder.execTransact(Binder.java:453)
Caused by: java.lang.ClassNotFoundException: com.google.android.gms.wallet.shared.BuyFlowConfig
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at android.os.Parcel.readParcelableCreator(Parcel.java:2404)
at android.os.Parcel.readParcelable(Parcel.java:2358)
at android.os.Parcel.readValue(Parcel.java:2264)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2614)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.BaseBundle.getString(BaseBundle.java:920)
at android.content.Intent.getStringExtra(Intent.java:6195)
at com.android.server.am.ActivityStackSupervisor.startActivityLocked(ActivityStackSupervisor.java:2699)
at com.android.server.am.ActivityStackSupervisor.startActivityMayWait(ActivityStackSupervisor.java:2161)
at com.android.server.am.ActivityManagerService.startActivityInPackage(ActivityManagerService.java:6855)
at com.android.server.am.PendingIntentRecord.sendInner(PendingIntentRecord.java:310)
at com.android.server.am.ActivityManagerService.startActivityIntentSender(ActivityManagerService.java:6613)
at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:292)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3990)
at android.os.Binder.execTransact(Binder.java:453)
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Fix issues when you pay for Google products & services
You might need to fix a problem with your payments profile if you: Have problems when you pay ... “Your request failed”; “We...
Read more >Google Pay Request failed An unexpected error has occurred ...
When I am trying to pay with the google pay option in my developed android application, I am getting the error. Request failed...
Read more >Google Pay Request failed An unexpected error has occurred ...
I resolved this issue by adding PaymentItemStatus and PaymentItemType to all paymentItems, while Apple Pay doesn't require them because it uses ...
Read more >Troubleshooting | Google Pay API for Android
Request Failed An unexpected error has occurred. Please try again later. To learn more about this error, follow these steps: Make sure Android...
Read more >Play Store - "An unexpected error has occurred. Please try ...
So it turns out the Google Organisation my Google Account was managed by had Google Payments (formerly Google Wallet) disabled for all users ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes this is in production. Thanks Luke that clarifies!
Are you testing this in production?
It’s not possible to use Android Pay in production until after your app has been reviewed and enabled by Google.