gre / react-native-view-shot

Snapshot a React Native view and save it to an image

Home Page:https://github.com/gre/react-native-view-shot-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash error on android

pierroo opened this issue · 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

Same question

@pierroo solve it?

@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 oh, no

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