TypeError: undefined is not an object (evaluating '_picker.default[mode].dismiss')
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react-native
- Ambito
- mobile
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- JavaScript
- Stelle
- 2.9k
- Fork
- 459
- Merge medio
- 4g 16h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di react-native-datetimepicker/datetimepicker
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
react-native-datetimepicker/datetimepicker#1070 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
DateTimePickerAndroid.open() throws "Cannot read property" error on RN 0.78.3 new architectureAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
react-native-datetimepicker/datetimepicker#1047 · 6 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
react-native-datetimepicker/datetimepicker#1046 · 1 commento ·
Tutte le issue di react-native-datetimepicker/datetimepicker
Issue simili
-
Administration: required plugin configuration field stays invalid after restoring its saved valueApertaneeds-triage Platform(Default)
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
nearform/ag-grid-url-sync#314 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
idean3885/claude-ops-agent#910 ·
I maintainer di solito rispondono entro 1 giorno
-
S: triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
oskarrough/agent-ide#29 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno