diff --git a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js index 8e6b10479de7..bec1a1fb2302 100644 --- a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js +++ b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js @@ -14,12 +14,25 @@ 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 ( - Edit "RNTesterPlayground.js" to change this file + #57190: the outlined box below crashes on Android (New Architecture) + ); } @@ -27,6 +40,14 @@ function Playground() { const styles = StyleSheet.create({ container: { padding: 10, + gap: 10, + }, + outlined: { + width: 100, + height: 100, + outlineColor: '#007AFF', + outlineWidth: 2, + outlineStyle: 'solid', }, });