Falcon icon indicating copy to clipboard operation
Falcon copied to clipboard

com.jraska.falcon.Falcon$UnableToTakeScreenshotException: Unable to take screenshot to file

Open zsperske opened this issue 1 year ago • 1 comments

Seeing this failure on an API 29 emulator.

com.jraska.falcon.Falcon$UnableToTakeScreenshotException: Unable to take screenshot to file /sdcard/screenshots/myScrenshot of activity com.central.RootActivity
at com.jraska.falcon.Falcon.takeScreenshot(Falcon.java:67)
at com.affirm.central.utils.ScreenshotKt.internalScreenshot(Screenshot.kt:38)
at com.affirm.central.utils.ScreenshotKt.screenshot(Screenshot.kt:24)
at com.my.test.sometest
... 45 trimmed
Caused by: java.io.FileNotFoundException: /sdcard/screenshots/myScreenshot: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:496)
at java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at java.io.FileOutputStream.<init>(FileOutputStream.java:186)
at com.jraska.falcon.Falcon.writeBitmap(Falcon.java:183)
at com.jraska.falcon.Falcon.takeScreenshot(Falcon.java:61)
... 49 more
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7255)
at libcore.io.IoBridge.open(IoBridge.java:482)

zsperske avatar Apr 19 '23 18:04 zsperske

Hey,

Hard to judge purely from thus. It is likely caused by missing permissions.

Can you create the file by yourself to verify this? Falcon doesn't do anything different. Possibly the missing permission is somewhere in logcat as well.

Thanks

jraska avatar May 02 '23 19:05 jraska