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

`Canvas ref is not set` on fast refresh

Open laurens-lamberts opened this issue 1 year ago • 1 comments

Hi! :)

As soon as I save a code file containing a Skia canvas - and the app performs a live reload of the code - I do get the following error on my simulator;

This never shows on a clean startup of the app or at full reload. Neither does it show on-save of a file that does not contain a Skia Canvas. Only when performing live reload (fast refresh, hot reload... I do mix up those terms occasionally).

I don't use refs for any of my Skia canvasses.

For me this error shows on 0.1.130, as well as on 0.1.137. Do you have an idea what this error is about?

laurens-lamberts avatar Jul 29 '22 13:07 laurens-lamberts

Thanks, @laurens-lamberts - we'll have to look into this when vacation is over (next week!)

chrfalch avatar Aug 05 '22 07:08 chrfalch

having this issue too. I am using expo sdk 46. Not sure if that is helpful

itsramiel avatar Oct 29 '22 16:10 itsramiel

Maybe worth mentioning. It only happens on ios simulator. on device, it only shows a white screen

itsramiel avatar Oct 29 '22 17:10 itsramiel

We think that this is fixed in newer versions of Skia. @laurens-lamberts can you confirm?

wcandillon avatar Oct 31 '22 18:10 wcandillon

Hi guys,

I'm currently on a holiday and will be for the rest of November. Unfortunately I am not able to verify this at the moment.

All the best, Laurens

laurens-lamberts avatar Nov 05 '22 18:11 laurens-lamberts

Closing it since it seems to be fixed. @laurens-lamberts we are releasing UI rendering today, I think it's gonna be big for some of your use-cases

wcandillon avatar Nov 18 '22 12:11 wcandillon

Hi @wcandillon, I just installed the latest version into our app, and it all looks well on both platforms. :) We will test it thoroughly, and hopefully put it into production soon. Thanks for all the great work!

laurens-lamberts avatar Jan 03 '23 14:01 laurens-lamberts