NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Style property 'top' is not supported by native animated module

Open tosbaha opened this issue 7 years ago • 23 comments

I have gone through these following points

  • [x] Check latest documentation: https://docs.nativebase.io/
  • [x] Check for existing open/closed issues for a possible duplicate before creating a new issue: https://github.com/GeekyAnts/NativeBase/issues
  • [x] Use the latest NativeBase release: https://github.com/GeekyAnts/NativeBase/releases
  • [x] Check examples from NativeBase KitchenSink https://github.com/GeekyAnts/NativeBase-KitchenSink
  • [] For discussion purpose make use of NativeBase Slack: http://slack.nativebase.io/
  • [] For queries related to theme, check Theme Variables from Docs and live NativeBase Theme Editor http://nativebase.io/customizer/

Issue Description

I upgraded module to 2.12.2 but now my Form crashes all the time with Style property 'top' is not supported by native animated module error. If Item has floatingLabel property it crashes.

node, npm, react-native, react and native-base version, expo version if used, xcode version

  • Node v10.16.0
  • npm 6.9.0
  • native base 2.12.2
  • react v16.8.3
  • react-native v0.59.9

Expected behaviour

Item floatingLabel shouldn't crash

Actual behaviour

Item floatingLabel crashes

Steps to reproduce

Here is the snippet directly from documentation that crashes with Style property 'top' is not supported by native animated module

 <Form>
	<Item floatingLabel>
	  <Label>Username</Label>
	  <Input />
	</Item>
	<Item floatingLabel last>
	  <Label>Password</Label>
	  <Input />
	</Item>
</Form>

Is the bug present in both iOS and Android or in any one of them?

I only tested Android

Any other additional info which would help us debug the issue quicker.

None.

tosbaha avatar Jul 18 '19 22:07 tosbaha

OMG I was JUST coming here to report this EXACT same bug! Everything for me is the same except I'm using [email protected] and [email protected].

Also just to add insult to injury: the inlineLabel property does not work and behaves like fixedLabel

josecarlosns avatar Jul 18 '19 23:07 josecarlosns

Am also getting this, Android and iOS impacted, RN v0.60.4

Update: Downgrading to v2.12.1 resolved the issue for me on RN v0.60.4

harryfinn avatar Jul 18 '19 23:07 harryfinn

should we downgrading RN version to use this floating label? any other alternatives??

ericanthonywu avatar Jul 22 '19 02:07 ericanthonywu

This PR fixes the issue #2794

Srishti-Sharma avatar Jul 22 '19 06:07 Srishti-Sharma

same issue for me same as @JoseCarlosNS

mayupat13 avatar Jul 22 '19 10:07 mayupat13

Hi @Srishti-Sharma I applied your changes in my Item.js file...but I still have the same problem...there are something else to do in addition to edit and save the Item.js? How I can integrate the changes in my project without waiting your PR? There is some sort of command or script to use for build the new edited node-modules file?

LordHydra1 avatar Jul 22 '19 10:07 LordHydra1

Same here as @LordHydra1

ghost avatar Jul 22 '19 10:07 ghost

@LordHydra1 & @johnny32 - if you want to use the changes in the above PR, you should be able to install the package directly from GH using the following command:

yarn add GeekyAnts/NativeBase#srishti/Item_floatingLabel_fix

or the following if using NPM

npm install GeekyAnts/NativeBase#srishti/Item_floatingLabel_fix

To confirm the package is using the correct commit, you can just compare the commit hash in your yarn/package lock file once installed and ensure it matches the commit has on Srishti-Sharma's PR

harryfinn avatar Jul 22 '19 11:07 harryfinn

Is the inlineLabel problem addressed too on that PR? I know this should probably be on an issue on its own, but since we're here...

josecarlosns avatar Jul 22 '19 12:07 josecarlosns

What I meant is that, even with the PR changes, the error still happens to me.

ghost avatar Jul 22 '19 12:07 ghost

image

getting this error after commenting as suggested in PR for floatingLabel. I think there is some problem with top prop in Animated.View compoent

uday5162 avatar Jul 22 '19 12:07 uday5162

same as @uday5162...i tryed updating my native-base package but still have the same problem....

LordHydra1 avatar Jul 22 '19 12:07 LordHydra1

same issue on IOS and android

mubashiralisiddiqui avatar Jul 22 '19 13:07 mubashiralisiddiqui

seems like reverting to [email protected] remove the warning and make the floating labels working again. only tested on android.

aufamiri avatar Jul 22 '19 14:07 aufamiri

@blankonn Are you sure? Because I'm using [email protected] with [email protected] and floatingLabel and inlineLabel are both not working.

josecarlosns avatar Jul 22 '19 16:07 josecarlosns

I am using native [email protected] with [email protected] I am working on a project more than a month with same version but it suddenly give this error while I have found that the prop floating label causing this issue

On Mon, Jul 22, 2019 at 9:44 PM José Silva [email protected] wrote:

@blankonn https://github.com/blankonn Are you sure? Because I'm using [email protected] with [email protected] and floatingLabel and inlineLabel are both not working.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GeekyAnts/NativeBase/issues/2786?email_source=notifications&email_token=AD7KQPRZ5WLPUEQGUBOK37LQAXPX3A5CNFSM4IFAGAHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2QOS5Q#issuecomment-513862006, or mute the thread https://github.com/notifications/unsubscribe-auth/AD7KQPSNZYRK3R45JOSQO6LQAXPX3ANCNFSM4IFAGAHA .

mubashiralisiddiqui avatar Jul 22 '19 17:07 mubashiralisiddiqui

I'm also using [email protected] and [email protected], and it works for me.

ghost avatar Jul 23 '19 07:07 ghost

@JoseCarlosNS that's weird, I am using the very same react-native version as you and it is running without the error, here's my package.json https://pastebin.com/T5JMPh34

aufamiri avatar Jul 23 '19 11:07 aufamiri

https://pastebin.com/T5JMPh34

you are using it on "react-native": "0.60.4", I am using 0.59

mubashiralisiddiqui avatar Jul 23 '19 12:07 mubashiralisiddiqui

I am also facing the same issue. I am on RN version 0.59. I didn't get any such error earlier, being on the same version. It happened today all of a sudden.

AsthaAmeta avatar Jul 24 '19 05:07 AsthaAmeta