React-devtools: Error: "Expected to find at least one React renderer."

Created on 21 May 2018  路  10Comments  路  Source: facebook/react-devtools

I get the following error when I try clicking on one of the elements under Inspector mode:

screenshot from 2018-05-21 16-35-59

I've installed react-devtools following the instructions here.
react-devtools opens and connects to my app, but when I click on any element, I get the above red box error.
If this isn't a react-devtools related error, can someone please direct me where to look? Thanks in advance!

Platform: Android 5.1.1 Lollipop running on Genymotion
Host OS: Ubuntu 16.04 LTS
React Native: 0.55.4 (project created using react-native init)

Most helpful comment

All 10 comments

Same issue here... But it is not an react-devtools bug, it happens even without the react-devtools.
Seems to be an react or some other package issue.

Android 6.0
RN 55
Expo 27

I have the same problem.
Android Emulator
Android 6.0

same problem
Android 6.0.

Same issue here, I tracked it as far as the UIViewOperationQueue class before I stopped being able to follow the logic.

in react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java, in the inner class FindTargetForTouchOperation, in it's execute method, it's hitting one of the two try-catch blocks and running mCallback.invoke();. Because the callback is called without any of it's expected parameters the tagId is undefined all the way back up the callstack until it reaches getInspectorDataForViewTag in the JS code and triggers the error.

No idea how to resolve it, but hopefully that assists someone that can?

RN 56, android emulator 6.0 here

Hi guys, anyone found a solution for this problem , I am getting the same issue

The problem seems to be the package react-native-root-siblings which is used by some other packages (like react-native-root-toast) if you remove the package that has this dependency the error will stop.
I can't say this is true for all the cases, but it is true for my case:
https://github.com/magicismight/react-native-root-toast/issues/89

@samuelpismel Your guess is right. I am now the maintainer of react-native-root-siblings and I noticed this issue. And I spent 3 hours to test all the reasons that I can imagine, and finally I found it!

  1. react-native-root-siblings uses an api called setWrapperComponentProvider to insert itself with a wrapperContainer into AppContainer.js, which enables it to insert/update react nodes outside user root component.
  2. Now if we want to update root-siblings, we actually update the wrapperContainer and hence would cause any of its children to update. So we used a StaticContainer to make user component stay away from root-siblings changes.
  3. So far so good, however, there is an android-only optimization called collapsable which would remove some layout-only views. Inspector needs complete views so it would disable this optimization once user toggled inspector on.
  4. But due to the usage of StaticContainer in the wrapperContainer, the collapsable optimization can not be disabled via setState from the parent component. So when the inspector called uimanager to try to find an unexisting view, it eventually threw out this android-only exception.

I am still trying to figure out a proper way to fix this. I am open to any suggestions. Thanks.

Has this issue been resolved for everyone?

React DevTools has been rewritten and recently launched a new version 4 UI. The source code for this rewrite was done in a separate repository and now lives in the main React repo (github.com/facebook/react).

Because version 4 was a total rewrite, and all issues in this repository are related to the old version 3 of the extension, I am closing all issues in this repository. If you can still reproduce this issue, or believe this feature request is still relevant, please open a new issue in the React repo: https://github.com/facebook/react/issues/new?labels=Component:%20Developer%20Tools

Was this page helpful?
0 / 5 - 0 ratings