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

Error with createAnimatedComponent after React and React-DOM upgrade to 16.10.1 #1443

Closed
mohsinulhaq opened this issue Sep 30, 2019 · 4 comments

Comments

@mohsinulhaq
Copy link

The problem
https://codesandbox.io/s/goofy-paper-i3kux
In the above sandbox, I create an animated component out of TouchableOpacity.
Until React 16.9.0, everything works fine. But after the recent 16.10.x upgrade, I am getting two console errors on hovering into the page on Chrome.

Uncaught TypeError: Cannot read property 'type' of null
    at Object.ResponderEventPlugin.extractEvents (index.js:66)
    at extractPluginEvents (react-dom.development.js:901)
    at runExtractedPluginEventsInBatch (react-dom.development.js:913)
    at handleTopLevel (react-dom.development.js:5848)
    at batchedEventUpdates$1 (react-dom.development.js:24346)
    at batchedEventUpdates (react-dom.development.js:1463)
    at dispatchEventForPluginEventSystem (react-dom.development.js:5943)
    at attemptToDispatchEvent (react-dom.development.js:6059)
    at dispatchEvent (react-dom.development.js:5963)
    at dispatchUserBlockingUpdate (react-dom.development.js:5933)
Uncaught TypeError: Cannot read property 'forEach' of undefined
    at Object.recordTouchTrack (react-dom-unstable-native-dependencies.development.js:1186)
    at Object.extractEvents (react-dom-unstable-native-dependencies.development.js:1693)
    at Object.ResponderEventPlugin.extractEvents (index.js:86)
    at extractPluginEvents (react-dom.development.js:901)
    at runExtractedPluginEventsInBatch (react-dom.development.js:913)
    at handleTopLevel (react-dom.development.js:5848)
    at batchedEventUpdates$1 (react-dom.development.js:24346)
    at batchedEventUpdates (react-dom.development.js:1463)
    at dispatchEventForPluginEventSystem (react-dom.development.js:5943)
    at attemptToDispatchEvent (react-dom.development.js:6059)
    at dispatchEvent (react-dom.development.js:5963)
    at dispatchUserBlockingUpdate (react-dom.development.js:5933)

On Firefox, I get:

TypeError: nativeEvent.changedTouches is undefined116 vendor-456a9552d8d9dd69d20d.chunk.js line 6248 > eval:1186:7
    React 2
        recordTouchTrack
        extractEvents
    extractEvents index.js:77
    React 9
        extractPluginEvents
        runExtractedPluginEventsInBatch
        handleTopLevel
        batchedEventUpdates$1
        batchedEventUpdates
        dispatchEventForPluginEventSystem
        attemptToDispatchEvent
        dispatchEvent
        dispatchUserBlockingUpdate
    dispatchUserBlockingUpdate self-hosted:1104

Expected behavior
No console error.

Environment (include versions). Did this work in previous versions?

  • React Native for Web (version): 0.11.7
  • React (version): 16.10.1
  • Browser: Chrome 77, Firefox 69.0.1
@acdlite
Copy link

acdlite commented Oct 3, 2019

Fixed in React v16.10.2: https://github.com/facebook/react/releases/tag/v16.10.2

@necolas
Copy link
Owner

necolas commented Oct 4, 2019

Thanks Andrew

@necolas necolas closed this as completed Oct 4, 2019
@arnava17
Copy link

@necolas We are planning to upgrade the react version to 16.10.2. When are you planning to release a build which has this fix incorporated?

@necolas
Copy link
Owner

necolas commented Nov 26, 2019

The fix is in React

Repository owner locked as resolved and limited conversation to collaborators Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants