react-navigation / react-navigation

Routing and navigation for your React Native apps
https://reactnavigation.org
23.54k stars 5.02k forks source link

Cannot convert undefined or null to object #12064

Closed wjg55555 closed 3 months ago

wjg55555 commented 3 months ago

Current behavior

run programes

Expected behavior

success

Reproduction

/* Sample React Native App https://github.com/facebook/react-native @format / import React from "react"; import { Text, Button } from "react-native"; import { Drawer } from "react-native-drawer-layout"; export default function App() { const [open, setOpen] = React.useState(false); return ( <Drawer open={open} onOpen={() => setOpen(true)} onClose={() => setOpen(false)} renderDrawerContent={() => { return Drawer content; }} > <Button onPress={() => setOpen(prevOpen => !prevOpen)} title={${open ? "Close" : "Open"} drawer} /> ); }

Platform

Packages

Environment

package version
@react-navigation/native
@react-navigation/bottom-tabs
@react-navigation/drawer
@react-navigation/material-top-tabs
@react-navigation/stack
@react-navigation/native-stack
react-native-safe-area-context
react-native-screens
react-native-gesture-handler
react-native-reanimated
react-native-tab-view
react-native-pager-view
react-native
expo
node
npm or yarn

react-native-drawer-layout

github-actions[bot] commented 3 months ago

Hey @wjg55555! Thanks for opening the issue. It seems that the issue doesn't contain a link to a repro.

The best way to get attention to your issue is to provide an easy way for a developer to reproduce the issue.

You can provide a repro using any of the following:

github-actions[bot] commented 3 months ago

Couldn't find version numbers for the following packages in the issue:

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

wjg55555 commented 3 months ago

{ "name": "app_chinese_course", "version": "0.0.1", "private": true, "scripts": { "dev": "react-native run-android", "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest", "recache": "react-native start --reset-cache" }, "dependencies": { "@jamsch/react-native-hanzi-writer": "^0.3.1", "@react-native-async-storage/async-storage": "^1.23.1", "@react-navigation/bottom-tabs": "^6.5.20", "@react-navigation/native": "^6.1.17", "@react-navigation/stack": "^6.3.29", "@reduxjs/toolkit": "^2.2.3", "@splicer97/react-native-switch": "^1.0.0", "axios": "^1.6.8", "i18next": "^23.11.2", "lottie-react-native": "^6.7.2", "moment": "^2.30.1", "qs": "^6.12.1", "react": "18.2.0", "react-i18next": "^14.1.1", "react-native": "0.73.7", "react-native-audio-recorder-player": "^3.6.7", "react-native-calendars": "^1.1304.1", "react-native-drawer-layout": "^3.3.1", "react-native-fs": "^2.20.0", "react-native-gesture-handler": "^2.17.1", "react-native-linear-gradient": "^2.8.3", "react-native-modal": "^13.0.1", "react-native-progress": "^5.0.1", "react-native-reanimated": "^3.14.0", "react-native-safe-area-context": "^4.10.1", "react-native-screens": "^3.31.1", "react-native-splash-screen": "^3.3.0", "react-native-storage": "^1.0.1", "react-native-svg": "^13.4.0", "react-native-video": "^5.2.1", "react-redux": "^9.1.1" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "0.73.21", "@react-native/eslint-config": "0.73.2", "@react-native/metro-config": "0.73.5", "@react-native/typescript-config": "0.73.1", "babel-jest": "^29.6.3", "eslint": "^8.19.0", "eslint-plugin-react": "^7.34.1", "jest": "^29.6.3", "prettier": "2.8.8", "react-native-devsettings": "^1.0.5", "react-test-renderer": "18.2.0" }, "engines": { "node": ">=18" } }

wjg55555 commented 3 months ago

The current error occurs only when the debugger is running

wjg55555 commented 3 months ago

There's nothing wrong with not hitting the debugger

wjg55555 commented 3 months ago

@netshade @natew @ddedic @renchap

wjg55555 commented 3 months ago

微信图片_20240715105035

satya164 commented 3 months ago

Use Chrome Devtools with Hermes instead https://reactnative.dev/docs/hermes#debugging-js-on-hermes-using-google-chromes-devtools

Chrome debugger doesn't work well with reanimated.

github-actions[bot] commented 3 months ago

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

TonyFTannous-Byd commented 2 months ago

i need debug my network request, and Use Chrome Devtools with Hermes didn't provide network what is the solution (i user react native 0.75.1)