Exception getting Product Catalog

I’m calling ProductService.getRegisterCatalog(ProductCatalogListener) to get the Merchant’s Catalog List.

This used to work fine but now I get an exception and the Listener callback never fires.

I have looked at the Poynt examples that makes the same call, I even pasted my code into the example project and it all worked fine.

The only difference is in the way I am calling ProductService.getRegisterCatalog(ProductCatalogListener). I call it as soon as the Product Service is set, the example calls it with a button click event.

Am I missing something? Here is the stack trace:

java.lang.ArrayIndexOutOfBoundsException: length=2; index=-1962966000
at co.poynt.api.model.AvailableDiscount.readFromParcel(AvailableDiscount.java:103)
at co.poynt.api.model.AvailableDiscount$1.createFromParcel(AvailableDiscount.java:123)
at co.poynt.api.model.AvailableDiscount$1.createFromParcel(AvailableDiscount.java:115)
at android.os.Parcel.createTypedArrayList(Parcel.java:1775)
at co.poynt.api.model.Catalog.readFromParcel(Catalog.java:140)
at co.poynt.api.model.Catalog$1.createFromParcel(Catalog.java:162)
at co.poynt.api.model.Catalog$1.createFromParcel(Catalog.java:154)
at co.poynt.os.services.v1.IPoyntProductCatalogListener$Stub.onTransact(IPoyntProductCatalogListener.java:50)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)

After getting no response on this post, I decided to rebuild the project from scratch. Along the way I noticed that some of the libraries I was using was out of date, according to the sample app I leeched the new code from. So I went back to the old project and updated the library references and now the code works.

If anyone is interested, I had to replace the dependencies section of the sample app’s build.gradle (the one under the ‘app’ folder) with the dependencies section of our app’s build.gradle.

I’m not sure how to close this post.