appandflow / appandflow/react-native-safe-area-context

Assert in Yoga hit on RN 0.81.0-rc

Đang mở
#649 12 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
2.8k
Fork
258
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
2

Mô tả

### Description

While verifying RNTA for 0.81, I hit this assert on startup which goes away when removing `SafeAreaView`:

`2025-07-22 14:04:03.047 13868-14063 libc com.microsoft.reacttestapp A ~/.gradle/caches/8.14.3/transforms/97aff8a941bc24fe37c775a753fbaec0/transformed/react-android-0.81.0-rc.2-debug/prefab/modules/reactnative/include/yoga/style/StyleValuePool.h:76: StyleLength facebook::yoga::StyleValuePool::getLength(StyleValueHandle) const: assertion "handle.type() == StyleValueHandle::Type::Point || handle.type() == StyleValueHandle::Type::Percent" failed`

I haven't been able to investigate this because I'm still catching up after a longer break. For now, I'm using the following workaround:
```ts
if ("RN$Bridgeless" in global && RN$Bridgeless === true) {
return ;
} else {
return (



);
}
```

### Steps to reproduce

1. Clone https://github.com/microsoft/react-native-test-app/pull/2509
2. Remove the workaround in `example/SafeAreaView.tsx`
3. Build Android:
```sh
cd example
yarn android -- -PnewArchEnabled=true -PbridgelessEnabled=true
```
4. In a separate terminal, start the dev server: `yarn start`
5. Observe that the app crashes/restarts every time we try to open a React Native app

### Snack or a link to a repository

https://github.com/microsoft/react-native-test-app/pull/2509

### Safe Area Context version

5.2.2

### React Native version

0.81.0-rc.2

### Platforms

Android

### Architecture

Fabric (New Architecture)

### Build type

Debug mode

### Device

iOS simulator

### Device model

iPhone 16 Pro

### Acknowledgements

Yes

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.