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

Upgrading from 4.0.0-beta27 to 4.0.0 breaks app #3198

Closed
dextermb opened this issue Aug 22, 2018 · 5 comments
Closed

Upgrading from 4.0.0-beta27 to 4.0.0 breaks app #3198

dextermb opened this issue Aug 22, 2018 · 5 comments

Comments

@dextermb
Copy link
Contributor

I am attempting to upgrade my app from 4.0.0-beta27 to 4.0.0 but it seems to break from an internal error:

08-22 11:35:14.276  7494  7961 E ReactNativeJS: TypeError: undefined is not an object (evaluating 'context.changedBits')
08-22 11:35:14.276  7494  7961 E ReactNativeJS:
08-22 11:35:14.276  7494  7961 E ReactNativeJS: This error is located at:
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in SceneView
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in RCTView
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in AndroidDrawerLayout
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in DrawerLayoutAndroid
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in DrawerView
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in Navigator
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in NavigationContainer
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in App
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in Router
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in App
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in ExpoRootComponent
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in RCTView
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in RCTView
08-22 11:35:14.276  7494  7961 E ReactNativeJS:     in AppContainer
08-22 11:35:14.279  7494  7961 E ReactNativeJS: TypeError: Attempted to assign to readonly property.
08-22 11:35:14.279  7494  7961 E ReactNativeJS:
08-22 11:35:14.279  7494  7961 E ReactNativeJS: This error is located at:
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in SceneView
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in RCTView
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in AndroidDrawerLayout
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in DrawerLayoutAndroid
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in DrawerView
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in Navigator
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in NavigationContainer
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in App
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in Router
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in App
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in ExpoRootComponent
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in RCTView
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in RCTView
08-22 11:35:14.279  7494  7961 E ReactNativeJS:     in AppContainer

What is context.changedBits and where can I find it? This seems to be what is breaking everything. Note that the app errors instantly upon opening.

@daviscabral
Copy link
Collaborator

daviscabral commented Aug 23, 2018

As discussed here, this is because of the new context API. I can't say much, cause I don't know anything about your environment, but try to use React > 16 and React Native > 0.55.

Probably we will need to update README to say that as well.

@dextermb
Copy link
Contributor Author

I am already on React ^16.4.2 but updating from React Native 0.54.0 to 0.55.0 doesn't seem to want to play nice. I get React Native version mismatch even after resetting cache with:

react-native-scripts start --reset-cache

Any ideas, @daviscabral?

@dextermb
Copy link
Contributor Author

dextermb commented Aug 23, 2018

In reference to updating README, I think that most of the documentation around this package needs updating. For example in the latest versions there's an onStateChange prop for Router but it's not documented (and I bet this is one that people ask about a lot).

@daviscabral
Copy link
Collaborator

React Native 0.55 does not support React 16 as you can see here https://github.com/facebook/react-native/blob/v0.55.4/package.json#L145.

Please provide failing example (with valid package versions).

For docs, PRs are welcome. The upgrade for React Navigation is pretty recent.

@dextermb
Copy link
Contributor Author

@daviscabral Thanks for the help! The dependencies seem to work working properly now:

"dependencies": {
    "base-64": "^0.1.0",
    "crypto-js": "^3.1.9-1",
    "d3": "^5.0.0",
    "d3-shape": "latest",
    "expo": "^26.0.0",
    "moment": "^2.22.2",
    "prop-types": "latest",
    "react": "^16.3.1",
    "react-native": "^0.55.4",
    "react-native-datepicker": "^1.7.1",
    "react-native-keyboard-spacer": "^0.4.1",
    "react-native-picker-select": "^3.1.2",
    "react-native-render-html": "^3.10.0",
    "react-native-router-flux": "github:aksonov/react-native-router-flux",
    "react-native-svg-charts": "^4.2.0",
    "react-navigation": "^2.11.2"
}

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

No branches or pull requests

2 participants