callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.94k stars 2.09k forks source link

React Native Unhandled JS Exception: TypeError: undefined is not an object (evaluating 'o.default.Item') #4263

Closed errahulkhurana closed 9 months ago

errahulkhurana commented 10 months ago

Current behaviour

iOS App is Crashing in release mode.

*** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: TypeError: undefined is not an object (evaluating 'o.default.Item')', reason: 'Unhandled JS Exception: TypeError: undefined is not an object (evaluating 'o.default.Item'), stack:
<unknown>@1724:1312
h@2:1707
<unknown>@1635:192
h@2:1707
<unknown>@1634:97
h@2:1707
<unknown>@1614:821
h@2:1707
<unknown>@1613:137
h@2:1707
<unknown>@599:1665
h@2:1707
<unknown>@501:603
h@2:1707
<unknown>@385:743
h@2:1707
<unknown>@6:57
h@2:1707
d@2:1080
global code@1817:3

How to reproduce?

{
  "name": "***",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "postinstall": "patch-package"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.17.11",
    "@react-native-community/cli-platform-android": "7.0.1",
    "@react-native-community/datetimepicker": "7.2.0",
    "@react-native-community/netinfo": "^9.3.7",
    "@react-native-firebase/analytics": "^16.4.6",
    "@react-native-firebase/app": "^16.4.6",
    "@react-native-firebase/auth": "^16.4.6",
    "@react-native-firebase/crashlytics": "^16.4.6",
    "@react-native-firebase/firestore": "^16.4.6",
    "@react-native-firebase/functions": "^16.4.6",
    "@react-native-firebase/messaging": "^16.4.6",
    "@react-native-firebase/perf": "^16.4.6",
    "@react-native-firebase/storage": "^16.4.6",
    "@react-native-picker/picker": "2.4.8",
    "@react-navigation/native": "6.0.16",
    "@react-navigation/stack": "6.3.7",
    "@reduxjs/toolkit": "^1.9.1",
    "axios": "^1.2.0",
    "crypto-js": "^4.1.1",
    "deprecated-react-native-prop-types": "^3.0.1",
    "moment": "^2.29.4",
    "patch-package": "^6.5.0",
    "postinstall-postinstall": "^2.1.0",
    "prop-types": "15.8.1",
    "react": "18.1.0",
    "react-native": "0.70.0",
    "react-native-a-beep": "^1.2.0",
    "react-native-autocomplete-input": "^5.2.0",
    "react-native-base64": "^0.2.1",
    "react-native-calendars": "^1.1292.0",
    "react-native-camera": "^4.2.1",
    "react-native-cardview": "^2.0.5",
    "react-native-device-info": "^10.3.0",
    "react-native-dialog": "^9.3.0",
    "react-native-dimension": "^1.0.6",
    "react-native-document-picker": "^8.1.3",
    "react-native-dropdown-autocomplete": "^1.0.18",
    "react-native-event-listeners": "^1.0.7",
    "react-native-exception-handler": "^2.10.10",
    "react-native-fs": "2.20.0",
    "react-native-gesture-handler": "2.9.0",
    "react-native-html-to-pdf": "^0.12.0",
    "react-native-image-picker": "4.8.5",
    "react-native-indicators": "^0.17.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-loading-spinner-overlay": "^3.0.1",
    "react-native-masked-text": "^1.13.0",
    "react-native-material-dropdown-v2": "^0.11.1",
    "react-native-material-menu": "^2.0.0",
    "react-native-material-textfield": "^0.16.1",
    "react-native-modal": "^13.0.1",
    "react-native-modal-dropdown": "^1.0.2",
    "react-native-paper": "4.12.5",
    "react-native-print": "0.10.0",
    "react-native-push-notification": "^8.1.1",
    "react-native-safe-area-context": "4.4.1",
    "react-native-screens": "^3.18.2",
    "react-native-signature-canvas": "^4.5.0",
    "react-native-simple-radio-button": "^2.7.4",
    "react-native-soap-request": "https://github.com/adamski/react-native-soap-request.git",
    "react-native-swipe-gestures": "^1.0.5",
    "react-native-table-component": "^1.2.2",
    "react-native-tiny-toast": "^1.0.7",
    "react-native-vector-icons": "^9.2.0",
    "react-native-version-check": "^3.4.3",
    "react-native-version-number": "^0.3.6",
    "react-native-webview": "^11.25.0",
    "react-native-xml2js": "^1.0.3",
    "react-redux": "^7.2.2",
    "redux-persist": "^6.0.0",
    "rmc-date-picker": "^6.0.10",
    "rn-fetch-blob": "^0.12.0",
    "timers": "^0.1.1",
    "xlsx": "^0.18.5",
    "xml2js": "^0.4.23",
    "xmldom": "^0.6.0"
  },
  "devDependencies": {
    "@babel/core": "^7.8.4",
    "@babel/runtime": "^7.8.4",
    "@react-native-community/eslint-config": "^1.1.0",
    "babel-jest": "^25.1.0",
    "eslint": "^6.5.1",
    "jest": "^25.1.0",
    "metro-react-native-babel-preset": "0.70.3",
    "react-test-renderer": "16.13.1"
  },
  "jest": {
    "preset": "react-native"
  },
  "resolutions": {
    "@react-native-community/cli-platform-android": "3.0.0-alpha.2"
  }
}

Preview

What have you tried so far?

I have tried Version 4.12.5, 4.12.6, 4.12.7 and ^5.11.4

Your Environment

software version
ios Yes
android x
react-native 0.69.12
react-native-paper 4.12.5
node x.x.x
npm or yarn yarn
expo sdk N/A
github-actions[bot] commented 10 months ago

Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on snack.expo.dev. If it's not possible to repro it on snack.expo.dev, then you can also provide the repro in a GitHub repository.

errahulkhurana commented 9 months ago

For anyone facing release/production in an iOS or Android app, you need to generate the SourceMaps. I have answered in this StackOverflow post.