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

[ScrollView] Cannot find view with tag #XXX #1941

Closed
ilansas opened this issue Jul 10, 2015 · 31 comments
Closed

[ScrollView] Cannot find view with tag #XXX #1941

ilansas opened this issue Jul 10, 2015 · 31 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ilansas
Copy link

ilansas commented Jul 10, 2015

Hello,

Sometimes when I'm scrolling or doing some swipes I'm getting these kind of errors (crashing the app). The error can be thrown multiple time for a same scroll with a different tag for each of them :

2015-07-10 16:46:59.859 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #208
2015-07-10 16:46:59.866 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #202
2015-07-10 16:46:59.872 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #175
2015-07-10 16:46:59.879 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #175
2015-07-10 16:46:59.885 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #175
2015-07-10 16:46:59.892 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #222
2015-07-10 16:46:59.898 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #215
2015-07-10 16:46:59.905 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #228
2015-07-10 16:46:59.911 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #195
2015-07-10 16:46:59.918 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #188
2015-07-10 16:46:59.925 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #182
2015-07-10 16:46:59.931 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #168
2015-07-10 16:46:59.937 [error][tid:main][RCTScrollViewManager.m:105] Cannot find view with tag #162

Screen error

This doesn't seem to happen in debug mode (it never happened until now).

@brentvatne brentvatne changed the title Cannot find view with tag #XXX [ScrollView] Cannot find view with tag #XXX Jul 10, 2015
@magicismight
Copy link
Contributor

+1
It happened sometimes when I inspect element.

@MossP
Copy link

MossP commented Jul 14, 2015

+1 Strangely I get the opposite trigger. I cannot get it to happen the JS in bundled into the app but it frequently happens when the app is running via the packager but I'm yet to see it unless I have https://github.com/Shuangzuan/RCTRefreshControl active for that particular <ListView/>

note. The errors I have seen are with <ListView/> not <ScrollView/>

@aljs
Copy link
Contributor

aljs commented Jul 15, 2015

Are there any solutions?
Have this error (using https://github.com/Shuangzuan/RCTRefreshControl), while running on device as well.

@ilansas
Copy link
Author

ilansas commented Jul 15, 2015

Updating React-Native with master doesn't seem to give me the error anymore...

@MossP
Copy link

MossP commented Jul 15, 2015

Which version of RN are you running @ilansas?

@MossP
Copy link

MossP commented Jul 15, 2015

Master looks like it's out of date. It currently says v0.6.0, @ilansas.

@ilansas
Copy link
Author

ilansas commented Jul 16, 2015

Yep v0.6.0, I was working on the previous version of master, the error was thrown there. So I updated it.

@MossP
Copy link

MossP commented Jul 16, 2015

My point is that the master that you have downloaded is out of date. v0.7.1 is current release and v0.8.0 will be out soon.

The bug began in v0.7.0.

You have, in fact, downgraded to fix the problem.

On 16 Jul 2015, at 09:11, Ilan Sasportas notifications@github.com wrote:

Yep v0.6.0, I was working on the previous version of master, the error was thrown there. So I updated it.


Reply to this email directly or view it on GitHub.

@sahrens
Copy link
Contributor

sahrens commented Jul 16, 2015

Note that we haven't been very good about updating the version numbers in the source as we make new releases...

On Jul 16, 2015, at 12:25 PM, Moss Palmer notifications@github.com wrote:

My point is that the master that you have downloaded is out of date. v0.7.1 is current release and v0.8.0 will be out soon.

The bug began in v0.7.0.

You have, in fact, downgraded to fix the problem.

On 16 Jul 2015, at 09:11, Ilan Sasportas notifications@github.com wrote:

Yep v0.6.0, I was working on the previous version of master, the error was thrown there. So I updated it.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@ilansas
Copy link
Author

ilansas commented Jul 16, 2015

@MossP Sorry, you might be right, the actual master is on v0.8, I didn't downgraded anything I just ran npm i which is based on master, so I was probably under 0.7.

@MossP
Copy link

MossP commented Jul 16, 2015

@ilansas Yeah, master got updated just after we spoke.

@ilansas
Copy link
Author

ilansas commented Jul 20, 2015

Well to be clear I'm under v0.8.0 and I'm getting the error

@MossP
Copy link

MossP commented Jul 20, 2015

Yea, me too (0.8.0-rc.2) :) It all got a bit confusing then, sorry.

@brentvatne
Copy link
Collaborator

I've seen this before as well, definitely worth looking into 👍 I haven't been able to create a reproducible example, so it would be great if someone could post one up here!

@cssoul
Copy link

cssoul commented Jul 21, 2015

+1 ,0.8.0.-rc ,when I onpress some element of scrollView, it crash.

@brentvatne
Copy link
Collaborator

@cssoul - I'm not having that problem, do you have a reproducible example project?

@ilansas
Copy link
Author

ilansas commented Jul 21, 2015

Ok, I might have some news here. This seems to happen only when you enable Live Reload, here are the cases I observed :

  • Live Reload disabled, clic on Enable Live Reload --> the error doesn't seem to be thrown in the future
  • Live Reload disabled, clic on Enable Live Reload, Reload (cmd + R) --> the error is thrown in the future
  • Live Reload enabled, clic on Disable Live Reload --> the error is thrown in the future
  • Live Reload enabled, clic on Disable Live Reload, Reload (cmd + R) --> the error doesn't seem to be thrown in the future

@NishanthShankar
Copy link

@ilansas I am not sure if that is true. I get the error on the iPhone too.
My assumption is that this error occurs if you try to perform an action before the scrollview renders its rows have been rendered.

Will try to create a reproducible example project

@MossP
Copy link

MossP commented Jul 28, 2015

@NishanthShanker, I don't think @ilansas was suggesting that it only happens on the simulator.

@ilansas
Copy link
Author

ilansas commented Jul 28, 2015

Yep as said @MossP I wasn't suggesting that, I assume you based your thought on the (cmd+R), I just wanted to be precise about the "Reload".

@NishanthShankar
Copy link

@ilansas Sorry my bad.

@josebalius
Copy link

Anything else on this guys? I have been getting these errors more frequently as well.

@NishanthShankar
Copy link

I was able to bypass this error by adding a timeout before the interaction is executed. Though this reduces the responsiveness of the app by a bit, it doesn't throw the error anymore

@josebalius
Copy link

@NishanthShankar so did i, however at times i can still get it to throw the error. It's not the best solution (timeout) :/

@danscan
Copy link
Contributor

danscan commented Aug 6, 2015

Can confirm I'm encountering this when I press on TouchableHighlight or TouchableOpacity within a ScrollView/ListView, but I'm not encountering it with TouchableWithoutFeedback in the same place.

@admmasters
Copy link
Contributor

Just seen this for the first time when jumping between tabs and I think I was touching the ListView while it happened.

@hmm29
Copy link

hmm29 commented Aug 18, 2015

I was encountering this exact error when jumping between tabs / rapidly navigating between routes while testing my app

I fixed it by decreasing the intialListSize prop value from 10 to 3. I think the error occurs because I was navigating away so quickly before the initial render had time to fully complete.

                <ListView
                  dataSource={this.state.dataSource}
                  renderRow={this._renderRow}
                  renderHeader={this._renderHeader}
                  initialListSize={3}
                  automaticallyAdjustContentInsets={false}
                  />

Perhaps try explicitly setting this prop's value to something small?

@ide
Copy link
Contributor

ide commented Aug 18, 2015

Looking through ListView.js, I imagine the cause of this is several callbacks that don't check if the component is still mounted :/

@mattds
Copy link

mattds commented Aug 22, 2015

I'm also getting this error, it's tricky to reproduce, may need to be reloaded a few times before it throws this error but here's an example of this: https://rnplay.org/apps/0OLARw

@osdio
Copy link

osdio commented Aug 26, 2015

I'm also get this error, I don't know how it happen.

@sahrens sahrens closed this as completed in 2b3a4bd Sep 4, 2015
MattFoley pushed a commit to skillz/react-native that referenced this issue Nov 10, 2015
Summary:
When bridge calls are made, they should be dispatched to their
destination GCD queue in the same order they were made. (It
looks like this invariant broke in 336e18d, which caused call
order to depend on the iteration of `NSMapTable` keys
whenever there are calls to multiple modules that share a queue)

Fixes facebook#1941 (in which RCTUIManager createView addUIBlock
blocks were sometimes running after other blocks that depended
on them)

I'm a react-native/iOS/objc newbie, so please excuse any
ignorance this commit may well contain :)
Closes facebook#2488
Github Author: Ted Suzman <ted@suzman.net>
@eseQ
Copy link

eseQ commented May 4, 2017

Ok, i think i found answer why i had that crash:
I use ListView with onEndReached, like many people

<ListView
  dataSource={this.state.dataSource}
  onEndReached={handleLoadMore}
  onEndReachedThreshold={100}
  renderRow={this.renderRow}
/>

and simple loader after list:

{isFetchingMore && this.renderLoading()}

That work in "Container" with connect to Redux and other functions, but dosnt work in "Component" (I have no idea why). But (!) if wrap loader in `

<View>{isFetchingMore && this.renderLoading()}</View>

That problem gone!

I think react-native need know about elements after <ListView>.
I hove that can help someone =)

@facebook facebook locked as resolved and limited conversation to collaborators Jul 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests