Repository navigation
Open
Labels
Needs: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.
Description
Description
- There is some sort of crash when ui is rendered
Steps to reproduce
- Use conditional rendering for view to display ui based on condition (not sure though what is causing this)
Note: it is working fine on 0.77 though once upgraded then facing this issue
import React from 'react';
import { View, StyleSheet } from 'react-native';
import { t } from '../i18n';
import { ProgressBar } from '@ui-kitten/components';
import { TPhoto } from '../types';
import { Colors } from '../theme';
import AppLightButton from './AppLightButton';
import Upload from '../theme/icons/Upload.svg';
import AppText from './AppText';
type Props = {
image: TPhoto;
retryUpload: boolean;
onRetryUpload: (image: TPhoto) => void;
currentImageIndex: number;
totalImages: number;
};
const ImageUploadProgress = ({ image, retryUpload, totalImages, currentImageIndex, onRetryUpload }: Props) => {
return (
<View style={styles.photoUpload}>
<View style={styles.uploadTitle}>
<AppText style={styles.uploadTitleText}>
{t('common._uploading-images', {
count: currentImageIndex,
total: totalImages,
})}
</AppText>
{image.uploadStatus === 'completed' ? (
<AppText style={styles.uploadTitleTextComplete}> - {t('common.complete')} </AppText>
) : (
<View />
)}
{image.uploadStatus === 'failed' || image.uploadStatus === 'uploading' ? (
<View>
<AppText style={styles.uploadTitleTextFailed}>
{image.uploadStatus === 'failed' ? `- ${t('common.failed')}` : ''}
</AppText>
{retryUpload && (
<AppLightButton
text={t('common.retry')}
buttonIcon={<Upload width={10} fill={Colors.warn} />}
onPress={() => onRetryUpload(image)}
style={styles.stepButton}
textStyle={styles.stepButtonText}
/>
)}
</View>
) : (
<View />
)}
</View>
<ProgressBar
progress={image.uploadStatus === 'completed' ? 1 : image.progress}
size="medium"
style={styles.progressBarStyle}
status={
image.uploadStatus === 'failed' ? 'danger' : image.uploadStatus === 'completed' ? 'success' : 'info'
}
/>
</View>
);
};
export default ImageUploadProgress;
const styles = StyleSheet.create({
photoUpload: { marginVertical: 20 },
uploadTitle: { flexDirection: 'row', justifyContent: 'space-between' },
uploadTitleText: {
fontSize: 14,
fontFamily: 'ProximaNova-Regular',
textAlign: 'center',
textAlignVertical: 'center',
},
uploadTitleTextFailed: {
fontSize: 14,
fontFamily: 'ProximaNova-Bold',
textAlign: 'center',
textAlignVertical: 'center',
color: Colors.error,
},
uploadTitleTextComplete: {
fontSize: 14,
fontFamily: 'ProximaNova-Bold',
textAlign: 'center',
textAlignVertical: 'center',
color: Colors.success,
},
progressBarStyle: {
marginTop: 5,
},
stepButton: {
height: 25,
width: 70,
backgroundColor: Colors.orangeTransparent,
borderColor: Colors.warn,
},
stepButtonText: { fontSize: 10, fontFamily: 'ProximaNova-Bold', height: 10, color: Colors.warn },
});
React Native Version
0.79.4
Affected Platforms
Runtime - Android
Output of npx @react-native-community/cli info
- There is no output. The app closes without any error
Stacktrace or Logs
/__w/react-native/react-native/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp:701: function layout: assertion failed (YGNodeGetOwner(childYogaNode) == &yogaNode_)
MANDATORY Reproducer
https://github.com/facebook/react-native
Screenshots and Videos
- The app crashes abruptly no warning nothing. Log found in android studio
Reacted by Krastan Dimitrov, Evgeny, Thomas V, Harrison Hunter, Wojciech Maj, Laczkovszki Joel, savinov007, Alex Vasylchenko, Samin Shams, Deniss and 9 more
Metadata
Metadata
Assignees
Labels
Needs: AttentionIssues where the author has responded to feedback.Issues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.This issue could be improved with a clear list of steps to reproduce the issue.

Activity
react-native-bot commentedon Jul 1, 2025
Warning
Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:
You can read more about about it on our website: How to report a bug.
[-]function layout: assertion failed (YGNodeGetOwner(childYogaNode) == &yogaNode_)[/-][+]Crash: YogaLayoutableShadowNode.cpp: function layout: assertion failed (YGNodeGetOwner(childYogaNode) == &yogaNode_)[/+]mahendihasan-impactguru commentedon Jul 1, 2025
Use optional changing to avoid crashes
devanshsaini11 commentedon Jul 1, 2025
@basitmir Can u kindly provide a valid repro using Reproducer Template
basitmir commentedon Jul 1, 2025
Already tried that as well
rohit9625 commentedon Jul 4, 2025
I am also encountering the same error. Not sure what is reason is but it is happening after upgrading RN version.
rohit9625 commentedon Jul 4, 2025
Hi @mahendihasan-impactguru
Could you please tell what is optional changing and how it can be implemented in the above example?
mahendihasan-impactguru commentedon Jul 4, 2025
@rohit9625 for above code i saw the missing image.uploadStatus optional changing that’s why i suggested optional chaining.....
mahendihasan-impactguru commentedon Jul 4, 2025
@basitmir @rohit9625 i have suggest could you please remove and add null code.
Yoga is attempting to lay out, even though they are visually meaningless — this can lead to layout issues in newer versions of RN especially after v0.71+ where layout constraints and shadow node validation became stricter.
if you want sample code just know me...
36 remaining items
tomaszukovskij commentedon Oct 3, 2025
I know. But in my case where this style was set, app was crashing because of
Assertion failed: (YGNodeGetOwner(childYogaNode) == &yogaNode_), function layout, file YogaLayoutableShadowNode.cpp, line 699. > layout > YGNodeGetOwner(childYogaNode) == &yogaNode_ > YogaLayoutableShadowNode.cppDzmitryITGlue commentedon Oct 28, 2025
After upgrade to 0.81.5 I have this issue on Android occurs much more frequently, just for context, I have no
display: 'none'stylesTwanLuttik commentedon Nov 17, 2025
I have been experiencing the same xcode error and it only seems to be happening in debug mode, production seemed to be safe. My app is multi tenant and I was noticing this crash was very persistent and after searching a while on this GH issue, the
display: 'none'was effecting it and did help in fact since one of my buttons was like that and i noticed quickly the issue might be have resolved this. I keep an eye to see if this is the solution but I'm happy to finally somewhat figured it out.allessandrogomes commentedon Dec 31, 2025
The same thing was happening to me, crashing the app when opening the screen that contained this condition in the 'display'. Removing it from the stylesheet and adding it as a rendering condition in the tsx file solved the problem.

Nader-CS commentedon Jan 26, 2026
yes this problem still exist for some devices
Kalightortaio commentedon Jan 26, 2026
Still having this issue.
EDIT: Fixed it by removing display: 'none' from my code.
cardOutline: { ... display: selectedCard === -1 || !selectedCardLayout ? 'none' : 'flex', },into
{selectedCard !== -1 && selectedCardLayout && ( <View pointerEvents="none" style={hookStyles.cardOutline} /> )}oserrabassa-jcm commentedon May 21, 2026
Also experienced this issue after upgrading to React Native 0.85.3.
As the majority has said, not using
display: nonefixes the issue.5ZYSZ3K commentedon Jun 13, 2026
I have an excellent reproduction repo for that:
https://github.com/5ZYSZ3K/native-tabs-crash-repro
It's called
native-tabs, because it first occured for me after switching toexpo-router/unstable-native-tabsin my expo appI'll open a PR in a second, I have a fix for that - I'm not 100% sure that it is fully correct, but maybe someone will have time to take a look at this issue
fix: yoga crash with display:none (#57197)
fix: yoga crash with display:none (#1976)
fix(search): stop mounting a display:none node in the search bar (#550)
ketosense commentedon Aug 30, 2026
We hit this crash repeatedly in production (React Native, Fabric) and confirmed the exact trigger mechanism, matching the analysis already in this thread.
Our case: a small checkmark/badge component toggled
style={{ display: visible ? 'flex' : 'none' }}next to a form field. Toggling a sibling control's props (editable/hint state) immediately followed by an unrelated re-render (a background sync cascade) reliably crashed with the exactYogaLayoutableShadowNode.cppassertion — matching the documented resize-commit-then-props-commit sequence.We initially fixed two different component-type-swap bugs elsewhere in the same screen (also real bugs, also worth avoiding) but the crash persisted through both — it was specifically the
display:'none'toggle that was the trigger, not the other issues.Workaround that fully resolved it for us, verified via repeated on-device repro testing after two prior fix attempts failed: never toggle
display. Instead keep the element permanently mounted withposition: 'absolute'(removes it from Yoga's flex/gap layout entirely, same effectdisplay:'none'was used for) and animate onlyopacity. No native rebuild needed, pure JS/style change.Hope this saves someone else the debugging time — happy to share more repro detail if useful for a fix upstream.
Fix account-menu crash by rendering it in a Modal, not an absolute View
fix(app): pick the phone layout in JS where views change
fix(app): stop hiding layouts with display none