react-native-skia
react-native-skia copied to clipboard
error in web Cannot read properties of null (reading 'rangeMin')
Description
The crash occurs when the user changes the props from the Storybook interface (I used invalid props that are not used).
canvaskit.js:251 Uncaught TypeError: Cannot read properties of null (reading 'rangeMin')
at Ob (canvaskit.js:251:1)
at canvaskit.wasm:0x31efb
at canvaskit.wasm:0x25d627
at canvaskit.wasm:0x522836
at canvaskit.wasm:0xce89d
at Object._MakeGrContext (canvaskit.js:186:1)
at a.MakeWebGLContext (canvaskit.js:15:1)
at a.MakeWebGLCanvasSurface (canvaskit.js:18:1)
at SkiaDomView.onLayoutEvent (SkiaBaseWebView.js:47:1)
at Platform.web.js:21:1
Version
1.2.3
Steps to reproduce
git clone https://github.com/YOEL311/storybookPublic
cd storybookPublic
git switch main
yarn
yarn storybook
go to the storybook in Browser change the props in the Simple story
Snack, code example, screenshot, or link to a repository
https://github.com/YOEL311/storybookPublic
I've been encountering this too. It doesn't error if you delay loading any skia components by ~500ms or more. I would assume this means WithSkiaWeb is prematurely loading its children before the WASM is truly loaded. Can we get some input @wcandillon ? Thanks
EDIT: I fixed it in my case by preventing re-renders caused by parent component. This is still unexpected behaviour I think, but if you encounter this, try checking if you have anything causing re-renders during the loading of the WASM