Closed tbotting closed 4 years ago
Having the same issue for the C# SDK. It's been 24 hours now!
I've been experiencing the same issue since Tuesday. They made a change in the response of the Bunq API for the new Bunq +1 functionality.
Best would be to fork the SDK and change the director_alias
@InhouseMedia @tbotting
As this is a breaking bug for some companies. I've made a fork that fixes the above problem. https://github.com/NilsTellow/sdk_java/ It can be pulled from JItpack. Same as Bunq SDK. https://jitpack.io/#NilsTellow/sdk_java
Keep in mind that this a temporary fix, as I do not know what they will change in the API for the bug fix.
Tried bunq version 1.21.1, 1.13.0 and 1.13.1. All have the same issue since this morning. It used to work for weeks before this.
API_CONTEXT = ApiContext.create(ApiEnvironmentType.PRODUCTION, BUNQ_API_KEY, "Bunq Device");
is causing:
Exception in thread "main" java.lang.ExceptionInInitializerError Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at path $.director_alias at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222) at com.google.gson.Gson.fromJson(Gson.java:927) at com.google.gson.Gson.fromJson(Gson.java:994) at com.google.gson.internal.bind.TreeTypeAdapter$GsonContextImpl.deserialize(TreeTypeAdapter.java:162) at com.bunq.sdk.json.SessionServerAdapter.deserialize(SessionServerAdapter.java:57) at com.bunq.sdk.json.SessionServerAdapter.deserialize(SessionServerAdapter.java:23) at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) at com.google.gson.Gson.fromJson(Gson.java:927) at com.google.gson.Gson.fromJson(Gson.java:994) at com.google.gson.Gson.fromJson(Gson.java:967) at com.bunq.sdk.model.core.BunqModel.fromJsonArrayNested(BunqModel.java:69) at com.bunq.sdk.model.core.SessionServer.create(SessionServer.java:78) at com.bunq.sdk.context.ApiContext.initializeSession(ApiContext.java:272) at com.bunq.sdk.context.ApiContext.initialize(ApiContext.java:225) at com.bunq.sdk.context.ApiContext.create(ApiContext.java:140) at com.bunq.sdk.context.ApiContext.create(ApiContext.java:122) at com.bunq.sdk.context.ApiContext.create(ApiContext.java:114) at com.payments.Bunq.<clinit>(Bunq.java:20) Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at path $.director_alias at com.google.gson.internal.bind.JsonTreeReader.expect(JsonTreeReader.java:162) at com.google.gson.internal.bind.JsonTreeReader.beginObject(JsonTreeReader.java:87) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215) ... 19 more