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

Shadow Node For Tag Does Not Exist #1789

Closed
jpshelley opened this issue Apr 19, 2018 · 11 comments
Closed

Shadow Node For Tag Does Not Exist #1789

jpshelley opened this issue Apr 19, 2018 · 11 comments
Labels

Comments

@jpshelley
Copy link

Environment

  1. react-native -v: 0.55.0
  2. npm ls rnpm-plugin-windows: 0.2.8
  3. npm ls react-native-windows: 0.55.0-rc.0

Then, specify:

  • Target Platform: UWP

  • Target Platform Version(s): UWP

  • Target Device(s): Surface

  • Development Operating System: Windows

  • Visual Studio Version: 2017

Steps to Reproduce

Upgrading from an earlier version, 0.47.0 to the now stable 0.55.0, the following error has occurred when I click on a component:

Shadow Node for Tag Does Not Exist

However, if I dismiss the RedBox in debug mode, I am then able to click on the Component again like it is supposed to work.

Expected Behavior

No Shadow Node for Tag Does Not Exist when I click on a Component

Reproducible Demo

screenshot 20

@jpshelley
Copy link
Author

This only happens on my windows code and not on iOS - I will try to get a demo project together, but it deals with a FlatList and adding an item to the list. Regardless of what that item is, it could be a Text component, just touching the item causes the error. The item doesn't even need to be touchable or have an onPress listener

@jpshelley
Copy link
Author

More detailed information - Using a ListView in place of the FlatList component fixes this problem. Its hard for me to get a reproducible demo but as I mentioned it involves:

  1. FlatList Component
  2. Adding an item to that FlatList
  3. (Optional) We're using react-navigation as well, so that might have some implications but I don't know why it would

@rozele
Copy link
Collaborator

rozele commented Apr 20, 2018

@jpshelley have you tried to repro on Android? Android and Windows share a similar UIManager architecture.

@jpshelley
Copy link
Author

@rozele double checked and not happening on Android. I'll try to create a demo project this week sometime to help diagnose the issue.

@jpshelley
Copy link
Author

I did more digging and the above was false - I now think its because of a custom Modal component. We've attempted something similar to #618 in our code base to use the Modal component. As soon as that modal is dismissed, if I click in the Component that contains the FlatList or ListView it produces the crash.
If remove the modal logic it performs fine.

@jpshelley
Copy link
Author

Sorry for the barrage of comments, but I want to make sure I'm adding additional info as I find it:

This makes me think there is a threading issue with updating the shadow nodes?

@creambyemute
Copy link

creambyemute commented Jun 29, 2018

I'm experiencing this as well.

Though it happens only in one single case for me:

I made a tagging component, If I add a new tag and navigate away from the view this error occurs.
Removing tags works fine.

I'll try to create a repro project

Edit: Haven't come around yet, will try this week!

Edit2: Working on repro repo now. Have to continue tomorrow as I just have a mac at home

@creambyemute
Copy link

creambyemute commented Jul 10, 2018

@jpshelley @rozele So, I finally finished creating the reproduction repository: https://github.com/creambyemute/RNWindowsShadowNodeReproduction

How to reproduce:

  1. Start UWP App
  2. On HomeScreen click the addTag icon
  3. Enter Text and submit with Enter-Key
  4. Click on LaunchModal or switch tab and click on LaunchModal
  5. Shadow Node for tag 'someNumber' does not exist

This didn't happen in 0.53 or 0.54 if I remember correctly.

Works fine on iOS/Android

@jayfar
Copy link

jayfar commented Aug 6, 2018

@creambyemute Thanks for the reproducable demo! I have been struggling in my React Native for WPF project with the same issue, but it was seldom and seemed random. I could never get it to happen when I wanted to dig into the problem.

Using your demo, as a quick workaround to the problem, I added a try catch around this bit of core code (found in .\node_modules\react-native-windows\ReactWindows\ReactNative.Shared\UIManager) and it seems to ignore the error without crashing.

https://github.com/Microsoft/react-native-windows/blob/6e781c4638815e987781a8cff578ce863a53ee92/ReactWindows/ReactNative.Shared/UIManager/UIImplementation.cs#L577-L578

It looks like not much progress has been made in general (releases, updates, etc) on this React Native for Windows project in a while. I wonder if this project is dying or dead? I hope not.

@creambyemute
Copy link

@jayfar I also hope not.

And great finding, thx!

@rozele rozele added the .NET label Feb 26, 2019
@chrisglein chrisglein added the .NET Archive Issue opened against deprecated .NET implementation, will be closed (label drives bot activity) label Oct 25, 2019
@ghost
Copy link

ghost commented Oct 25, 2019

We are not investing in new features or lower priority bug fixes on vCurrent. The bulk of investment is now in vNext as we prepare to make that the default choice. If this issue is still relevant on the vNext implementation please open a vNext issue. If this issue is of significant severity for a vCurrent app and vNext is not an option, re-open with justification.

@ghost ghost removed the .NET Archive Issue opened against deprecated .NET implementation, will be closed (label drives bot activity) label Oct 25, 2019
@chrisglein chrisglein added the .NET Archive Issue opened against deprecated .NET implementation, will be closed (label drives bot activity) label Oct 25, 2019
@ghost ghost removed the .NET Archive Issue opened against deprecated .NET implementation, will be closed (label drives bot activity) label Oct 25, 2019
@ghost ghost closed this as completed Oct 25, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants