react-native icon indicating copy to clipboard operation
react-native copied to clipboard

[ScrollView] Cannot find view with tag #XXX

Open ilansas opened this issue 11 years ago • 31 comments

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).

ilansas avatar Jul 10 '15 15:07 ilansas

+1 It happened sometimes when I inspect element.

magicismight avatar Jul 11 '15 01:07 magicismight

+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/>

MossP avatar Jul 14 '15 08:07 MossP

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

aljs avatar Jul 15 '15 13:07 aljs

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

ilansas avatar Jul 15 '15 14:07 ilansas

Which version of RN are you running @ilansas?

MossP avatar Jul 15 '15 15:07 MossP

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

MossP avatar Jul 15 '15 15:07 MossP

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

ilansas avatar Jul 16 '15 08:07 ilansas

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 [email protected] 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.

MossP avatar Jul 16 '15 10:07 MossP

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 [email protected] 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 [email protected] 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.

sahrens avatar Jul 16 '15 10:07 sahrens

@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.

ilansas avatar Jul 16 '15 11:07 ilansas

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

MossP avatar Jul 16 '15 14:07 MossP

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

ilansas avatar Jul 20 '15 08:07 ilansas

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

MossP avatar Jul 20 '15 08:07 MossP

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

brentvatne avatar Jul 21 '15 01:07 brentvatne

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

cssoul avatar Jul 21 '15 02:07 cssoul

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

brentvatne avatar Jul 21 '15 05:07 brentvatne

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

ilansas avatar Jul 21 '15 15:07 ilansas

@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

NishanthShankar avatar Jul 28 '15 12:07 NishanthShankar

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

MossP avatar Jul 28 '15 14:07 MossP

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".

ilansas avatar Jul 28 '15 14:07 ilansas