Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DX bug: ExceptionsManager does not log root exception cause #16661

Closed
slorber opened this issue Nov 3, 2017 · 2 comments
Closed

DX bug: ExceptionsManager does not log root exception cause #16661

slorber opened this issue Nov 3, 2017 · 2 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@slorber
Copy link
Contributor

slorber commented Nov 3, 2017

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

  1. Use CRNA with Expo SDK 22 (non ejected)
  2. Install this dependency and require it anywhere in your app: "react-native-gallery": "^0.0.17",
  3. Start the app, and see for yourself a very unhelpful error message and stacktrace:

Expected Behavior

The ExceptionsManager should log root exception cause here:

image

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

image

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

@CalderMarshall-zz
Copy link

CalderMarshall-zz commented Nov 20, 2017

I am having the same issue, the app will not boot which is particularly frustrating as I was just introduced to native and the project, so I really can't even debug without a stack trace.
{Cannot read property 'string' of undefined ExceptionsManager.js:65}
{Module AppRegistry is not a registered callable module (calling runApplication) ExceptionsManager.js:65}
Pointing to the same error handler @slorber shows above.

@stale
Copy link

stale bot commented Jan 19, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 19, 2018
@stale stale bot closed this as completed Jan 26, 2018
@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants