react-native-graph icon indicating copy to clipboard operation
react-native-graph copied to clipboard

Error: RNSKIA: Could not retrieve drawable from CAMetalLayer

Open ehteshaxm opened this issue 11 months ago • 2 comments

Faced this error while running an ios dev build on mac, Line chart doesn't show up.

ehteshaxm avatar Jan 22 '25 02:01 ehteshaxm

same~~

Kai2049 avatar Feb 19 '25 09:02 Kai2049

For anyone searching for this error, i was using victory native XL and what fixed it was this:

Non working code `<CartesianChart /* … */ style={{ // 👈 width is a string here height: 300, width: '100%', }}

`

Working code `<CartesianChart /* … */ style={{
height: 300, width: 300, }}

` When the chart mounts, React Native hasn’t run its layout pass yet, so the Canvas gets width = 0. Skia then asks the underlying CAMetalLayer for a drawable of size 0×300 and Metal refuses, producing that log line. (It’s non-fatal but nothing is drawn.)

darkblitzrc avatar May 14 '25 16:05 darkblitzrc