TypeError: undefined is not an object (evaluating '_picker.default[mode].dismiss')
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, react-native
- 领域
- mobile
调研方向
Start at the Android picker code that calls _picker.default[mode].dismiss and trace how the reported mode="datetime" is handled. The report provides a reproduction using @react-native-community/datetimepicker 6.5.2, but no source file or test is named. Reproduce the error with the sample and identify why that mode has no dismiss method; done means the sample no longer throws.
由索引模型根据 Issue 内容生成。
描述
Bug report
Summary
TypeError: undefined is not an object (evaluating '_picker.default[mode].dismiss')
in RNDateTimePickerAndroid (created by DateTimePicker)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer (created by Modal)
in RCTView (created by View)
in View (created by Modal)
in VirtualizedListContextResetter (created by Modal)
in RCTModalHostView (created by Modal)
in Modal (created by DateTimePicker)
in DateTimePicker (created by Input)
Reproducible sample code
import { Modal } from "react-native";
import React, { useState } from "react";
import DateTime from "@react-native-community/datetimepicker";
const DateTimePicker = () => {
const [show, setShow] = useState(true);
return (
<>
{show ? (
<Modal transparent visible={show}>
<DateTime
testID="dateTimePicker"
value={new Date()}
mode="datetime"
is24Hour={true}
/>
</Modal>
) : (
<></>
)}
</>
);
};
export default DateTimePicker;
Steps to reproduce
- Just run this code and you'll get stuck. after sometime you'll see the thrown error in terminal
Describe what you expected to happen:
- Internal Package Error should be fixed
Environment info
npx react-native info output:
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
Memory: 5.14 GB / 15.84 GB
Binaries:
Node: 18.17.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-223.8836.35.2231.10406996
Visual Studio: 17.8.34316.72 (Visual Studio Community 2022)
Languages:
Java: 16.0.2
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.8 => 0.70.8
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
# paste it here
ERROR Warning: Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
Error message:
TypeError: undefined is not an object (evaluating '_picker.default[mode].dismiss')
in RNDateTimePickerAndroid (created by DateTimePicker)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer (created by Modal)
in RCTView (created by View)
in View (created by Modal)
in VirtualizedListContextResetter (created by Modal)
in RCTModalHostView (created by Modal)
in Modal (created by DateTimePicker)
in DateTimePicker (created by Input)
datetimepicker version: 6.5.2
Android version: 13.x
- 主要语言
- JavaScript
- 星标
- 2.9k
- 派生
- 459
- 平均合并
- 4 天 16 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
react-native-datetimepicker/datetimepicker 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 3/5 1-2 天 新手友好度 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 52/100
-
难度 3/5 1-2 天 新手友好度 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 条评论 ·
-
难度 4/5 3-5 天 新手友好度 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 条评论 ·
查看 react-native-datetimepicker/datetimepicker 的全部 Issue
相似的 Issue
-
cdx-audit output written to a pipe is cut off at 64 KiB可能重新可做 关联的 PR 已关闭且未合并。 未关闭bug mode:cli
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
Build produces empty forge.min.js: package.json lists "forge" instead of "node-forge"可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
难度 2/5 1-3 小时 新手友好度 70/100
Fei2411/DeepSeek-Bot#963 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
Miaotofu01/Study-Mate#244 ·
维护者通常 1 天内回复
-
test-reliability
难度 2/5 1-3 小时 新手友好度 78/100
Azure/azure-sdk-for-js#40672 · 1 个 reaction ·
维护者通常 1 天内回复