lucky-canvas
lucky-canvas copied to clipboard
Catch Error when render SlotMachine not load image
I cannot rerender or catch error from SlotMachine ("@lucky-canvas/react": "^0.1.13") although img correct link but // error: prizes[i].imgs[i] => 'my-correct-link-image' 图片加载失败', i try onFinally or onError not working for me.!
That onFinally can only be used to capture errors in the component itself It cannot be used to capture lucky-canvas errors
You need to describe what you specifically want to do
i want catch error when "error: prizes[i].imgs[i] => 'my-correct-link-image' 图片加载失败' ", onError not working for me :(
If you see this
error: prizes[i].imgs[i] => 'my-correct-link-image' 图片加载失败'
That means there is a problem with your image path, or it is an unresolved image. This is an internal error thrown by me because you must solve it to run the lucky-canvas component correctly
i sure this link correct, but i get error above (when i click link from error, it still exaclty) ;(
Send me the link and I'll take a look
this error happens sometimes, i cannot send link because this link private and had to account ;(
That could be because this link cannot be accessed by my component The internal rendering of my component is like this
const img new window.Image()
img.src = 'your link'
img.onload = () => {}
img.onerror = () => {}
You can try it directly in your code
Thank you, i try reproduce and report it later 👍
hi @buuing, i has been reproduce it with specific device:
device info:
- iPhone 14 Pro Max
- iOS 16.6.1
https://codesandbox.io/s/mutable-currying-6n6ht5
- iPhone 14 Pro Max not render
- on web and iPhone 11, android working