TypeError in AnimatedComponent : Cannot read property '__getValue' of undefined
See original GitHub issueThe code above, is a very simple test, which was passing till RN 0.53.3, since we upgrade to 0.54.0 it stopped working
Environment
Environment: OS: macOS High Sierra 10.13.3 Node: 9.3.0 Yarn: 1.5.1 npm: 5.6.0 Watchman: 4.9.0 Xcode: Xcode 9.2 Build version 9C40b Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed) react: 16.3.0-alpha.1 => 16.3.0-alpha.1 react-native: 0.54.0 => 0.54.0
Expected Behavior
Test should pass
Actual Behavior
Test results ( jest --coverage --runInBand --forceExit
)
FAIL src/__tests__/App.spec.js (16.805s)
console.error node_modules/react-test-renderer/cjs/react-test-renderer.development.js:5530
The above error occurred in the <AnimatedComponent> component:
in AnimatedComponent (created by Card)
in Card (created by Container)
in Container (created by CardStack)
in View (created by View)
in View (created by CardStack)
in View (created by View)
in View (created by CardStack)
in CardStack (created by Transitioner)
in View (created by View)
in View (created by Transitioner)
in Transitioner (created by CardStackTransitioner)
in CardStackTransitioner
in Unknown (created by Navigator)
in Navigator (created by NavigationContainer)
in NavigationContainer (created by App)
in MQTTClient (created by MQTTReduxStoreSynchronizer)
in MQTTReduxStoreSynchronizer (created by Connect(MQTTReduxStoreSynchronizer))
in Connect(MQTTReduxStoreSynchronizer) (created by App)
in BackgroundLocationContext (created by Connect(BackgroundLocationContext))
in Connect(BackgroundLocationContext) (created by App)
in Wrapper (created by Connect(Wrapper))
in Connect(Wrapper) (created by App)
in ThemeProvider (created by App)
in View (created by View)
in View (at Root.js:13)
in Root (created by Styled(Root))
in Styled(Root) (created by App)
in MQTTProvider (created by App)
in CrashReporting (created by Connect(CrashReporting))
in Connect(CrashReporting) (created by App)
in App (created by Connect(App))
in Connect(App)
in Provider
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
● renders correctly
TypeError: Cannot read property '__getValue' of undefined
at AnimatedComponent.render (node_modules/react-native/Libraries/Animated/src/createAnimatedComponent.js:147:9)
at finishClassComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:3656:31)
at updateClassComponent (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:3633:12)
at beginWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:4008:16)
at performUnitOfWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6007:16)
at workLoop (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6071:26)
at Object.invokeGuardedCallback$1 (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:1559:10)
at invokeGuardedCallback (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:1506:29)
at renderRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6149:7)
at performWorkOnRoot (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6797:24)
at performWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6750:7)
at requestWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6661:7)
at scheduleWorkImpl (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6515:11)
at scheduleWork (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6472:12)
at scheduleTopLevelUpdate (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6976:5)
at Object.updateContainer (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:7014:7)
Steps to Reproduce
import React from 'react'
import renderer from 'react-test-renderer'
import App from '../App'
import createStore from '../createStore'
import { Provider } from 'react-redux'
it('renders correctly', () => {
const store = createStore()
const wrapper = renderer.create(
<Provider store={store}>
<App />
</Provider>
)
wrapper.unmount()
})
Issue Analytics
- State:
- Created 6 years ago
- Reactions:21
- Comments:12 (4 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'getValue' of undefined #151
Adding new cards into the deck in random positions (top, middle of deck for instance) or moving cards (shuffling) within the deck (ex:...
Read more >Cannot read property 'getValue' of undefined at onEdit - Stack ...
Try running it this way: Run test_onxxxEdit(); function test_onxxxEdit() { const ss=SpreadsheetApp.getActive(); const sh=ss.
Read more >TypeError: Cannot read property 'getValue' of undefined
The problem is not the getvalue, the problem is the undefined. the engine has been given a reference to a data object that...
Read more >TypeError: Cannot read property 'getValues' of undefined
I'm struggling to automate a time off request sheet to google calendar. When I hit run this is one of my code errors:...
Read more >Cannot read property 'getValue' of undefined" | SAP Community
"Uncaught TypeError: Cannot read property 'getValue' of undefined" ... Hi all ,. I am trying to do CRUD operations using my own OData...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had this issue too and solved it by making sure my
react-test-renderer
dependency matches the React version that React Native depends on. i.e.@coffenbacher I have this working as of today try that.
"react": "16.3.2", "react-dom": "16.3.2", "react-native": "0.55.0", "react-test-renderer": "16.3.2",