Skip to content
This repository was archived by the owner on Jan 30, 2021. It is now read-only.

TypeError: TaskQueue: Error with task: undefined is not an object (evaluating '_this.view{component.measureInWindow') #118

Closed
sudhirkumarojhaa opened this issue May 8, 2020 · 13 comments

Comments

@sudhirkumarojhaa
Copy link

Bug

This issue comes in the latest version. RN -62.2. I have a project with react-navigation older versions. 3.6.9.

Environment info

RN -62.2
react-navigation 3.6.9

react-native info output:
System:
OS: macOS 10.15.4
CPU: (4) x64 Intel(R) Core(TM) i7-5650U CPU @ 2.20GHz
Memory: 141.37 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 13.5.0 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.9.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 25, 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6392135
Xcode: 11.4/11E146 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_211 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
react-native: Not Found

 // paste it here

Library version: x.x.x

older version react-navigation with latest react native version issues.

  1. install react navigaiton issue.
  2. install latest react native project.
    ...

Describe what you expected to happen:

  1. Run Normally
  2. A hook to pass any such conflicts
    Simulator Screen Shot - iPhone 11 - 2020-05-08 at 15 19 58
    .

Reproducible sample code

@halaharr
Copy link

I am having the same issue. Please help. I am also using react-redux, is that the reason I am getting the error?

@fonov
Copy link

fonov commented May 13, 2020

react-navigation used old version react-native-safe-area-view for solved this issue you need update on fresh version react-navigation

@christopherguyton
Copy link

Trying to find "react-safe-area-view" in node modules to fix this but it doesn't seem to exist in my project.

@enrickdl
Copy link

@fonov I can't update react-navigation right now. Do you know if there's another solution?

Currently upgrading RN Version to 0.63 and using react-navigation 3.3.2.

From StackOverflow, I found that if you remove _component from this.view._component.measureInWindow inside react-native-safe-area-view index file at node_modules, it solves the problem, but it's not a great solution.

@harrhys
Copy link

harrhys commented Jul 28, 2020

@fonov I can't update react-navigation right now. Do you know if there's another solution?

Currently upgrading RN Version to 0.63 and using react-navigation 3.3.2.

From StackOverflow, I found that if you remove _component from this.view._component.measureInWindow inside react-native-safe-area-view index file at node_modules, it solves the problem, but it's not a great solution.

Thanks a LOT enrickdl..It really helped me and the issue is resolveed...

@enrickdl
Copy link

@harrhys Great to hear that! Just FYI, I end it up upgrading react-navigation from v3 to v4, since it's very similar, I didn't have problems and it was very simple. I would suggest that as well.

@harrhys
Copy link

harrhys commented Aug 3, 2020

Sure @enrickdl ..Thans for you suggestion, I will definitely consider upgrading from v3 to v4.
Best Regards,
Harrhy

@matias91
Copy link

matias91 commented Aug 13, 2020

I found a workaround for this error, without modifying the index of react-native-safe-area-view, at least for my use case.
I'm also using an older version of react-navigation, and update it isn't an option right now.

What I did was to add a resolution in my package.json with react-native-safe-area-view v1.1.0 . Like this:

"resolutions": {
  "react-native-safe-area-view": "1.1.0"
}

Resolutions are only available with yarn: https://classic.yarnpkg.com/en/docs/selective-version-resolutions/

And after that I had to use SafeAreaProvider from react-native-safe-area-context to wrap my app in my entry file:

<SafeAreaProvider>
    <Provider store={store}>
       <AppNavigator  />
    </Provider>
</SafeAreaProvider>

expo SDK: 38
react: 16.11.0
react-native: 0.62.2
react-navigation: 2.18.3

Hope this helps someone.

@callyb
Copy link

callyb commented Aug 20, 2020

Thank you @enrickdl - solved my problem too - I'm stuck on an old version of react navigation and must update but really didn't want it to be this month!!!

@Trouble106
Copy link

@matias91 Thank you so muchhhhh
it's work for me with
expo SDK: 38
react: 16.11.0
react-native: 0.62.2
react-navigation: 2.13.0

@DaNiELChIoRo
Copy link

it didn't work for me
expo SDK:38,
"react-native-paper": "2.16.0"
react-navigation: 4.4.0

@ljz-peralta
Copy link

@matias91, Thank you for your suggestion on fixing this issue!
It worked for me as well although I forced upgrade the react-navigation@2.0.1 to
react-navigation@2.18.3 since it didn't work on react-navigation@2.0.1.

expo SDK: 39
react: 16.13.1
react-native: 0.63.3
react-navigation: 2.18.3

@eramudeep
Copy link

I found a workaround for this error, without modifying the index of react-native-safe-area-view, at least for my use case.
I'm also using an older version of react-navigation, and update it isn't an option right now.

What I did was to add a resolution in my package.json with react-native-safe-area-view v1.1.0 . Like this:

"resolutions": {
  "react-native-safe-area-view": "1.1.0"
}

Resolutions are only available with yarn: https://classic.yarnpkg.com/en/docs/selective-version-resolutions/

And after that I had to use SafeAreaProvider from react-native-safe-area-context to wrap my app in my entry file:

<SafeAreaProvider>
    <Provider store={store}>
       <AppNavigator  />
    </Provider>
</SafeAreaProvider>

expo SDK: 38
react: 16.11.0
react-native: 0.62.2
react-navigation: 2.18.3

Hope this helps someone.

Not worked for me:
"react": "16.11.0",
"react-native": "0.62.2",
"react-navigation": "2.18.2"
"react-native-safe-area-context": "^3.1.9",

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests