react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

Warning: Accesing view manager configs for getConstants

Open abulnes16 opened this issue 7 years ago • 38 comments

When using RNGH 1.4.1 with RN 0.60 the following warning appears:

Accessing view manager configs directly off UIManager via UIManager['getConstants'] is no longer supported. Use UIManager.getViewManagerConfig('getConstants') instead.

The stack trace points at createHandler.js:39

abulnes16 avatar Aug 26 '19 16:08 abulnes16

Same warning here, Expo SDKv34

Accessing view manager configs directly off UIManager via UIManager['getConstants'] is no longer supported. Use UIManager.getViewManagerConfig('getConstants') instead.
- node_modules/expo/build/environment/muteWarnings.fx.js:17:23 in warn
- node_modules/react-native/Libraries/ReactNative/UIManager.js:164:12 in get
- node_modules/react-native/Libraries/Utilities/defineLazyObjectProperty.js:42:18 in getValue
- node_modules/react-native-gesture-handler/createHandler.js:39:2 in <unknown>

giautm avatar Aug 27 '19 16:08 giautm

Any idea how I can we fix this?

drnachio avatar Sep 02 '19 07:09 drnachio

What i did was to change from expo to react-native init and the errror was gone

abulnes16 avatar Sep 02 '19 14:09 abulnes16

hey guys, just downgrade react-native-gesture-handler to 1.3.0.

You can directly change version in your package.json to ~1.3.0 and run npm i/yarn or remove it and install through expo how described here

hardrese7 avatar Sep 03 '19 15:09 hardrese7

This was introduced with this commit.

It's not immediately clear whether overwriting UIManager.getConstants is even the right approach now that getViewManagerConfig is used... presumably to keep backwards compatibility you'd have to do both, but do a version check to prevent the warning on RN 60+.

kimihiro64 avatar Sep 03 '19 18:09 kimihiro64

Downgrading react-native-gesture-handler to 1.3.0 didn't work for me :-(

arekstryjski avatar Sep 12 '19 10:09 arekstryjski

+1

douglaszaltron avatar Sep 13 '19 20:09 douglaszaltron

+1

mauricioblum avatar Sep 16 '19 18:09 mauricioblum

Hi, do we have any suggestions of how to fix this?

diekotto avatar Sep 17 '19 08:09 diekotto

+1 same warning Downgrading react-native-gesture-handler does not work for me.

Gl0ntz avatar Sep 19 '19 17:09 Gl0ntz

I fixed my project, as I am using expo, installing this package with expo install, this downgraded mine at my package.json to 1.3.* from 1.4.* and now it works as it should.

diekotto avatar Sep 19 '19 17:09 diekotto

Remove react-native-gesture-handler with npm / yarn and then expo install react-native-gesture-handler like @hardrese7 said

Compile..

eml-nx avatar Sep 19 '19 22:09 eml-nx

Edit, you can now use expo install react-native-gesture-handler. It will take care of everything I listed below. 😁 (Don't forget to clean your cache with expo start --clear)


For anyone using Expo, brent pointed out a way to fix it. Basically, you need to install the specific versions listed here.

As of writing, the version required is ~1.3.0. Because NPM doesn't play nice with the tilde (~) you might have to edit it manually in your package.json.

But for those who want a quick fix, here are some commands that you can run to fix it.

// make sure you have the latest expo-cli (if you have >=3.1.0, you can skip this)
$ npm install -g expo-cli@latest

// remove your node_modules and package-lock.json (just to be sure)
$ rm -rf node_modules package-lock.json

// check if you have `react-native-gesture-handler` listed already (if so **remove it**)
$ cat package.json | grep react-native-gesture-handler

// use expo to install the appropriate version
$ expo install react-native-gesture-handler

// start expo with a clean cache
$ expo start --clear

byCedric avatar Sep 20 '19 23:09 byCedric

For anyone using Expo, brent pointed out a way to fix it. Basically, you need to install the specific versions listed here. (as of writing, it's ~1.3.0, note the ~).

But for those who want a quick fix, here are some commands that you can run to fix it.

// make sure you have the latest expo-cli (if you have 3.1.0, you can skip this)
$ npm install -g expo@latest

// remove your node_modules and package-lock.json (just to be sure)
$ rm -rf node_modules package-lock.json

// check if you have `react-native-gesture-handler` listed already (if so **remove it**)
$ cat package.json | grep react-native-gesture-handler

// use expo to install the appropriate version
$ expo install react-native-gesture-handler

// start expo with a clean cache
$ expo start --clear

It worked for me. Thanks!

damechen avatar Sep 23 '19 22:09 damechen

For anyone using Expo, brent pointed out a way to fix it. Basically, you need to install the specific versions listed here. (as of writing, it's ~1.3.0, note the ~).

But for those who want a quick fix, here are some commands that you can run to fix it.

// make sure you have the latest expo-cli (if you have 3.1.0, you can skip this)
$ npm install -g expo@latest

// remove your node_modules and package-lock.json (just to be sure)
$ rm -rf node_modules package-lock.json

// check if you have `react-native-gesture-handler` listed already (if so **remove it**)
$ cat package.json | grep react-native-gesture-handler

// use expo to install the appropriate version
$ expo install react-native-gesture-handler

// start expo with a clean cache
$ expo start --clear

Also worket for me, Thank you!

expiante avatar Sep 24 '19 06:09 expiante

For anyone using Expo, brent pointed out a way to fix it. Basically, you need to install the specific versions listed here. (as of writing, it's ~1.3.0, note the ~).

But for those who want a quick fix, here are some commands that you can run to fix it.

// make sure you have the latest expo-cli (if you have >=3.1.0, you can skip this)
$ npm install -g expo@latest

// remove your node_modules and package-lock.json (just to be sure)
$ rm -rf node_modules package-lock.json

// check if you have `react-native-gesture-handler` listed already (if so **remove it**)
$ cat package.json | grep react-native-gesture-handler

// use expo to install the appropriate version
$ expo install react-native-gesture-handler

// start expo with a clean cache
$ expo start --clear

This solution worked for me. Thank alot. expo-cli : 3.1.0 react-navigation : 4.0.8 react-native-gesture-handler: 1.3.0

naveedahmed986 avatar Sep 26 '19 17:09 naveedahmed986

version 1.3.0 of react-native-gesture-handler does not support web and you can't use Touchables and also you get all the warnings that web is not supported

tafelito avatar Oct 03 '19 17:10 tafelito

I'm using expo SDK version: "34.0.0" and react-native-gesture-handler v 1.4.1 then I get warning, use npm i [email protected] this worked

baghel95 avatar Oct 10 '19 06:10 baghel95

Edit, you can now use expo install react-native-gesture-handler. It will take care of everything I listed below. 😁

For anyone using Expo, brent pointed out a way to fix it. Basically, you need to install the specific versions listed here.

As of writing, the version required is ~1.3.0. Because NPM doesn't play nice with the tilde (~) you might have to edit it manually in your package.json.

But for those who want a quick fix, here are some commands that you can run to fix it.

// make sure you have the latest expo-cli (if you have >=3.1.0, you can skip this)
$ npm install -g expo@latest

// remove your node_modules and package-lock.json (just to be sure)
$ rm -rf node_modules package-lock.json

// check if you have `react-native-gesture-handler` listed already (if so **remove it**)
$ cat package.json | grep react-native-gesture-handler

// use expo to install the appropriate version
$ expo install react-native-gesture-handler

// start expo with a clean cache
$ expo start --clear

This solution worked for me. Thanks. expo: ^35.0.0 expo-cli : 3.3.0 react-navigation : ^3.11.0 react-native-gesture-handler: ^1.3.0

SAABoy avatar Oct 11 '19 15:10 SAABoy

hey guys, just downgrade react-native-gesture-handler to 1.3.0.

You can directly change version in your package.json to ~1.3.0 and run npm i/yarn or remove it and install through expo how described here

When you downgrade, it stops the react-native-gesture-handler Buttons from working

enkemande avatar Oct 11 '19 18:10 enkemande