appwrite / sdk-for-android

[READ-ONLY] Official Appwrite Android SDK 💚 🤖
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
98 stars 21 forks source link

🐛 Bug Report: NullPointerException occurring when calling account.createEmailPasswordSession() #51

Closed anshtya closed 4 months ago

anshtya commented 4 months ago

👟 Reproduction steps

Android SDK version 5.0.0 Creating session with by email and password

👍 Expected behavior

Session should be created.

👎 Actual Behavior

FATAL EXCEPTION: OkHttp Dispatcher Process: com.anshtya.myhub, PID: 13693 java.lang.NullPointerException: null cannot be cast to non-null type kotlin.collections.List<kotlin.Any> at io.appwrite.models.Session$Companion.from(Session.kt:241) at io.appwrite.services.Account$createEmailPasswordSession$converter$1.invoke(Account.kt:1155) at io.appwrite.services.Account$createEmailPasswordSession$converter$1.invoke(Account.kt:1153) at io.appwrite.Client$awaitResponse$2$1.onResponse(Client.kt:541) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012)

Session.kt:241 https://github.com/appwrite/sdk-for-android/blob/482657237936b30a550f8ed6916ca63753483b03/library/src/main/java/io/appwrite/models/Session.kt#L241

In SDK version 4.0.0 session got created without any errors.

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

🏢 Have you read the Code of Conduct?