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

Crash: null is not an object (evaluating '_this.scrollViewRef.props) #1390

Closed
koke opened this issue Sep 27, 2019 · 3 comments · Fixed by WordPress/gutenberg#17899 or #1438
Closed

Comments

@koke
Copy link
Member

koke commented Sep 27, 2019

While testing #1361 I came across one crash that seems unrelated to it (also reproduced on current develop).

To reproduce:

  • Create a new post
  • Insert an image and upload a photo from the device
  • When it uploads, insert a media-text block
  • Remove both blocks
  • Dismiss the keyboard (or insert a video block)
  • Crash
@koke
Copy link
Member Author

koke commented Sep 27, 2019

When I delete the media-text block, I'm seeing this in Chrome devtools:

TypeError: Cannot read property 'name' of null
    at index.native.js:150
    at Object.mapSelect [as current] (index.js:54)
    at onStoreChange (index.js:127)
    at index.js:154
    at registry.js:56
    at Array.forEach (<anonymous>)
    at globalListener (registry.js:56)
    at index.js:85
    at dispatch (createStore.js:186)
    at index.js:24

Screen Shot 2019-09-27 at 11 56 35

@koke koke added the [OS] iOS label Sep 27, 2019
@koke
Copy link
Member Author

koke commented Sep 27, 2019

The crash happens on KeyboardAwareFlatList. There's a setTimeout and when it executes, this.scrollViewRef is null

@pinarol
Copy link
Contributor

pinarol commented Sep 27, 2019

Makes sense, before the inner blocks there were no case like scrollViewRef being null because the only KeyboardAwareFlatList was the main one.

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