Open n-ii-ma opened 1 year ago
expriencing same issue, no error occured and no uri has produced, expo sdk 49 react native 72.3 with new arch
expriencing same issue, no error occured and no uri has produced, expo sdk 49 react native 72.3 with new arch
Finally someone else reports this issue! I don't think this package is actively maintained anymore.
Would appreciate if anyone recommends an alternate package that works with new versions of RN.
Any update on this? I am facing the same issue on Android.
I'm facing the same issue in android
ERROR Oops, snapshot failed [Error: Failed to capture view snapshot]
Until this package is updated in order to become compatible with RN v0.72+, it should be considered obsolete.
I had this problem, but this seems to have fixed it for me: https://github.com/gre/react-native-view-shot/issues/7#issuecomment-521379462
Adding collapsable={false}
to the View
component which you want to capture temporarily fixes this issue.
Thanks to @paulsonnenschein (https://github.com/gre/react-native-view-shot/issues/482#issuecomment-1652097803) for pointing to the solution: https://github.com/gre/react-native-view-shot/issues/7#issuecomment-521379462
Can anyone tell me if they able to get the solution for this issue it is urgent for me to do that if there are any library which can replace this library then you can tell me
Can anyone tell me if they able to get the solution for this issue it is urgent for me to do that if there are any library which can replace this library then you can tell me
Did you try adding collapsable={false}
to the View
component which you want to capture?
I'm using ImageBackground from react-native and continue to encounter the error on Android, even after setting collapsible to false. However, it works perfectly on iOS.
<ImageBackground
ref={viewRef}
collapsable={false}
source={{ uri: themeUriPath }}
style={{ height: '100%', width: '100%' }}
>
{renderLayers()}
</ImageBackground>
Adding
collapsable={false}
to theView
component which you want to capture temporarily fixes this issue.Thanks to @paulsonnenschein (#482 (comment)) for pointing to the solution: #7 (comment)
I've checked this solution and it won't work for me (iOS was OK but android had an error). I had to change View
to the ViewShot
tag, and it started working.
To me, unbelievable, what worked was removing a negative margin left from Video component.
import { Video } from 'expo-av'
....
return (
<Video
source={{ uri: props.url }}
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
marginLeft: '-10%',
}}
/>
);
This way, always that the video is on screen, the error [Error: Failed to capture view snapshot] occurs.
After remove the marginLeft, came back to works fine o.O
Adding
collapsable={false}
to theView
component which you want to capture temporarily fixes this issue.Thanks to @paulsonnenschein (#482 (comment)) for pointing to the solution: #7 (comment)
Setting Collapsible to false is also not working, is there any alternative?
bug report
After upgrading to React Native 0.72.0, I get the
Failed to capture view snapshot
error.It worked on React Native 0.71.11
Version & Platform
Platform: Only happens on Android