question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

captureScreen() dosen't capture fully?

See original GitHub issue

I’m trying to capture my whole screen using captureScreen()

image

But all i get is the background. Any idea?

image

My container is coded like this

  contentContainer: {
    alignItems: 'center',
    justifyContent: 'center',
    backgroundColor: '#0007',
    position: 'absolute',
    top: 0, left: 0,
    width: Dimensions.get('window').width,
    height: Dimensions.get('window').height,
    zIndex: 100000
  },
  container: {
    height: hp('45%'),
    width: 300,
    backgroundColor: "#fff",
    padding: 10,
    overflow: "hidden",
    alignItems: "center",
    justifyContent: "center",
  },

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ashfurrowcommented, May 3, 2022

I was having this problem and fixed it (at least on iOS) by modifying this line:

https://github.com/gre/react-native-view-shot/blob/926cadad25e72fe0c883a2f350de9de7ea08341a/ios/RNViewShot.m#L56

The problem here is that we’re accessing the rootViewController property of UIWindow, which would not include modally-presented view controllers on top of it. Rather, we should be treating the UIWindow as the view we want to snapshot itself.

-     view = window.rootViewController.view;
+     view = window;

I’ve verified this works on iOS but I’m still exploring this on Android. I hope this helps someone in the meantime.

1reaction
yalcinozercommented, Jul 6, 2020

@enigmablue I think its about your viewshot component wraps your dialog or not. Please make sure your dialog(modal) component PLACED in viewshot component.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix OBS Not Capturing Full Screen - FlexClip
This is a guide showing you how to fix OBS not recording full screen issues. Follow the detailed fixes below and say no...
Read more >
Best Ways to Fix OBS Not Recording Full Screen
1. Quick Solution: · 2. Switch OBS's GPU · 3. Empower the Compatibility Mode · Steps to Record Full Screen with DemoCreator. Since...
Read more >
[Problem solved] OBS Studio captures a small window instead ...
OBS just captures a small window on the upper left side instead of a fullscreen. The window shows the full screen of the...
Read more >
Fixed: Print Screen Not Working on Windows 10 | SoftwareKeep
Solution 1. Stop Background programs · Hold the Windows + R keys on your keyboard to launch Run. · Using the menu on...
Read more >
_ScreenCapture_Capture cannot capture the whole screen
im trying to use _ScreenCapture_Capture($sFileName) to cature full screen and save as a jpg file, but it always only capture the left-top ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found