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

`No view found with reactTag: 772`

Open theBGuy opened this issue 9 months ago • 2 comments

After upgrading to the new arch the captureRef method is failing with [Error: No view found with reactTag: 772]. I tried the patch from #555 and that didn't work for me.

Specs:

  • react-native: 0.77
  • expo: 52.0.36
  • react-native-view-show: 4.0.3
  • newArch: enabled

theBGuy avatar Feb 24 '25 23:02 theBGuy

This might be connected - https://github.com/facebook/react-native/issues/50800#issuecomment-2815120399

DorianMazur avatar Apr 18 '25 10:04 DorianMazur

I've also had this error on iOS and new architecture while trying to call captureRef on a regular <View> component.

The solution for me was to switch to <ViewShot> component:

const capture = () => {
  const image = captureRef(viewShotRef);
}
- return <View ref={viewRef}>...</View>
+ return <ViewShot ref={viewShotRef}>...</ViewShot>

MonsterDeveloper avatar May 13 '25 16:05 MonsterDeveloper