🐛 Bug Report: Getting java.lang.NullPointerException when using Query.select on attributes along with limit query
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- kotlin
- 领域
- mobile-dev
调研方向
报告提到了 listDocuments 入口点、Query.select 和 Query.toJson();请定位 Query 类,并跟踪带有动态提供属性的受限查询的序列化过程。重现从 null 转换为 Kotlin-String 时的类型转换失败,然后验证同一个查询能够在不抛出异常的情况下完成序列化;如果 repository 提供了回归测试,则添加一个针对性的回归测试。
由索引模型根据 Issue 内容生成。
描述
👟 Reproduction steps
- Call the
listDocumentsfunction with parameters that include database and collection IDs, a numeric limit, and a list of attributes. - Include attribute selection in the query, where attribute names are passed dynamically to the
Query.selectmethod. - 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?
- I have read the Code of Conduct
- 主要语言
- Kotlin
- 星标
- 156
- 派生
- 29
- 平均合并
- 8 小时 49 分钟
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
appwrite/sdk-for-android 的其他 Issue
-
Realtime messages can come out of order (and in fact are processed in parallel)可能重新可做 @ChiragAgg5k 于 267 天前认领,目前没有进行中的 PR。 未关闭
appwrite/sdk-for-android#103 · 已指派 1 人 ·
-
Realtime does not get notified or retry socket failures correctly可能重新可做 @ChiragAgg5k 于 267 天前认领,目前没有进行中的 PR。 未关闭
appwrite/sdk-for-android#101 · 已指派 1 人 ·
-
Support mTLS可能重新可做 @ChiragAgg5k 于 267 天前认领,目前没有进行中的 PR。 未关闭
appwrite/sdk-for-android#100 · 1 条评论 · 已指派 1 人 ·
-
难度 5/5 一周以上 新手友好度 25/100
appwrite/sdk-for-android#99 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 52/100
appwrite/sdk-for-android#96 ·
查看 appwrite/sdk-for-android 的全部 Issue
相似的 Issue
-
Unified account interface not translated into Simplified Chinese可能已有人在做 @xuenhua 于 2 天前认领。 未关闭unconfirmed
难度 2/5 1-3 小时 新手友好度 62/100
thunderbird/thunderbird-android#11936 · 1 条评论 ·
维护者通常 3 天内回复
-
design good first issue help wanted
难度 2/5 1-3 小时 新手友好度 73/100
scribe-org/Scribe-Android#778 ·
维护者通常 1 天内回复
-
Needs Triage
难度 2/5 1-3 小时 新手友好度 72/100
ankidroid/Anki-Android#23392 ·
维护者通常 1 天内回复
-
AI Generated CI/CD ⚒️ Flaky-tests 🐦 go 🏃
难度 2/5 1-3 小时 新手友好度 78/100
valkey-io/valkey-glide#7772 ·
维护者通常 1 天内回复
-
Error Handling Swift
难度 2/5 1-3 小时 新手友好度 76/100
Automattic/wordpress-rs#1759 ·
维护者通常 1 天内回复