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

ReactNativeJS: TypeError: undefined is not an object (evaluating 'context.changedBits') #3174

Closed
abhishekgargx opened this issue Aug 13, 2018 · 5 comments · Fixed by #3195
Closed
Labels
backwards-incompatible Breaking changes

Comments

@abhishekgargx
Copy link

abhishekgargx commented Aug 13, 2018

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.1
  • react-native v0.54
  • react 16.3.1

Expected behaviour

import React from 'react';
import { AppRegistry } from 'react-native';
import { Router, Scene } from 'react-native-router-flux';
import { Provider } from 'react-redux';
import store from './app/store/store';
import PostAd from './app/components/PostAd';
import SignUp from './app/components/SignUp';

const App = () => (
< Provider store={store}>
< Router hideNavBar= "true">
< Scene key="root">
< Scene key="PostAd" component={PostAd} title="" initial={true} />
< Scene key="SignUp" component={SignUp} title="" />
< /Scene>
< /Router>
< /Provider>
);

//when i use without RFNF it works fine ,
//const App = () => (
// < Provider store={store}>
// < PostAd>
// < /Provider>
// );

AppRegistry.registerComponent('ABC', () => App);

should work with out any problem,

Actual behaviour

LOG
08-13 13:17:09.919 23416 23416 D ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
08-13 13:17:09.919 23416 23416 D ReactNative: ReactInstanceManager.recreateReactContextInBackground()
08-13 13:17:09.919 23416 23416 D ReactNative: ReactInstanceManager.runCreateReactContextOnNewThread()
08-13 13:17:09.919 23416 23416 D ReactNative: ReactInstanceManager.tearDownReactContext()
08-13 13:17:09.919 23416 23416 D ReactNative: CatalystInstanceImpl.destroy() start
08-13 13:17:09.924 23416 23531 D ReactNative: ReactInstanceManager.createReactContext()
08-13 13:17:10.054 23416 23531 D ReactNative: Initializing React Xplat Bridge.
08-13 13:17:10.064 23416 23531 D ReactNative: Initializing React Xplat Bridge before initializeBridge
08-13 13:17:10.109 23416 23534 D ReactNative: CatalystInstanceImpl.destroy() end
08-13 13:17:10.114 23416 23531 D ReactNative: Initializing React Xplat Bridge after initializeBridge
08-13 13:17:10.114 23416 23531 D ReactNative: CatalystInstanceImpl.runJSBundle()
08-13 13:17:10.114 23416 23536 D ReactNative: ReactInstanceManager.setupReactContext()
08-13 13:17:10.114 23416 23536 D ReactNative: CatalystInstanceImpl.initialize()
08-13 13:17:10.114 23416 23536 D ReactNative: ReactInstanceManager.attachRootViewToInstance()
08-13 13:17:11.729 23416 23535 I ReactNativeJS: Running application "PINTP2P" with appParams: {"rootTag":11}. DEV === true, development-level warning are ON, performance optimizations are OFF
08-13 13:17:11.909 23416 23535 E ReactNativeJS: TypeError: undefined is not an object (evaluating 'context.changedBits')
08-13 13:17:11.909 23416 23535 E ReactNativeJS:
08-13 13:17:11.909 23416 23535 E ReactNativeJS: This error is located at:
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in SceneView (at StackViewLayout.js:563)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in View (at StackViewLayout.js:562)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in View (at StackViewLayout.js:561)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in View (at createAnimatedComponent.js:147)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in AnimatedComponent (at StackViewCard.js:12)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in Card (at createPointerEventsContainer.js:28)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in Container (at StackViewLayout.js:612)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in View (at StackViewLayout.js:470)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in View (at StackViewLayout.js:469)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in StackViewLayout (at withOrientation.js:30)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in withOrientation (at StackView.js:63)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in View (at Transitioner.js:169)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in Transitioner (at StackView.js:21)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in StackView (at createNavigator.js:59)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in Navigator (at createKeyboardAwareNavigator.js:11)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in KeyboardAwareNavigator (at createNavigationContainer.js:376)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in NavigationContainer (at Router.js:97)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in App (at Router.js:122)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in Router (at index.js:16)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in Provider (at index.js:15)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in App (at renderApplication.js:35)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in View (at AppContainer.js:102)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in View (at AppContainer.js:122)
08-13 13:17:11.909 23416 23535 E ReactNativeJS: in AppContainer (at renderApplication.js:34)
08-13 13:17:11.929 23416 23535 W ReactNativeJS: Warning: Unexpected pop.
08-13 13:17:11.939 23416 23535 E ReactNativeJS: TypeError: Attempted to assign to readonly property.
08-13 13:17:11.939 23416 23535 E ReactNativeJS:
08-13 13:17:11.939 23416 23535 E ReactNativeJS: This error is located at:
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in SceneView (at StackViewLayout.js:563)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in View (at StackViewLayout.js:562)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in View (at StackViewLayout.js:561)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in View (at createAnimatedComponent.js:147)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in AnimatedComponent (at StackViewCard.js:12)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in Card (at createPointerEventsContainer.js:28)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in Container (at StackViewLayout.js:612)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in View (at StackViewLayout.js:470)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in View (at StackViewLayout.js:469)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in StackViewLayout (at withOrientation.js:30)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in withOrientation (at StackView.js:63)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in View (at Transitioner.js:169)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in Transitioner (at StackView.js:21)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in StackView (at createNavigator.js:59)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in Navigator (at createKeyboardAwareNavigator.js:11)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in KeyboardAwareNavigator (at createNavigationContainer.js:376)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in NavigationContainer (at Router.js:97)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in App (at Router.js:122)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in Router (at index.js:16)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in Provider (at index.js:15)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in App (at renderApplication.js:35)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in View (at AppContainer.js:102)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in RCTView (at View.js:78)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in View (at AppContainer.js:122)
08-13 13:17:11.939 23416 23535 E ReactNativeJS: in AppContainer (at renderApplication.js:34)
08-13 13:17:11.949 23416 23535 W ReactNativeJS: Warning: Unexpected pop.
08-13 13:17:11.949 23416 23535 E ReactNativeJS: Should have found an error boundary. This error is likely caused by a bug in React. Please file an issue.

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.

  1. using 2 screen simply
  2. one is marked intial
@abhishekgargx
Copy link
Author

?

@abhishekgargx abhishekgargx changed the title Unable to use , RNRF getting error : bug of REACT file an issue [Important] Unable to use , RNRF getting error : bug of REACT file an issue Aug 15, 2018
@daviscabral
Copy link
Collaborator

@Abhishekgarg727 I am not able to reproduce it here - could you provide an example using the code from the repo (Example or ReduxExample)? Thank you.

@abhishekgargx
Copy link
Author

@daviscabral yeah it is simple just create sample two screens using react native than attach your whole react native code in android app , when we simply use RNRF for the navigating from one screen to another it show above log.
could tell what is possible problem will causing this , by reading log i mentioned above.

Thank you.

@abhishekgargx
Copy link
Author

@daviscabral can you put this JSON in your read me docs, so that future beginners don't need to struggle and also save time. below is my updated package.json which work flawlessly with android.

Because only using react-native-router-flux as dependency does not work.

{
  "name": "Example",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "resolutions": {
    "*/@babel/cli": "7.0.0-beta.54",
    "*/@babel/core": "7.0.0-beta.54",
    "*/@babel/code-frame": "7.0.0-beta.54"
  },
  "dependencies": {
    "eslint": "^5.2.0",
    "prop-types": "^15.6.2",
    "react": "16.3.1",
    "react-native": "0.55.4",
    "react-native-router-flux": "^4.0.1",
    "react-navigation": "^2.11.2",
    "react-redux": "^5.0.7",
    "redux": "^4.0.0",
    "redux-logger": "^3.0.6",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "babel-jest": "23.4.2",
    "babel-preset-react-native": "4.0.0",
    "jest": "23.5.0",
    "react-test-renderer": "16.4.1"
  },
  "jest": {
    "preset": "react-native"
  }
 
}

@daviscabral
Copy link
Collaborator

daviscabral commented Aug 28, 2018

I think people might refer this issue in the future - and also check the package.json from examples. BTW, react-native@ˆ0.56 is the first version to use Babel 7, and it's recommended to enforce the version beta-47 using tools like yarn resolutions.

It's possible to know more about it here: https://github.com/react-native-community/react-native-releases/blob/0.57/CHANGELOG.md

@daviscabral daviscabral changed the title [Important] Unable to use , RNRF getting error : bug of REACT file an issue ReactNativeJS: TypeError: undefined is not an object (evaluating 'context.changedBits') Aug 28, 2018
@daviscabral daviscabral added the backwards-incompatible Breaking changes label Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompatible Breaking changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants