-
Notifications
You must be signed in to change notification settings - Fork 23
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
ExceptionInInitializerError in ApiContext.create #127
Comments
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 |
As this is a breaking bug for some companies. I've made a fork that fixes the above problem. 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
The text was updated successfully, but these errors were encountered: