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

Connect swallows errors #933

Closed
janwirth opened this issue Apr 23, 2018 · 3 comments
Closed

Connect swallows errors #933

janwirth opened this issue Apr 23, 2018 · 3 comments

Comments

@janwirth
Copy link

TL;DR - the error information forwarded through selector is not sufficient. How can we get the full error?

We are currently testing our app on IE11 and noted a regression that can be traced back to a dependency upgrade.

      Connect.prototype.render = function render() {
        var selector = this.selector;
        selector.shouldComponentUpdate = false;

        if (selector.error) {
          throw selector.error; // error is thrown.
        } else {
          return Object(react__WEBPACK_IMPORTED_MODULE_2__["createElement"])(WrappedComponent, this.addExtraProps(selector.props));
        }
      };

The only error we get is the following
screen shot 2018-04-23 at 15 54 13

No line number or any additional diagnostic information is passed.
The selector object only has the key error populated with a string that does not give us any additional information.

We were digging for the last few hours with no success, also tried downgrading the react dependencies but were not able to fix it.

We use have the following deps:

    "@types/enzyme": "^3.1.9",
    "@types/enzyme-adapter-react-16": "^1.0.2",
    "@types/isomorphic-fetch": "0.0.34",
    "@types/jest": "^22.2.0",
    "@types/lodash": "^4.14.105",
    "@types/node": "^9.4.7",
    "@types/react": "^16.0.40",
    "@types/react-dom": "^16.0.4",
    "@types/react-loadable": "^5.3.3",
    "@types/react-redux": "^5.0.15",
    "@types/react-test-renderer": "^16.0.1",
    "@types/redux-mock-store": "0.0.13",
    "@types/jsdom": "^11.0.4",
    "@types/react-hot-loader": "^3.0.5",
    "array-find-polyfill": "^0.1.0",
    "autoprefixer": "^8.1.0",
    "awesome-typescript-loader": "^5.0.0-1",
    "copy-webpack-plugin": "^4.5.1",
    "core-js": "^2.5.3",
    "css-loader": "^0.28.11",
    "date-fns": "^1.29.0",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-16": "^1.1.1",
    "es6-object-assign": "^1.1.0",
    "es6-promise": "^4.2.4",
    "eslint": "^4.18.2",
    "eslint-config-standard-with-typescript": "^4.0.0",
    "eslint-loader": "^2.0.0",
    "eslint-plugin-import": "^2.9.0",
    "eslint-plugin-jest": "^21.15.0",
    "eslint-plugin-node": "^6.0.1",
    "eslint-plugin-promise": "^3.7.0",
    "eslint-plugin-standard": "^3.0.1",
    "eslint-plugin-typescript": "^0.10.0",
    "extract-text-webpack-plugin": "^4.0.0-beta.0",
    "file-loader": "^1.1.11",
    "generate-json-webpack-plugin": "^0.2.2",
    "html-webpack-plugin": "^3.0.6",
    "html-webpack-template": "^6.1.0",
    "identity-obj-proxy": "^3.0.0",
    "idx": "^2.2.0",
    "intersection-observer": "^0.5.0",
    "isomorphic-fetch": "^2.2.1",
    "jest": "^22.4.2",
    "node-sass": "^4.7.2",
    "postcss-loader": "^2.1.1",
    "raf": "^3.4.0",
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "react-hot-loader": "^4.0.0",
    "react-intersection-observer": "^3.0.3",
    "react-loadable": "^5.3.1",
    "react-redux": "^5.0.7",
    "react-test-renderer": "^16.2.0",
    "redux": "^3.7.2",
    "redux-mock-store": "^1.5.1",
    "redux-test-utils": "^0.2.2",
    "redux-thunk": "^2.2.0",
    "sass-loader": "^6.0.7",
    "style-loader": "^0.20.3",
    "stylelint": "^9.1.3",
    "stylelint-config-sass-guidelines": "^5.0.0",
    "stylelint-order": "^0.8.1",
    "stylelint-scss": "^2.5.0",
    "stylelint-webpack-plugin": "^0.10.3",
    "ts-jest": "^22.4.1",
    "typescript": "^2.7.2",
    "typescript-eslint-parser": "^14.0.0",
    "typings-for-css-modules-loader": "^1.7.0",
    "webpack": "^4.1.1",
    "webpack-cli": "^2.0.12",
    "webpack-dev-server": "^3.1.1",
    "webpack-merge": "^4.1.2"
@markerikson
Copy link
Contributor

Duplicate of #802 . I'm not sure we have a specific repro or a solution yet.

@janwirth
Copy link
Author

Are you sure? We are using the regular connect function, not advancedConnect

@timdorr
Copy link
Member

timdorr commented Apr 23, 2018

connect uses connectAdvanced. It's a wrapper for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants