-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Error while updating property 'height' in shadow node of type: RCTView when I test on real device, but nothing wrong on emulator #21002
Comments
yeah sometimes i get these random occurences with the stylesheet. Here are some things i could think of though. the height property in the stylesheet may not have to require a string i don't think. Have you tried inputting an integer value instead? I.E height: 22 instead of height: '22'. If that didn't work, are you using any of react native's Animated Components? Also if you need your input to be a string. Try parsing the string to an integer if necessary. |
@Mangio621 Thanks for commenting. |
I could solve this issue by downgrading the version of react native to 0.55.4 and everything else. |
I have a similar issue after upgrading from |
I don't think downgrading is the real solution here. This seems to be a duplicate of #21755 |
Yes. also, I cannot surely say downgrading is the best way. |
And I know it is not the correct solution to this issue. |
Pretty sure it is just React Native. We use maps as well, but I've seen myself Android app crashes on pretty simple pages with no maps and other complicated thigs at all. |
Happen in release mode everytime |
Any update? |
I am on the same version of RN 0.55.4 |
Try removing the 'quotes' so it's just the number; e.g height: 22. This resolved the error for me. |
My error was because of "%%" some other person added to the code for height. |
I got this on Android when I tried to set |
I noticed this when I had |
@kevinavery |
I found an example of this where :
Had been added on a view, removing it solved the issue. |
I was having 'flex' issue and it was because of using 'flex: 0 0 Xpx;' on a styled component in my case. I removed all the 'string' values for 'flex' and it's solved. |
my case was that i forgot to change |
This is happening to me on random devices on Android as well. Also, the app is not crashing systematically, only like 20% of the time and only in production. @dulmandakh could you re-open this ? Even after following the above tips, this is still an issue. |
Check on your conditional styles where width is determined thru logic, either true or false is feeding BOOLEAN to your width, which is unexpected |
I did that. Turned out it was the dark mode an Android that made the app crash for me. Turn dark mode off and it does not crash anymore. |
Hmm really? I think the issue comes from some of my node_modules/react-native-***, not from the RN core, but RN core should provide more trackable stack trace to this problem !! If the problem always appears: 100 3rd-libs take just 7 builds to locate which err come from |
I might be jumping in late but I’m using styled-components and for me I had to change this
to this:
For some reason the prop name was colliding with the component underneath and giving it a garbage value of 'left' or 'right' instead of '1px' or something |
@Stuart-Wilcox you can really use |
@luatnd yeah check out this library styled-components If you come from a web dev background it’s like writing normal css and gets converted into RN Stylesheet |
For me it was calling the RNRestart library to reload the app soon after app launch (for some arabic users) avishayil/react-native-restart#144 |
Same as @clems36 , turning the dark mode off seems to solve the issue on my Expo SDK 36 RN app |
I had a similar issue, turns out there was a stray invalid property value of |
In my case, I used
|
Good day! I have the same issue in the production mode on Android 9, Android 11. I checked all versions from this post, but nothing works for me. Any ideas how to solve it?
|
Fixed by using number not string. |
On my end it is caused by react-native-elements Divider's width="100%". |
I have same issue in [email protected]. please reopen and fix it,ths. property different each time,such as: |
For me it crashed with this error (the property name was |
I fixed my error by going through styles and checking for invalid values on height property. I found an instance where I accidentally put: height: '%', instead of a number value. |
hic. i encountered a similar issue, Had you solved it?? |
@manhtienptit Yes, I just changed the prop name from |
Yeah.. Thanks for your reply. I found my issue. Many many thanks for help. |
@arthwood thanks, was banging my head on wtf was going on. |
Error while updating property 'height' in shadow node of type: RCTView null Unknown value: 1 Please help , i am having this error, and it keeps crashing my app |
Just trying to share my experience on this issue. In my App I have a wrapped React-Native Text Component. I had properties like "right, center, left" defined as booleans to change the alignment of the actual text inside the App.
Which in my case lead to the error because "right" was a boolean and not a number because I had a property like this and it was passed to the text component by me, which probably conflicted with the actual right property for positioning used by the react native text component. It worked like this for a very long time, produces this nasty error after I upgraded all my dependencies but was solvable like this for me. So beware to pass props to or other components that have fixed definitions for their properties. (strings, numbers, ...) |
after upgrade 0.71 I have same problems |
Error while updating property 'flex' in shadow |
Her for me it occur when i put |
For me, it happened because a style property was: |
you can use percentage instead of defining 200 width: '50%', This works for me. |
You may want to consider setting the AutoScaling default for the text property. Check out this post I think what you want is: |
I am using latest React Native release. and I got through the existing issues here.
But I could not be clear their issues are similar to mine.
So maybe it is simple or tricky.
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.4
CPU: x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Memory: 20.04 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.3 - /usr/local/bin/node
npm: 5.6.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.0 => 0.56.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
I am building a simple app and it works fine in the emulator(Genymotioin), but when I run it on real device it shows me an error.
Error while updating property 'height' in shadow node of type: RCTView
null
Unknown value: 200
....
....
....
....
What is odd for me is just it is running simply on emulator but not working on a real device.
And also I searched all the style with height. And there is no syntax error
i.e height: '22'
All the style with height is the integer not string. and there are no prop-types for that.
I cannot find where this error comes from.
So please suggest any idea to fix it. I will be happy if anyone helps me out to solve this problem.
P.S.
When I clean the gradle and generate apk, everything is okay but if I install that apk file on my phone, it is killed automatically.
The text was updated successfully, but these errors were encountered: