Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,40 @@ import RNTesterText from '../../components/RNTesterText';
import * as React from 'react';
import {StyleSheet, View} from 'react-native';

// Repro for #57190: on Android + New Architecture, setting `outlineColor`
// crashes with:
// java.lang.ClassCastException: java.lang.Double cannot be cast to
// java.lang.Integer
// at com.facebook.react.uimanager.BaseViewManagerDelegate.setProperty
//
// Root cause: `BaseViewManagerDelegate` casts the outline color prop straight
// to Int (`value as Int?`) while every other color prop (backgroundColor,
// shadowColor) uses `ColorPropConverter.getColor(...)`. Under Fabric, color
// props are always delivered as `Double`, so the cast throws on mount.
//
// Rendering the View below is enough to crash the app on Android.
function Playground() {
return (
<View style={styles.container}>
<RNTesterText>
Edit "RNTesterPlayground.js" to change this file
#57190: the outlined box below crashes on Android (New Architecture)
</RNTesterText>
<View style={styles.outlined} />
</View>
);
}

const styles = StyleSheet.create({
container: {
padding: 10,
gap: 10,
},
outlined: {
width: 100,
height: 100,
outlineColor: '#007AFF',
outlineWidth: 2,
outlineStyle: 'solid',
},
});

Expand Down