react-native-view-shot icon indicating copy to clipboard operation
react-native-view-shot copied to clipboard

Crash error on android

Open pierroo opened this issue 1 year ago • 5 comments

bug report

I get this error when I try to "viewShotRefs?.current.capture().then..." image

obviously there may be something wrong in my view that I have yet to find, but why does it crash? it should simply go into the }).catch(e => { etc

Version & Platform

v3.7.0 RN 0.69.12

Platform: Android

Expected behavior

Actual behavior

Steps to reproduce the behavior

pierroo avatar Jan 25 '24 12:01 pierroo

Same question

songxiaoliang avatar Mar 14 '24 11:03 songxiaoliang

@pierroo solve it?

songxiaoliang avatar Mar 14 '24 11:03 songxiaoliang

@songxiaoliang yup, not a sexy fix but I simply wrapped the capture in a 300ms timeout and it fixed it. no clue why, let me know if it worked for you too?

pierroo avatar Mar 14 '24 12:03 pierroo

@pierroo oh, no

songxiaoliang avatar Mar 15 '24 02:03 songxiaoliang

@pierroo I've been practicing the implementation you've given me, and I haven't found any problems so far, thanks!

songxiaoliang avatar Mar 15 '24 02:03 songxiaoliang