Description
Is this a bug report?
Yes (somehow) this is a developer experience bug for me but it's subjective.
Have you read the Contributing Guidelines?
Yes
Environment
I'm not using RN directly but it's plain Expo SDK 22 / CRNA
I don't think it's relevant but here are the dependencies:
"dependencies": {
"@mapbox/polyline": "^0.2.0",
"@storybook/addon-actions": "^3.2.14",
"@storybook/addon-links": "^3.2.14",
"babel-plugin-module-resolver": "^2.7.1",
"expo": "^22.0.0",
"glamorous-native": "^1.2.0",
"intl": "^1.2.5",
"left-pad": "^1.1.3",
"lodash": "^4.17.4",
"moment": "^2.18.1",
"murmurhash3js": "^3.0.1",
"native-base": "^2.3.3",
"polished": "^1.8.1",
"prop-types": "^15.6.0",
"react": "16.0.0-beta.5",
"react-intl": "^2.4.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-22.0.1.tar.gz",
"react-native-autolink": "^1.1.1",
"react-native-calendars": "^1.9.0",
"react-native-collapsible": "^0.9.0",
"react-native-gallery": "^0.0.17",
"react-navigation": "^1.0.0-beta.11",
"react-redux": "^5.0.5",
"recompose": "^0.23.5",
"redux": "^3.6.0",
"redux-actions": "^2.0.3",
"redux-batched-actions": "^0.1.6",
"redux-batched-subscribe": "^0.1.6",
"redux-logger": "^3.0.6",
"redux-saga": "^0.15.5",
"redux-thunk": "^2.2.0",
"reselect": "^3.0.1",
"sentry-expo": "^1.6.0",
"uuid": "^3.0.1"
},
"devDependencies": {
"@storybook/cli": "^3.0.1",
"@storybook/react-native": "^3.0.1",
"babel-eslint": "^7.2.3",
"babel-plugin-transform-remove-console": "^6.8.5",
"babel-preset-react-optimize": "^1.0.1",
"eslint": "^3.19.0",
"eslint-import-resolver-reactnative": "^1.0.2",
"eslint-plugin-import": "^2.3.0",
"eslint-plugin-react": "^7.0.1",
"eslint-plugin-react-native": "^2.3.2",
"exp": "^44.0.0",
"expo-postpublish-slack-notify": "^1.0.0",
"husky": "^0.13.4",
"jest-expo": "~20.0.0",
"prettier": "^1.6.1",
"react-devtools": "^2.3.3",
"react-native-scripts": "0.0.30",
"react-test-renderer": "16.0.0-alpha.6"
},
Steps to Reproduce
- Use CRNA with Expo SDK 22 (non ejected)
- Install this dependency and require it anywhere in your app:
"react-native-gallery": "^0.0.17",
- Start the app, and see for yourself a very unhelpful error message and stacktrace:
Expected Behavior
The ExceptionsManager should log root exception cause here:
Here the root cause is pretty obvious for an experienced RN developer (the lib uses React.PropTypes.bool
while this has been removed, and app startup crashes on JS load)
This would be extremely useful to avoid loosing time debugging the root cause to log the stacktrace or the full error instead of just the e.message
string.
That would permit the developer to navigate easily through his Chrome developper tools to the root cause file.
Actual Behavior
The errors and stacktraces offered to the developer are very unhelpful, particularly for more complex cases where the message is not clear to understand what's happening.
Even in this case, I know perfectly what is happening, yet I have to debug to know which library does produce this behavior. I should just have to click on the stacktrace to get this information.
Reproducible Demo
I can add one if needed but honnestly I think this bug report is good enough to change console.error(e.message)
to console.error(e)
:)
Other
This issue has already been reported recently but closed: #16205