question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

undefined is not an object (evaluating 'component._instance')

See original GitHub issue

Is this a bug report?

Yes

Have you read the Bugs section of the How to Contribute guide?

Yes

Environment

  1. react-native -v: react-native-cli: 2.0.1 react-native: 0.46.4
  2. node -v: 6.11.1
  3. npm -v: 5.3.0
  4. yarn --version: 0.27.5
  5. react-devtools: 2.5.0

Then, specify:

  • Target Platform: Android
  • Development Operating System: Windows 10
  • Build tools: Android Studio

Steps to Reproduce

(Write your steps here:)

  1. create new empty app using react-native init AwesomeProject
  2. install genymotion and launch this app.
  3. install react-devtools and open it.
  4. in emulator window click Menu button and select “Toggle Inspector”
  5. Click on any text node from the sample app.

Expected Behavior

Select the corresponding component in react devtools.

(Write what you thought would happen.)

Actual Behavior

Getting the red screen with the following error:

undefined is not an object (evaluating ‘component._instance’) getHostProps D:\RN\AwesomeProject\node_modules\react-native\Libraries\Renderer\ReactNativeStack-dev.js:2314:29 getInspectorDataForViewTag D:\RN\AwesomeProject\node_modules\react-native\Libraries\Renderer\ReactNativeStack-dev.js:2334:259 onTouchViewTag D:\RN\AwesomeProject\node_modules\react-native\Libraries\Inspector\Inspector.js:175:44 proxiedMethod D:\RN\AwesomeProject\node_modules\react-proxy\modules\createPrototypeProxy.js:44:35 <unknown> D:\RN\AwesomeProject\node_modules\react-native\Libraries\Inspector\InspectorOverlay.js:51:34 __invokeCallback D:\RN\AwesomeProject\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:301:19 <unknown> D:\RN\AwesomeProject\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:118:28 __guard D:\RN\AwesomeProject\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:228:6 invokeCallbackAndReturnFlushedQueue D:\RN\AwesomeProject\node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:117:17

This seem to happen only when I click the Text component. Clicking on View component for example works fine.

I tested this on android 6.0 and android 7.1 on nexus 5 device.

Reproducible Demo

I’m experiencing this on a new project generated using react-native init AwesomeProject. No custom code added!

I made a small screen recording:

https://drive.google.com/file/d/0B7Ls870jI1CLeFRyaTRjWVV4YVU/view

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:8

github_iconTop GitHub Comments

3reactions
phantom1299commented, Aug 3, 2017

I have the exact same problem, this happend to me with and without react-devtools. Whenever I inspect a Text, I get this error.

0reactions
stale[bot]commented, Dec 16, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"undefined is not an object (evaluating 'Component.router ...
(1) You are trying to access SwitchNavigator before it's declaration. (2) You are doing MainScreen : MainScreen , which will cause an error....
Read more >
undefined is not an object (evaluating 'component.router') #5280
Hi everyone, after some time digging for a solution for my error i decided to open an issue here since it appears to...
Read more >
undefined is not an object (evaluating component.displayName)
Hi, I'm having some trouble with a pluggable widget I'm building. When running the dev app locally it immidiately shows this error: TypeError:...
Read more >
ERROR TypeError: undefined is not an object (evaluating ...
Ever encountered this error → ERROR TypeError: undefined is not an object (evaluating '_this.props.navigation.navigate') whilst working hard on your project?
Read more >
undefined is not an object (evaluating 'component.router')
undefined is not an object (evaluating 'component.router'). No description. Open with Expo Go. Open in editor. Need Expo? Don't have the Expo Go?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found