Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Android level 32 runtime errors when calling "getBasicPaymentItems" #10

Closed
matthias-94 opened this issue Aug 4, 2022 · 12 comments
Closed

Comments

@matthias-94
Copy link

When calling "getBasicPaymentItems", I receive the following errors:

2022-08-04 14:31:04.621 20843-21493/? I/c.c.a.a.a.a.a.a.d.a: Request URL : https://eu.preprod.api-ingenico.com/client/v1/thepeople-f3cbe4693f3a4875bc3b57278a20335f/products?countryCode=DE&amount=18&isRecurring=false&currencyCode=EUR&hide=fields&cacheBuster=1659616264618
Request Method : GET
Request Headers :
Authorization:GCS v1Client:f43db11754114ec0b342ed07dba34035
X-GCS-ClientMetaInfo:eyJkZXZpY2VUeXBlIjoiUGl4ZWwgMyIsInNka0lkZW50aWZpZXIiOiJBbmRyb2lkQ2xpZW50U0RLL3Y1LjguNCIsInNjcmVlblNpemUiOiIyMDI4eDEwODAiLCJhcHBJZGVudGlmaWVyIjoidGhlcGVvcGxlL2F3Yy92MSIsInNka0NyZWF0b3IiOiJJbmdlbmljbyIsInBsYXRmb3JtSWRlbnRpZmllciI6IkFuZHJvaWQvMTIiLCJkZXZpY2VCcmFuZCI6Ikdvb2dsZSJ9
2022-08-04 14:31:04.621 20843-21494/? I/c.c.a.a.a.a.a.a.d.a: Request URL : https://eu.preprod.api-ingenico.com/client/v1/thepeople-f3cbe4693f3a4875bc3b57278a20335f/productgroups?countryCode=DE&amount=18&isRecurring=false&currencyCode=EUR&hide=fields&cacheBuster=1659616264618
Request Method : GET
Request Headers :
Authorization:GCS v1Client:f43db11754114ec0b342ed07dba34035
X-GCS-ClientMetaInfo:eyJkZXZpY2VUeXBlIjoiUGl4ZWwgMyIsInNka0lkZW50aWZpZXIiOiJBbmRyb2lkQ2xpZW50U0RLL3Y1LjguNCIsInNjcmVlblNpemUiOiIyMDI4eDEwODAiLCJhcHBJZGVudGlmaWVyIjoidGhlcGVvcGxlL2F3Yy92MSIsInNka0NyZWF0b3IiOiJJbmdlbmljbyIsInBsYXRmb3JtSWRlbnRpZmllciI6IkFuZHJvaWQvMTIiLCJkZXZpY2VCcmFuZCI6Ikdvb2dsZSJ9
2022-08-04 14:31:05.024 20843-21494/? I/c.c.a.a.a.a.a.a.d.a: Response URL : https://eu.preprod.api-ingenico.com/client/v1/thepeople-f3cbe4693f3a4875bc3b57278a20335f/productgroups?countryCode=DE&amount=18&isRecurring=false&currencyCode=EUR&hide=fields&cacheBuster=1659616264618
Response Code : 200
Response Headers :
HTTP/1.1 200
Connection:Keep-Alive
Content-Type:application/json
Date:Thu, 04 Aug 2022 12:31:04 GMT
Keep-Alive:timeout=5, max=1000
Server:Apache
Set-Cookie:dtCookie=v_4_srv_26_sn_49FE172F437EBF412AEF353E57BD32E2_perc_100000_ol_0_mul_1_app-3Aea7c4b59f27d43eb_1; Path=/; Domain=.api-ingenico.com; secure
Transfer-Encoding:chunked
X-Android-Received-Millis:1659616265022
X-Android-Response-Source:NETWORK 200
X-Android-Selected-Protocol:http/1.1
X-Android-Sent-Millis:1659616264734
X-OneAgent-JS-Injection:true
Response Body : {
"paymentProductGroups" : [ {
"deviceFingerprintEnabled" : false,
"accountsOnFile" : [ {
"attributes" : [ {
"key" : "alias",
"value" : "400000XXXXXX0002",
"status" : "READ_ONLY"
}, {
"key" : "cardholderName",
"value" : "Max Mustermann",
"status" : "CAN_WRITE"
}, {
"key" : "cardNumber",
"value" : "400000XXXXXX0002",
"status" : "CAN_WRITE"
}, {
"key" : "expiryDate",
"value" : "1222",
"status" : "CAN_WRITE"
} ],
"displayHints" : {
"labelTemplate" : [ {
"attributeKey" : "alias",
"mask" : "{{9999}} {{9999}} {{9999}} {{9999}} {{999}}"
} ],
"logo" : "templates/master/global/css/img/ppimages/pp_logo_1_v2.png"
},
"id" : 0,
"paymentProductId" : 1
} ],
"allowsInstallments" : false,
"displayHints" : {
"displayOrder" : 0,
"label" : "Cards",
"logo" : "templates/master/global/css/img/ppimages/group-card.png"
},
"id" : "cards"
} ]
}
2022-08-04 14:31:05.024 20843-21494/? I/c.c.a.a.a.a.a.a.d.a: Request Duration : 288 millisecs
2022-08-04 14:31:05.024 20843-21493/? I/c.c.a.a.a.a.a.a.d.a: Response URL : https://eu.preprod.api-ingenico.com/client/v1/thepeople-f3cbe4693f3a4875bc3b57278a20335f/products?countryCode=DE&amount=18&isRecurring=false&currencyCode=EUR&hide=fields&cacheBuster=1659616264618
Response Code : 200
Response Headers :
HTTP/1.1 200
Connection:Keep-Alive
Content-Type:application/json
Date:Thu, 04 Aug 2022 12:31:04 GMT
Keep-Alive:timeout=5, max=1000
Server:Apache
Set-Cookie:dtCookie=v_4_srv_19_sn_BB8D88BD679206D249F78034EFDF5808_perc_100000_ol_0_mul_1_app-3Aea7c4b59f27d43eb_1; Path=/; Domain=.api-ingenico.com; secure
Transfer-Encoding:chunked
X-Android-Received-Millis:1659616265022
X-Android-Response-Source:NETWORK 200
X-Android-Selected-Protocol:http/1.1
X-Android-Sent-Millis:1659616264737
X-OneAgent-JS-Injection:true
Response Body : {
"paymentProducts" : [ {
"deviceFingerprintEnabled" : false,
"accountsOnFile" : [ {
"attributes" : [ {
"key" : "alias",
"value" : "400000XXXXXX0002",
"status" : "READ_ONLY"
}, {
"key" : "cardholderName",
"value" : "Max Mustermann",
"status" : "CAN_WRITE"
}, {
"key" : "cardNumber",
"value" : "400000XXXXXX0002",
"status" : "CAN_WRITE"
}, {
"key" : "expiryDate",
"value" : "1222",
"status" : "CAN_WRITE"
} ],
"displayHints" : {
"labelTemplate" : [ {
"attributeKey" : "alias",
"mask" : "{{9999}} {{9999}} {{9999}} {{9999}} {{999}}"
} ],
"logo" : "templates/master/global/css/img/ppimages/pp_logo_1_v2.png"
},
"id" : 0,
"paymentProductId" : 1
} ],
"allowsInstallments" : false,
"allowsRecurring" : true,
"allowsTokenization" : true,
"autoTokenized" : false,
"displayHints" : {
"displayOrder" : 0,
"label" : "Visa",
"logo" : "templates/master/global/css/img/ppimages/pp_logo_1_v2.png"
},
"id" : 1,
"mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
"paymentMethod" : "card",
"paymentProductGroup" : "cards",
"supportsMandates" : false,
"usesRedirectionTo3rdParty" : false
}, {
"deviceFingerprintEnabled" : false,
"allowsInstallments" : false,
"allowsRecurring" : true,
"allowsTokenization" : true,
"autoTokenized" : false,
"displayHints" : {
"displayOrder" : 1,
"label" : "MasterCard",
"logo" : "templates/master/global/css/img/ppimages/pp_logo_3_v3.png"
},
"id" : 3,
"mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
"paymentMethod" : "card",
"paymentProductGroup" : "cards",
"supportsMandates" : false,
"usesRedirectionTo3rdParty" : false
}, {
"deviceFingerprintEnabled" : false,
"allowsInstallments" : false,
"allowsRecurring" : false,
"allowsTokenization" : false,
"autoTokenized" : false,
"canBeIframed" : false,
"displayHints" : {
"displayOrder" : 2,
"label" : "PayPal",
"logo" : "templates/master/global/css/img/ppimages/pp_logo_840_v1.png"
},
"id" : 840,
"mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
"paymentMethod" : "redirect",
"supportsMandates" : false,
"usesRedirectionTo3rdParty" : true
}, {
"deviceFingerprintEnabled" : false,
"allowsInstallments" : false,
"allowsRecurring" : true,
"allowsTokenization" : true,
"autoTokenized" : false,
"displayHints" : {
"displayOrder" : 3,
"label" : "MasterCard Debit",
"logo" : "templates/master/global/css/img/ppimages/pp_logo_119_v4.png"
},
"id" : 119,
"mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
"paymentMethod" : "card",
"paymentProductGroup" : "cards",
"supportsMandates" : false,
"usesRedirectionTo3rdParty" : false
2022-08-04 14:31:05.024 20843-21493/? I/c.c.a.a.a.a.a.a.d.a: }, {
"deviceFingerprintEnabled" : false,
"allowsInstallments" : false,
"allowsRecurring" : true,
"allowsTokenization" : true,
"autoTokenized" : false,
"displayHints" : {
"displayOrder" : 4,
"label" : "Visa Electron",
"logo" : "templates/master/global/css/img/ppimages/pp_logo_122_v2.png"
},
"id" : 122,
"mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
"paymentMethod" : "card",
"paymentProductGroup" : "cards",
"supportsMandates" : false,
"usesRedirectionTo3rdParty" : false
}, {
"deviceFingerprintEnabled" : false,
"allowsInstallments" : false,
"allowsRecurring" : true,
"allowsTokenization" : true,
"autoTokenized" : false,
"displayHints" : {
"displayOrder" : 5,
"label" : "Visa Debit",
"logo" : "templates/master/global/css/img/ppimages/pp_logo_114_v2.png"
},
"id" : 114,
"mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
"paymentMethod" : "card",
"paymentProductGroup" : "cards",
"supportsMandates" : false,
"usesRedirectionTo3rdParty" : false
} ]
}
2022-08-04 14:31:05.024 20843-21493/? I/c.c.a.a.a.a.a.a.d.a: Request Duration : 285 millisecs
2022-08-04 14:31:05.026 20843-21149/? I/c.c.a.a.a.a.a.a.b.a: Error while getting paymentItems: java.lang.AssertionError: AssertionError (GSON 2.8.5): java.lang.NoSuchFieldException: READ_ONLY
2022-08-04 14:31:05.026 20843-21149/? W/System.err: java.util.concurrent.ExecutionException: java.lang.AssertionError: AssertionError (GSON 2.8.5): java.lang.NoSuchFieldException: READ_ONLY
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at java.util.concurrent.FutureTask.report(FutureTask.java:123)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at java.util.concurrent.FutureTask.get(FutureTask.java:193)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at c.c.a.a.a.a.a.a.b.a.b(Unknown Source:51)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at c.c.a.a.a.a.a.a.b.a.doInBackground(Unknown Source:2)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at android.os.AsyncTask$3.call(AsyncTask.java:394)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at java.lang.Thread.run(Thread.java:920)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: Caused by: java.lang.AssertionError: AssertionError (GSON 2.8.5): java.lang.NoSuchFieldException: READ_ONLY
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at c.b.c.f.g(Unknown Source:54)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at c.b.c.f.h(Unknown Source:4)
2022-08-04 14:31:05.026 20843-21149/? W/System.err: at c.b.c.f.j(Unknown Source:9)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.f.i(Unknown Source:0)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.c.a.a.a.a.a.a.d.a.e(Unknown Source:207)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.c.a.a.a.a.a.a.b.c.d(Unknown Source:6)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.c.a.a.a.a.a.a.b.c.a(Unknown Source:0)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.c.a.a.a.a.a.a.b.c.call(Unknown Source:0)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: ... 3 more
2022-08-04 14:31:05.027 20843-21149/? W/System.err: Caused by: java.lang.AssertionError: java.lang.NoSuchFieldException: READ_ONLY
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.n$k0.(Unknown Source:87)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.n$w.a(Unknown Source:29)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.f.k(Unknown Source:74)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.b(Unknown Source:41)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.e(Unknown Source:123)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.a(Unknown Source:22)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.f.k(Unknown Source:74)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.b.a(Unknown Source:26)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.f.k(Unknown Source:74)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.b(Unknown Source:41)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.e(Unknown Source:123)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.a(Unknown Source:22)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.f.k(Unknown Source:74)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.b.a(Unknown Source:26)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.f.k(Unknown Source:74)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.b(Unknown Source:41)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.e(Unknown Source:123)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.a(Unknown Source:22)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.f.k(Unknown Source:74)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.b.a(Unknown Source:26)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.f.k(Unknown Source:74)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.b(Unknown Source:41)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.e(Unknown Source:123)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.y.n.i.a(Unknown Source:22)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.f.k(Unknown Source:74)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: at c.b.c.f.g(Unknown Source:16)
2022-08-04 14:31:05.027 20843-21149/? W/System.err: ... 11 more
2022-08-04 14:31:05.027 20843-21149/? W/System.err: Caused by: java.lang.NoSuchFieldException: READ_ONLY
2022-08-04 14:31:05.028 20843-21149/? W/System.err: at java.lang.Class.getField(Class.java:1635)
2022-08-04 14:31:05.028 20843-21149/? W/System.err: at c.b.c.y.n.n$k0.(Unknown Source:34)
2022-08-04 14:31:05.028 20843-21149/? W/System.err: ... 36 more
2022-08-04 14:31:05.030 20843-20865/? I/flutter: Error: PlatformException(500, Internal error, basicPaymentItems was null, null)

Any help would be greatly appreciated. Downgrading the android-compile-version is not an option.

@LeonStemerdink-Worldline

Hello Mathias,

Thank you for reporting this issue. We will look into it.

@LeonStemerdink-Worldline

Hello Mathias,

So far we are not able to reproduce the issue.
Could you confirm for us that you are attempting to use the SDK in a Flutter application?

@matthias-94
Copy link
Author

Yes, I'm attempting to use this in a Flutter application, using version 3.0.5 of Flutter. Downgrading to Flutter 3.0.4 did not resolve this issue.

@matthias-94
Copy link
Author

matthias-94 commented Aug 8, 2022

Here is an excerpt of the used build.gradle file:

`
android {
compileSdkVersion 32

  sourceSets {
      main.java.srcDirs += 'src/main/kotlin'
  }

  lintOptions {
      checkReleaseBuilds false
  }

  defaultConfig {
      applicationId "XXX"
      minSdkVersion 24
      targetSdkVersion 32
      versionCode flutterVersionCode.toInteger()
      versionName flutterVersionName
      multiDexEnabled true
  }

...
}
`

I think that the "compileSdkVersion 32" is the root cause of this issue. I can't go lower than 32 because of other dependencies.
Previous versions with the exact same Connect-SDK-version have been built with Android SDK 31 or lower and always worked fine.

@matthias-94
Copy link
Author

Do you need any more information from me to reproduce this problem?

@matthias-94
Copy link
Author

Is there any news on this topic?

@LeonStemerdink-Worldline

Hello Matthias,

We have attempted to reproduce the issue, also with flutter. However, we see no issues.
Are you using obfuscation like ProGuard perhaps? This could sometimes cause issues with (de)serialization of Enum types.

  • Could you try to test/run without obfuscation?
  • Could you try to 'keep' enumerations?

@rob-spoor
Copy link

Hello Matthias,

I saw that you're using GSON 2.8.5. This can indeed cause NoSuchFieldExceptions for enums when used in combination with ProGuard; see google/gson#1495. This has been integrated into GSON 2.8.8.

The latest SDK version has a dependency on GSON 2.9.0. Can you upgrade to either the latest SDK version, or otherwise the latest GSON version?

@matthias-94
Copy link
Author

matthias-94 commented Aug 30, 2022

Hello Matthias,

We have attempted to reproduce the issue, also with flutter. However, we see no issues. Are you using obfuscation like ProGuard perhaps? This could sometimes cause issues with (de)serialization of Enum types.

* Could you try to test/run without obfuscation?

* Could you try to 'keep' enumerations?

Running "flutter build apk --no-shrink" does not apply ProGuard during the build process. I've built the APK this way and tested it again, the exact same error occured.

@matthias-94
Copy link
Author

Hello Matthias,

I saw that you're using GSON 2.8.5. This can indeed cause NoSuchFieldExceptions for enums when used in combination with ProGuard; see google/gson#1495. This has been integrated into GSON 2.8.8.

The latest SDK version has a dependency on GSON 2.9.0. Can you upgrade to either the latest SDK version, or otherwise the latest GSON version?

Thanks for the tip!

But, after upgrading to version 6.0.0 of the SDK, a different error appears.

Don't know if it's because of an error in the code on my side that appeared because of the update, or if it's an issue with the new SDK.

Anyway, here's the error:

2022-08-30 16:03:29.155 26518-26518/? I/psp: getPaymentOptions
2022-08-30 16:03:29.163 26518-26815/? I/c.c.a.a.a.a.a.c.e.a: Request URL : https://eu.preprod.api-ingenico.com/client/v1/thepeople-108e7feed4cf4ada821ec84a31d0f3ea/productgroups?countryCode=DE&amount=18&isRecurring=false&currencyCode=EUR&hide=fields&cacheBuster=1661868209158
    Request Method : GET
    Request Headers : 
    		Authorization:GCS v1Client:6253254234964bbc9128ce036d404907
    		X-GCS-ClientMetaInfo:eyJkZXZpY2VUeXBlIjoiUGl4ZWwgMyIsInNka0lkZW50aWZpZXIiOiJBbmRyb2lkQ2xpZW50U0RLL3Y2LjAuMCIsInNjcmVlblNpemUiOiIyMDI4eDEwODAiLCJhcHBJZGVudGlmaWVyIjoidGhlcGVvcGxlL2F3Yy92MSIsInNka0NyZWF0b3IiOiJJbmdlbmljbyIsInBsYXRmb3JtSWRlbnRpZmllciI6IkFuZHJvaWQvMTIiLCJkZXZpY2VCcmFuZCI6Ikdvb2dsZSJ9
2022-08-30 16:03:29.163 26518-26814/? I/c.c.a.a.a.a.a.c.e.a: Request URL : https://eu.preprod.api-ingenico.com/client/v1/thepeople-108e7feed4cf4ada821ec84a31d0f3ea/products?countryCode=DE&amount=18&isRecurring=false&currencyCode=EUR&hide=fields&cacheBuster=1661868209158
    Request Method : GET
    Request Headers : 
    		Authorization:GCS v1Client:6253254234964bbc9128ce036d404907
    		X-GCS-ClientMetaInfo:eyJkZXZpY2VUeXBlIjoiUGl4ZWwgMyIsInNka0lkZW50aWZpZXIiOiJBbmRyb2lkQ2xpZW50U0RLL3Y2LjAuMCIsInNjcmVlblNpemUiOiIyMDI4eDEwODAiLCJhcHBJZGVudGlmaWVyIjoidGhlcGVvcGxlL2F3Yy92MSIsInNka0NyZWF0b3IiOiJJbmdlbmljbyIsInBsYXRmb3JtSWRlbnRpZmllciI6IkFuZHJvaWQvMTIiLCJkZXZpY2VCcmFuZCI6Ikdvb2dsZSJ9
2022-08-30 16:03:29.183 2443-2488/? D/NetlinkTracker/wlan0: addressUpdated: 2a02:8070:2485:de60:b96b:ca89:8600:9d93/64 on wlan0 flags 2304 scope 0
2022-08-30 16:03:29.183 2443-2488/? D/NetlinkTracker/wlan0: addressUpdated: 2a02:8070:2485:de60:2cb6:2c7f:2c57:1da6/64 on wlan0 flags 1 scope 0
2022-08-30 16:03:29.562 26518-26815/? I/c.c.a.a.a.a.a.c.e.a: Response URL : https://eu.preprod.api-ingenico.com/client/v1/thepeople-108e7feed4cf4ada821ec84a31d0f3ea/productgroups?countryCode=DE&amount=18&isRecurring=false&currencyCode=EUR&hide=fields&cacheBuster=1661868209158
    Response Code : 200
    Response Headers : 
    		HTTP/1.1 200 
    		Connection:Keep-Alive
    		Content-Type:application/json
    		Date:Tue, 30 Aug 2022 14:03:29 GMT
    		Keep-Alive:timeout=5, max=1000
    		Server:Apache
    		Set-Cookie:dtCookie=v_4_srv_32_sn_B20FE63EEDE00A2479C81E2DC4CC7B2F_perc_100000_ol_0_mul_1_app-3Aea7c4b59f27d43eb_1; Path=/; Domain=.api-ingenico.com; secure
    		Transfer-Encoding:chunked
    		X-Android-Received-Millis:1661868209559
    		X-Android-Response-Source:NETWORK 200
    		X-Android-Selected-Protocol:http/1.1
    		X-Android-Sent-Millis:1661868209258
    		X-OneAgent-JS-Injection:true
    Response Body : {
       "paymentProductGroups" : [ {
          "deviceFingerprintEnabled" : false,
          "accountsOnFile" : [ {
             "attributes" : [ {
                "key" : "alias",
                "value" : "400000XXXXXX0002",
                "status" : "READ_ONLY"
             }, {
                "key" : "cardholderName",
                "value" : "Max  Mustermann",
                "status" : "CAN_WRITE"
             }, {
                "key" : "cardNumber",
                "value" : "400000XXXXXX0002",
                "status" : "CAN_WRITE"
             }, {
                "key" : "expiryDate",
                "value" : "1222",
                "status" : "CAN_WRITE"
             } ],
             "displayHints" : {
                "labelTemplate" : [ {
                   "attributeKey" : "alias",
                   "mask" : "{{9999}} {{9999}} {{9999}} {{9999}} {{999}}"
                } ],
                "logo" : "templates/master/global/css/img/ppimages/pp_logo_1_v2.png"
             },
             "id" : 0,
             "paymentProductId" : 1
          } ],
          "allowsInstallments" : false,
          "displayHints" : {
             "displayOrder" : 0,
             "label" : "Cards",
             "logo" : "templates/master/global/css/img/ppimages/group-card.png"
          },
          "id" : "cards"
       } ]
    }
2022-08-30 16:03:29.562 26518-26814/? I/c.c.a.a.a.a.a.c.e.a: Response URL : https://eu.preprod.api-ingenico.com/client/v1/thepeople-108e7feed4cf4ada821ec84a31d0f3ea/products?countryCode=DE&amount=18&isRecurring=false&currencyCode=EUR&hide=fields&cacheBuster=1661868209158
    Response Code : 200
    Response Headers : 
    		HTTP/1.1 200 
    		Connection:Keep-Alive
    		Content-Type:application/json
    		Date:Tue, 30 Aug 2022 14:03:29 GMT
    		Keep-Alive:timeout=5, max=1000
    		Server:Apache
    		Set-Cookie:dtCookie=v_4_srv_32_sn_97F84EC5EF29C63DBB0DF5B611C17144_perc_100000_ol_0_mul_1_app-3Aea7c4b59f27d43eb_1; Path=/; Domain=.api-ingenico.com; secure
    		Transfer-Encoding:chunked
    		X-Android-Received-Millis:1661868209559
    		X-Android-Response-Source:NETWORK 200
    		X-Android-Selected-Protocol:http/1.1
    		X-Android-Sent-Millis:1661868209258
    		X-OneAgent-JS-Injection:true
    Response Body : {
       "paymentProducts" : [ {
          "deviceFingerprintEnabled" : false,
          "accountsOnFile" : [ {
             "attributes" : [ {
                "key" : "alias",
                "value" : "400000XXXXXX0002",
                "status" : "READ_ONLY"
             }, {
                "key" : "cardholderName",
                "value" : "Max  Mustermann",
                "status" : "CAN_WRITE"
             }, {
                "key" : "cardNumber",
                "value" : "400000XXXXXX0002",
                "status" : "CAN_WRITE"
             }, {
                "key" : "expiryDate",
                "value" : "1222",
                "status" : "CAN_WRITE"
             } ],
             "displayHints" : {
                "labelTemplate" : [ {
                   "attributeKey" : "alias",
                   "mask" : "{{9999}} {{9999}} {{9999}} {{9999}} {{999}}"
                } ],
                "logo" : "templates/master/global/css/img/ppimages/pp_logo_1_v2.png"
             },
             "id" : 0,
             "paymentProductId" : 1
          } ],
          "allowsInstallments" : false,
          "allowsRecurring" : true,
          "allowsTokenization" : true,
          "autoTokenized" : false,
          "displayHints" : {
             "displayOrder" : 0,
             "label" : "Visa",
             "logo" : "templates/master/global/css/img/ppimages/pp_logo_1_v2.png"
          },
          "id" : 1,
          "mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
          "paymentMethod" : "card",
          "paymentProductGroup" : "cards",
          "supportsMandates" : false,
          "usesRedirectionTo3rdParty" : false
       }, {
          "deviceFingerprintEnabled" : false,
          "allowsInstallments" : false,
          "allowsRecurring" : true,
          "allowsTokenization" : true,
          "autoTokenized" : false,
          "displayHints" : {
             "displayOrder" : 1,
             "label" : "MasterCard",
             "logo" : "templates/master/global/css/img/ppimages/pp_logo_3_v3.png"
          },
          "id" : 3,
          "mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
          "paymentMethod" : "card",
          "paymentProductGroup" : "cards",
          "supportsMandates" : false,
          "usesRedirectionTo3rdParty" : false
       }, {
          "deviceFingerprintEnabled" : false,
          "allowsInstallments" : false,
          "allowsRecurring" : false,
          "allowsTokenization" : false,
          "autoTokenized" : false,
          "canBeIframed" : false,
          "displayHints" : {
             "displayOrder" : 2,
             "label" : "PayPal",
             "logo" : "templates/master/global/css/img/ppimages/pp_logo_840_v1.png"
          },
          "id" : 840,
          "mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
          "paymentMethod" : "redirect",
          "supportsMandates" : false,
          "usesRedirectionTo3rdParty" : true
       }, {
          "deviceFingerprintEnabled" : false,
          "allowsInstallments" : false,
          "allowsRecurring" : true,
          "allowsTokenization" : true,
          "autoTokenized" : false,
          "displayHints" : {
             "displayOrder" : 3,
             "label" : "MasterCard Debit",
             "logo" : "templates/master/global/css/img/ppimages/pp_logo_119_v4.png"
          },
          "id" : 119,
          "mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
          "paymentMethod" : "card",
          "paymentProductGroup" : "cards",
          "supportsMandates" : false,
          "usesRedirectionTo3rdParty" : false
2022-08-30 16:03:29.562 26518-26814/? I/c.c.a.a.a.a.a.c.e.a:    }, {
          "deviceFingerprintEnabled" : false,
          "allowsInstallments" : false,
          "allowsRecurring" : true,
          "allowsTokenization" : true,
          "autoTokenized" : false,
          "displayHints" : {
             "displayOrder" : 4,
             "label" : "Visa Electron",
             "logo" : "templates/master/global/css/img/ppimages/pp_logo_122_v2.png"
          },
          "id" : 122,
          "mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
          "paymentMethod" : "card",
          "paymentProductGroup" : "cards",
          "supportsMandates" : false,
          "usesRedirectionTo3rdParty" : false
       }, {
          "deviceFingerprintEnabled" : false,
          "allowsInstallments" : false,
          "allowsRecurring" : true,
          "allowsTokenization" : true,
          "autoTokenized" : false,
          "displayHints" : {
             "displayOrder" : 5,
             "label" : "Visa Debit",
             "logo" : "templates/master/global/css/img/ppimages/pp_logo_114_v2.png"
          },
          "id" : 114,
          "mobileIntegrationLevel" : "OPTIMISED_SUPPORT",
          "paymentMethod" : "card",
          "paymentProductGroup" : "cards",
          "supportsMandates" : false,
          "usesRedirectionTo3rdParty" : false
       } ]
    }
2022-08-30 16:03:29.562 26518-26815/? I/c.c.a.a.a.a.a.c.e.a: Request Duration : 301 millisecs 
2022-08-30 16:03:29.562 26518-26814/? I/c.c.a.a.a.a.a.c.e.a: Request Duration : 301 millisecs 
2022-08-30 16:03:29.566 26518-26815/? I/c.c.a.a.a.a.a.c.e.a: Error while getting paymentProductGroups:Error getting drawable from cache, paymentProductId may not be null
2022-08-30 16:03:29.566 26518-26814/? I/c.c.a.a.a.a.a.c.e.a: Error while getting paymentproducts:Attempt to invoke virtual method 'java.lang.Integer c.c.a.a.a.a.a.c.k.h.n.b.a()' on a null object reference

@LeonStemerdink-Worldline
Copy link

LeonStemerdink-Worldline commented Sep 1, 2022

Hello Matthias,

We were able to reproduce and solve your issue by adding -keep class com.ingenico.connect.gateway.sdk.client.android.sdk.model.** { *; } to the proguard-rules.pro file. This line will ensure that the Model classes of the SDK will not be obfuscated and the JSON deserialisation will succeed. If you keep running into gson-related issues, you could decide to prevent obfuscation for all classes in our SDK.

Also make sure that the proguard-rules.pro file is located in the app module of your Android project and not in the root of your project.

Please let us know if you run into any other problems.

@matthias-94
Copy link
Author

Hello,

thank you very much for your help, the custom ProGuard-rules solved this problem. The payment now works just fine.

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

3 participants