Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to snapshot view tag XXXX #545

Open
FernandoAOborges opened this issue Oct 31, 2024 · 16 comments
Open

Failed to snapshot view tag XXXX #545

FernandoAOborges opened this issue Oct 31, 2024 · 16 comments

Comments

@FernandoAOborges
Copy link

 @gorhom/[email protected]
│ ├─┬ @gorhom/[email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├─┬ @miblanchard/[email protected]
│ └── [email protected] deduped
├─┬ @notifee/[email protected]
│ └── [email protected] deduped
├─┬ @react-native-async-storage/[email protected]
│ └── [email protected] deduped
├─┬ @react-native-community/[email protected]
│ └── [email protected] deduped
├─┬ @react-native-community/[email protected]
│ └── [email protected] deduped
├─┬ @react-native-community/[email protected]
│ └── [email protected] deduped
├─┬ @react-native-firebase/[email protected]
│ └── [email protected] deduped
├─┬ @react-native-google-signin/[email protected]
│ └── [email protected] deduped
├─┬ @react-native-menu/[email protected]
│ └── [email protected] deduped
├─┬ @react-navigation/[email protected]
│ ├─┬ @react-navigation/[email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├─┬ @react-navigation/[email protected]
│ └── [email protected] deduped
├─┬ @react-navigation/[email protected]
│ └── [email protected] deduped
├─┬ @react-navigation/[email protected]
│ └── [email protected] deduped
├─┬ @react-navigation/[email protected]
│ └── [email protected] deduped
├─┬ @testing-library/[email protected]
│ └── [email protected] deduped
├─┬ @testing-library/[email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └── [email protected] deduped
├─┬ [email protected]
│ └─┬ @react-native/[email protected]
│   └── [email protected] deduped
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected] deduped
│ └── [email protected] deduped
└─┬ [email protected]
  └── [email protected] deduped
[email protected]
react-native-view-shot": "^3.8.0"

Platform: Android

Expected Behavior
The captureScreen function in react-native-view-shot should capture an image of the screen and return the URI of the captured image.

Actual Behavior
When calling captureScreen, the following error occurs: Failed to snapshot view tag 2730.

Steps to Reproduce the Behavior
Install the latest version of react-native-view-shot.
Set up and implement screen capture with captureScreen.

Run the app on Android with React Native version 0.76.1.
The error Failed to snapshot view tag 2730 appears when trying to capture the screen.
@ChetanReddyC
Copy link

still same error for me also , in the version of [email protected](Bridgeless) also, in the version 0.74.5 (normal) it is worked fine
iam also surfing for the solution from couple of days, the error is (NOBRIDGE) ERROR Error capturing view: [Error: Failed to snapshot view tag 872]

@auliakbarh
Copy link

I got the same error, here's my log cat:

Failed to snapshot view tag xxxx
                                                                                                    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.facebook.react.uimanager.UIManagerModule.addUIBlock(com.facebook.react.uimanager.UIBlock)' on a null object reference
                                                                                                    	at fr.greweb.reactnativeviewshot.RNViewShotModule.captureRef(RNViewShotModule.java:104)
                                                                                                    	at com.facebook.jni.NativeRunnable.run(Native Method)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:959)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:100)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:232)
                                                                                                    	at android.os.Looper.loop(Looper.java:317)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl.lambda$startNewBackgroundThread$2(MessageQueueThreadImpl.java:217)
                                                                                                    	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)

@smolleyes
Copy link

Hello

Same error here with latest react-native.

What s the best RN version to use for this module ?

Thanks

@smolleyes
Copy link

smolleyes commented Nov 6, 2024

@gre have an idear please ? this is the last step to finish my app and i fail on this , so frustrating lol

thanks

@FernandoAOborges
Copy link
Author

@gre have an idear please ? this is the last step to finish my app and i fail on this , so frustrating lol

thanks

I had to switch packages because it was urgent. I changed to @shopify/react-native-skia, snapshot.

@smolleyes
Copy link

@FernandoAOborges yeah i tried it yesterday but it returned "Textnodes are not yet supported", strange...

@ChetanReddyC
Copy link

Hello

Same error here with latest react-native.

What s the best RN version to use for this module ?

Thanks

Iam currently using this in the RN version 0.74.5 in this version this is working fine as it suppose to! ,even i upgraded to next version of this this isn't working,iam also waiting for this fix to upgrade to RN latest no bridge architecture, everything is working except this package, hope this will be fixed soon!

@duongnguyen17
Copy link

I got the same error

@eduardo-manoel-de-lara
Copy link

Same error

@du1nabozny
Copy link

du1nabozny commented Nov 18, 2024

Receive this error when switching to Expo 52

@arisa-s
Copy link

arisa-s commented Nov 20, 2024

Same issue when I upgraded to Expo53

@samanmadani71
Copy link

same issue.

@linushahs
Copy link

Same issue: (NOBRIDGE) LOG [Error: Failed to snapshot view tag 36]

expo: 52.0.11
react-native: 0.76.3
react-native-view-shot: 4.0.2

@Tsabary
Copy link

Tsabary commented Nov 25, 2024

Same here

@lisy999
Copy link

lisy999 commented Dec 1, 2024

Same error:Failed to snapshot view tag 36
iOS works well, but Android doesn't work as well.

@parmaps
Copy link

parmaps commented Dec 2, 2024

same issue here
on friday it was working with expo: "^51.0.38", react-native: "0.74.5" and react-native-view-shot: "^3.8.0"
yesterday we updated to expo: "^52.0.0", react-native: "0.76.3", react-native-view-shot: "^4.0.2"
and it stopped working on Android
haven't been able to test on iOS yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests