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

null is not an object (evaluating 'this._listRef.scrollToIndex') #15968

Closed
dnish opened this issue Sep 16, 2017 · 9 comments
Closed

null is not an object (evaluating 'this._listRef.scrollToIndex') #15968

dnish opened this issue Sep 16, 2017 · 9 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@dnish
Copy link

dnish commented Sep 16, 2017

Since switching from ListView to FlatList we're getting some errors like this:

null is not an object (evaluating 'this._listRef.scrollToIndex')

They happen rarely, but I could confirm that this also happened on one of my devices (OnePlus 3 with Android 7). The app shutted down after I've tried to open a view with a FlatList in it. Sadly I wasn't able to reproduce it.

This is the full output:

TypeError null is not an object (evaluating 'this._listRef.scrollToIndex') 
    index.android.bundle:207:2069 value
    index.android.bundle:817:11813 value
    index.android.bundle:817:3218 
    index.android.bundle:39:562 
    index.android.bundle:32:664 callTimer
    index.android.bundle:32:1084 callTimers
    index.android.bundle:30:3208 value
    index.android.bundle:30:959 
    index.android.bundle:30:2640 value
    index.android.bundle:30:931 value

Due to our logs it only happens on Android devices. We are on React Native 0.46 and react-navigation for our routes. Maybe the view is destroyed while RN tries to access this._listRef?

@charpeni
Copy link
Contributor

@facebook-github-bot needs-repro

@facebook-github-bot
Copy link
Contributor

Can you reproduce the issue using Snack? This step is necessary for people to be able to see and debug the issue being reported. See "How to Contribute".

@facebook-github-bot facebook-github-bot added Needs more information Ran Commands One of our bots successfully processed a command. labels Sep 16, 2017
@dnish
Copy link
Author

dnish commented Sep 16, 2017

@charpeni Does this really need a repo when it appears in the error logs of Bugsnag? I'm just wondering, when I take a look into

getScrollableNode() {
there are a checks for this._listRef.

 if (this._listRef) {
      return this._listRef.getScrollableNode();
}

But this check is missing in

this._listRef.scrollToIndex(params);

I guess there is a reason why we need to check for this._listRef in the other functions? So maybe someone forgot to check for it also in scrollToIndex.

@jasongrishkoff
Copy link

Also seeing this error pop up in my Android crash logs.

@pull-bot
Copy link

@facebook-github-bot no-template

@facebook-github-bot
Copy link
Contributor

Hey, thanks for reporting this issue! It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the Issue Template? This is necessary for people to be able to understand and reproduce the issue being reported. I am going to close this, but feel free to open a new issue with the additional information provided. Thanks! See "What to Expect from Maintainers" to learn more.

@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Oct 10, 2017
@DeividVeloso
Copy link

TypeError: null is not an object (evaluating 'this._listRef.scrollToOffset')
at scrollToOffset(app:///index.android.bundle:40893:20)
at ? (app:///index.android.bundle:79013:48)
at ? (app:///index.android.bundle:4153:24)
at _callTimer(app:///index.android.bundle:4074:15)
at callTimers(app:///index.android.bundle:4268:17)
at __callFunction(app:///index.android.bundle:3637:47)
at ? (app:///index.android.bundle:3453:29)
at __guard(app:///index.android.bundle:3608:11)
at callFunctionReturnFlushedQueue(app:///index.android.bundle:3452:20)

I have same issue

@est7
Copy link

est7 commented Nov 13, 2017

@DeividVeloso did u solved it?

@DeividVeloso
Copy link

Not yet, some times ocorre.

Thanks

@facebook facebook locked as resolved and limited conversation to collaborators Oct 10, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants