Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

🐛 Bug Report: [TypeError: Cannot read property 'getItem' of undefined]

未关闭
#113 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@shreshta312 已经在做这个了。

开始于 2026年8月24日。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
react-native, typescript
领域
api, mobile

调研方向

首先检查 node_modules/react-native-appwrite/dist/esm/sdk.js 和 realtime.onMessage 的调用路径,然后在使用 react-native-appwrite 0.34.0 的实际 Android 设备上复现该问题。当 realtime.onMessage 在该环境中不再抛出 getItem-of-undefined TypeError 时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug
👟 Reproduction steps

got: node_modules\react-native-appwrite\dist\esm\sdk.js file
check: window.localStorage.getItem('cookieFallback')
and run your app on actual device using realtime.onMessage

👍 Expected behavior

This bug is not expected to occur

👎 Actual Behavior

It throws an error: [TypeError: Cannot read property 'getItem' of undefined]

Call Stack
realtime.onMessage (node_modules\react-native-appwrite\dist\esm\sdk.js)
call ()
invoke (node_modules\react-native\src\private\webapis\dom\events\EventTarget.js)
dispatch (node_modules\react-native\src\private\webapis\dom\events\EventTarget.js)
dispatchEvent (node_modules\react-native\src\private\webapis\dom\events\EventTarget.js)
_eventEmitter.addListener$argument_1 (node_modules\react-native\Libraries\WebSocket\WebSocket.js)
apply ()
emit (node_modules\react-native\Libraries\vendor\emitter\EventEmitter.js)
apply ()
(node_modules@babel\runtime\helpers\superPropGet.js)
RCTDeviceEventEmitterImpl#emit (node_modules\react-native\Libraries\EventEmitter\RCTDeviceEventEmitter.js)

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Windows

🧱 Your Environment

I have development built from app running on actual android device with android version 16, and I have latest version of react-native-appwrite: 0.34.0

👀 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?
主要语言
TypeScript
星标
4.2k
派生
38
平均合并
4 小时 43 分钟
30 天内合并 PR
10

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

appwrite/sdk-for-react-native 的其他 Issue

查看 appwrite/sdk-for-react-native 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。