AndroidScreencast icon indicating copy to clipboard operation
AndroidScreencast copied to clipboard

IO Exception happened while getting device screenshot

Open lesca opened this issue 8 years ago • 11 comments

I got tons of error messages as below:

[ScreenCaptureRunnable.java:58]2017-08-21 00:56:57,952 [Screen Capturer] [31mWARN [0;39m com.github.xsavikx.androidscreencast.api.injector.ScreenCaptureRunnable - IO Exception happened while getting device screenshot. Will try again in 100 ms. [ScreenCaptureRunnable.java:87]2017-08-21 00:56:58,062 [Screen Capturer] [34mINFO [0;39m com.github.xsavikx.androidscreencast.api.injector.ScreenCaptureRunnable - Failed to get device screenshot

They are just repeated again and again.

Platform is Android-x86 running in Hyper-V VM hosting on WS2016.

It's appreciated if you give me some advises to solve this.

lesca avatar Aug 20 '17 17:08 lesca

@lesca Hi, are you able to get a screenshot via adb directly?

I haven't tested the app against any VMs.

xSAVIKx avatar Aug 20 '17 17:08 xSAVIKx

@xSAVIKx What's the command to take screenshot with "adb" ? I'd like to have a try.

lesca avatar Aug 26 '17 03:08 lesca

To get screenshot via adb adb shell screencap /sdcard/screen.png && adb pull /sdcard/screen.png

nazyrov avatar Sep 18 '17 06:09 nazyrov

@xSAVIKx Hi, i get this problem for AndroidScreencast 0.0.13s on Win7 wiht JDK 13.0.1

 [ScreenCaptureRunnable.java:58]2019-11-24 14:22:43,775 [Screen Capturer]     [31mWARN [0;39m com.github.xsavikx.androidscreencast.api.injector.ScreenCaptureRunnable - IO Exception happened while getting device screenshot. Will try again in 100 ms.
 [ScreenCaptureRunnable.java:87]2019-11-24 14:22:43,876 [Screen Capturer]     [34mINFO [0;39m com.github.xsavikx.androidscreencast.api.injector.ScreenCaptureRunnable - Failed to get device screenshot

This warning shows in console around one/two times per second.

4EPHblN avatar Nov 24 '19 13:11 4EPHblN

@4EPHblN do you have the AndroidScreencast.log file? There should be more detailed logs. Also, can you try to grab the screenshot manually?

The other suggestion is to use Java8 instead.

xSAVIKx avatar Nov 25 '19 08:11 xSAVIKx

@xSAVIKx I have the same warning on JDK 8u231. Manually the screenshot grabs without any problems. ASUS PC Link which use similar technology works fine. AndroidScreencast.log

4EPHblN avatar Nov 25 '19 09:11 4EPHblN

@4EPHblN yeah, the logs were not helpful here :-( Can you please try the new v0.0.16s version? I've updated some dependencies and the logs should be more reliable now.

xSAVIKx avatar Nov 26 '19 21:11 xSAVIKx

@xSAVIKx You link shows 404.

4EPHblN avatar Nov 27 '19 09:11 4EPHblN

Yeah, looks like draft releases are not publicly available :-(

Here are the bundles. androidscreencast-0.0.16s-linux.tar.gz androidscreencast-0.0.16s-macosx.tar.gz androidscreencast-0.0.16s-windows.zip

xSAVIKx avatar Nov 27 '19 10:11 xSAVIKx

@xSAVIKx An update solves this issue for me. AndroidScreencast.log

4EPHblN avatar Nov 27 '19 10:11 4EPHblN

@4EPHblN that's great to hear! I've also released this version and it's now available here.

xSAVIKx avatar Nov 28 '19 20:11 xSAVIKx