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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 Bug Report: Using Java v17 doesn't show proper Appwrite Exception message #16
Comments
I updated the original ticket to reflect this information by removing that information that this not longer relevant. @abnegate Just to make it clear as I could test v0.2.2. The String error was fixed but the Enum and Float errors are not. Hopefully you find a solution. |
@abnegate I have encounterted the same error when trying to create Team Memberships. So lets say I have created a team with the follow id: MY_TEAM and I want to add a team membership through the server.
I do get the same error:
|
Okay the project had JAVA v17 and could not show the propper appwrite Exception, so I have lowered the JAVA API to v11 and it shows the proper error messages. |
@Caryntjen Thank you for the info! A fix is underway 馃榿 |
@abnegate thank you. I am eagerly awaiting the fixes because they are blocking my project. I saw a snapshot release with the fixes in: https://github.com/appwrite/sdk-for-kotlin/releases/tag/0.2.4-SNAPSHOT Is that suppose to be in Maven Central repo because it seems like it is not? https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin |
馃憻 Reproduction steps
When I try call createEnumAttribute from server when the collection exists I get a stacktrace error, similar things happen to Floats. (Integer, Boolean, URL and Email work; IP not tested)
For example:
馃憤 Expected behavior
Proper AppwriteException message (for the floats) when using Java v11
Exception in thread "main" io.appwrite.exceptions.AppwriteException: Invalid default: Value must be a valid float
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.google.gson.internal.ConstructorConstructor$3.construct(ConstructorConstructor.java:110)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:212)
at com.google.gson.Gson.fromJson(Gson.java:932)
at com.google.gson.Gson.fromJson(Gson.java:897)
at com.google.gson.Gson.fromJson(Gson.java:846)
at com.google.gson.Gson.fromJson(Gson.java:817)
at io.appwrite.Client$awaitResponse$2$1.onResponse(Client.kt:371)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
馃憥 Actual Behavior
Stacktrace for Enums, Floats:
馃幉 Appwrite version
Different version (specify in environment)
馃捇 Operating system
Windows
馃П Your Environment
other dependencies:
implementation 'org.jetbrains.kotlin:kotlin-reflect:1.6.10'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.10'
implementation "io.appwrite:sdk-for-kotlin:0.2.2"
implementation "com.sun.xml.bind:jaxb-impl:3.0.2"
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2'
implementation "org.apache.logging.log4j:log4j-api-kotlin:1.1.0"
implementation 'org.apache.logging.log4j:log4j-api:2.17.1'
implementation 'org.apache.logging.log4j:log4j-core:2.17.1'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1"
馃憖 Have you spent some time to check if this issue has been raised before?
馃彚 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: