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

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

Open
zsperske opened this issue Apr 19, 2023 · 1 comment

Comments

@zsperske
Copy link

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)
@jraska
Copy link
Owner

jraska commented May 2, 2023

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

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

2 participants