Skip to content
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

🐛 Bug Report: Getting java.lang.NullPointerException when using Query.select on attributes along with limit query #56

Open
2 tasks done
bigraymasoom opened this issue Jul 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bigraymasoom
Copy link

👟 Reproduction steps

  1. Call the listDocuments function with parameters that include database and collection IDs, a numeric limit, and a list of attributes.
  2. Include attribute selection in the query, where attribute names are passed dynamically to the Query.select method.
  3. Execute the function, which internally calls toJson() on the Query object.

👍 Expected behavior

Expected Behavior:
The function should handle null values gracefully and not attempt to cast nulls to non-null strings. If a parameter is null, it should either be managed by default values or handled with appropriate error messages.

👎 Actual Behavior

Actual Behavior:
The application throws a java.lang.NullPointerException: null cannot be cast to non-null type kotlin.String during the execution of the toJson() method in the Query class. This error suggests that there might be issues with how null values are being managed within query parameters or during their serialization/deserialization process.

🎲 Appwrite version

Version 1.5.x

💻 Operating system

Linux

🧱 Your Environment

No response

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

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@bigraymasoom bigraymasoom added the bug Something isn't working label Jul 10, 2024
@bigraymasoom
Copy link
Author

Android SDK version I am using is 5.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant