-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Which package are you using?
@react-native-vector-icons/*
What platform(s) does this occur on?
Android
Minimal reproducible example
No response
What happened?
Unfortunately this is very hard to reproduce and I only hit this on a full-scale application (with multiple providers and logic)
The only thing I can think of since I tried comparing every single configuration/setting/artifact used is that we are using pnpm to manage the application inside a monorepo, which made us do some adjustments in the settings such as reactNativeDir but it's hard to disprove at the moment
The only real clue i have is that the error comes from worklets (react-native-reanimated) which is not something that happens in the vanilla case of just creating an empty react-native template and adding vector-icons
After tracking for a while, it seems to be happening when we try to render an Icon of any non-default size (sometimes even when not supplied it crashes, but mostly works)
The following example will mostly render fine:
import FeatherIcon from "@react-native-vector-icons/feather";
...
export default function App() {
return (
<Suspense fallback={<Text>SUSPENSE</Text>}>
<GestureHandlerRootView style={{ flex: 1 }}>
<SafeAreaProvider>
....
<FeatherIcon name="home" color={"red"} />
....
</SafeAreaProvider>
</GestureHandlerRootView>
</Suspense>
);
}
Then changing the code after initial load to something like this will work:
<FeatherIcon name="home" size={26} color={focused ? theme.primary : theme.text} />
But in any case of loading a new js (when metro is asked to bundle a new one) with any size property, it will cause:
Exception in native call
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double
at com.facebook.react.viewmanagers.RNSVGPathManagerDelegate.setProperty(RNSVGPathManagerDelegate.java:87)
at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:103)
at com.facebook.react.fabric.mounting.SurfaceMountingManager.updateProps(SurfaceMountingManager.java:696)
at com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute(IntBufferBatchMountItem.kt:127)
at com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue(MountItemDispatcher.kt:325)
at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems(MountItemDispatcher.kt:231)
at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems(MountItemDispatcher.kt:89)
at com.facebook.react.fabric.FabricUIManager$3.runGuarded(FabricUIManager.java:943)
at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.kt:19)
at com.facebook.react.fabric.FabricUIManager.scheduleMountItem(FabricUIManager.java:946)
at com.swmansion.reanimated.NativeProxy.performOperations(Native Method)
at com.swmansion.reanimated.NodesManager.performOperations(NodesManager.java:121)
at com.swmansion.reanimated.NativeProxy.maybeFlushUIUpdatesQueue(NativeProxy.java:491)
at com.swmansion.worklets.runloop.AnimationFrameCallback.onAnimationFrame(Native Method)
at com.swmansion.worklets.runloop.AnimationFrameQueue.executeQueue(AnimationFrameQueue.java:92)
at com.swmansion.worklets.runloop.AnimationFrameQueue.-$$Nest$mexecuteQueue(Unknown Source:0)
at com.swmansion.worklets.runloop.AnimationFrameQueue$1.doFrameGuarded(AnimationFrameQueue.java:33)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.kt:25)
at com.facebook.react.modules.core.ReactChoreographer.frameCallback$lambda$1(ReactChoreographer.kt:59)
at com.facebook.react.modules.core.ReactChoreographer.$r8$lambda$nSkFhrr5T7rop_XKwzlLov4NLLw(Unknown Source:0)
at com.facebook.react.modules.core.ReactChoreographer$$ExternalSyntheticLambda0.doFrame(D8$$SyntheticClass:0)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1404)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1415)
at android.view.Choreographer.doCallbacks(Choreographer.java:1015)
at android.view.Choreographer.doFrame(Choreographer.java:941)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1389)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8705)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
Relevant log output
Your computer environment
System:
OS: macOS 15.6.1
CPU: (10) arm64 Apple M1 Max
Memory: 462.52 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 24.7.0
path: /opt/homebrew/bin/node
Yarn: Not Found
npm:
version: 11.5.1
path: /opt/homebrew/bin/npm
Watchman:
version: 2025.08.25.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/lib/ruby/gems/3.4.0/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.5
- iOS 18.5
- macOS 15.5
- tvOS 18.5
- visionOS 2.5
- watchOS 11.5
Android SDK:
API Levels:
- "35"
- "36"
Build Tools:
- 35.0.0
- 36.0.0
- 36.1.0
System Images:
- android-35 | Google APIs ARM 64 v8a
- android-35 | Google Play ARM 64 v8a
- android-35 | Google Play Tablet ARM 64 v8a
- android-35 | Google APIs Tablet ARM 64 v8a
- android-36 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.26094.121.2512.13991807
Xcode:
version: 16.4/16F6
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.16
path: /usr/bin/javac
Ruby:
version: 3.4.5
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.0.2
wanted: ^20.0.0
react:
installed: 19.1.1
wanted: 19.1.1
react-native:
installed: 0.82.0
wanted: 0.82.0
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true