From 327f90427715f94e7c9a2ac57a9b34a58c0746a9 Mon Sep 17 00:00:00 2001 From: Silvan Date: Tue, 7 Jul 2026 09:25:07 +0200 Subject: [PATCH] Repro for #57190: outlineColor ClassCastException on Android New Arch RNTesterPlayground renders a View with outlineColor set, which crashes on mount on Android + New Architecture with: java.lang.Double cannot be cast to java.lang.Integer at com.facebook.react.uimanager.BaseViewManagerDelegate.setProperty Co-Authored-By: Claude Opus 4.8 --- .../examples/Playground/RNTesterPlayground.js | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) 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', }, });