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

[React-native 0.56] [Toggle Inspector] renderer.getInspectorDataForViewTag is not a function #21065

Closed
TranLuongTuanAnh opened this issue Sep 12, 2018 · 8 comments

Comments

Projects
None yet
5 participants
@TranLuongTuanAnh
Copy link
Contributor

commented Sep 12, 2018

Environment

React Native Environment Info:
    System:
      OS: macOS Sierra 10.12.6
      CPU: x64 Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz
      Memory: 613.02 MB / 32.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 9.1.0 - ~/.nvm/versions/node/v9.1.0/bin/node
      npm: 5.5.1 - ~/.nvm/versions/node/v9.1.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.2, macOS 10.13, tvOS 11.2, watchOS 4.2
      Android SDK:
        Build Tools: 23.0.1, 23.0.2, 23.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3
        API Levels: 23, 25, 26, 27
    IDEs:
      Android Studio: 3.1 AI-173.4697961
      Xcode: 9.2/9C40b - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.4.1 => 16.4.2
      react-native: ^0.56.0 => 0.56.0
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-git-upgrade: 0.2.7

Description

After upgrate RN to 0.56, I'm try Toggle Inspector but that below error occur when I click anywhere in screen
simulator screen shot - iphone 7 - 2018-09-12 at 17 35 21

@TranLuongTuanAnh TranLuongTuanAnh changed the title [ React-native 0.56 ] [ Toggle Inspector ] renderer.getInspectorDataForViewTag is not a function [React-native 0.56] [Toggle Inspector] renderer.getInspectorDataForViewTag is not a function Sep 12, 2018

@react-native-bot

This comment has been minimized.

Copy link
Collaborator

commented Sep 12, 2018

It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.

The "Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@jeffmwells

This comment has been minimized.

Copy link

commented Sep 18, 2018

Can confirm that upgrading to 0.57.0 of just the react-native package.json dependency did not fix the issue.

@react-native-bot

This comment has been minimized.

Copy link
Collaborator

commented Oct 3, 2018

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@jeffmwells

This comment has been minimized.

Copy link

commented Nov 28, 2018

Found out the solution to this problem for us. We had a library, react-metrics, from which we imported a single named export. Turns out the lib goes ahead and enables screen tracking (taps, gestures) metrics for you even if you don't import those other functions. So we did a deep import e.g. import blah from react-metrics/some/sub/folder and this resolved the issue.

@CxxyLucifer

This comment has been minimized.

Copy link

commented Jan 24, 2019

Found out the solution to this problem for us. We had a library, react-metrics, from which we imported a single named export. Turns out the lib goes ahead and enables screen tracking (taps, gestures) metrics for you even if you don't import those other functions. So we did a deep import e.g. import blah from react-metrics/some/sub/folder and this resolved the issue.

could you code here ?

@TranLuongTuanAnh

This comment has been minimized.

Copy link
Contributor Author

commented Jan 25, 2019

@CxxyLucifer

This comment has been minimized.

Copy link

commented Jan 28, 2019

@cpojer

This comment has been minimized.

Copy link
Contributor

commented Jan 28, 2019

I'll land the attached PR to fix this issue.

facebook-github-bot added a commit that referenced this issue Jan 28, 2019

Fix issue #21065 getInspectorDataForViewTag is not a function (#21237)
Summary:
Fix renderer.getInspectorDataForViewTag is not a function when try Toggle Inspector

Fixes #21065

Release Notes:
--------------
[BUGFIX] [MINOR] [/react-native/Libraries/Inspector/Inspector.js]
Pull Request resolved: #21237

Differential Revision: D13838339

Pulled By: cpojer

fbshipit-source-id: 363a4beba211e7868395578c7941cbda119bc753

matt-oakes pushed a commit to matt-oakes/react-native that referenced this issue Feb 7, 2019

Fix issue facebook#21065 getInspectorDataForViewTag is not a function (
…facebook#21237)

Summary:
Fix renderer.getInspectorDataForViewTag is not a function when try Toggle Inspector

Fixes facebook#21065

Release Notes:
--------------
[BUGFIX] [MINOR] [/react-native/Libraries/Inspector/Inspector.js]
Pull Request resolved: facebook#21237

Differential Revision: D13838339

Pulled By: cpojer

fbshipit-source-id: 363a4beba211e7868395578c7941cbda119bc753
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.