You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dropshots fails to read images every now and then with this error:
java.io.FileNotFoundException: /storage/emulated/0/Download/screenshots/me.saket.telephoto.subsamplingimage.test/various_image_orientations_in_exif_metadata[RotatedBy180,Center,Fill]_zoomed.png: open failed: EACCES (Permission denied)
at libcore.io.IoBridge.open(IoBridge.java:575)
at java.io.FileOutputStream.<init>(FileOutputStream.java:236)
at java.io.FileOutputStream.<init>(FileOutputStream.java:186)
at com.dropbox.dropshots.Dropshots.writeImage(Dropshots.kt:196)
at com.dropbox.dropshots.Dropshots.writeThen(Dropshots.kt:176)
at com.dropbox.dropshots.Dropshots.assertSnapshot(Dropshots.kt:153)
at com.dropbox.dropshots.Dropshots.assertSnapshot(Dropshots.kt:94)
at com.dropbox.dropshots.Dropshots.assertSnapshot$default(Dropshots.kt:90)
…
Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:567)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:273)
at libcore.io.ForwardingOs.open(ForwardingOs.java:567)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7725)
at libcore.io.IoBridge.open(IoBridge.java:561)
... 24 more
I used to workaround this by manually granting WRITE_EXTERNAL_STORAGE permission in my tests, but do you know why is this even needed?
// Shouldn't be needed on > API 29, but dropshots is occasionally unable to write to external storage without this.
val uiAutomation = InstrumentationRegistry.getInstrumentation().uiAutomation
uiAutomation.grantRuntimePermission(packageName, android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
The text was updated successfully, but these errors were encountered:
Hmm, I've seen this from time to time as well, but I'm not sure where it's coming from, the emulator or the emulators bridge to the host system. I'm working on some updates for managed devices that I think should fix this as well, if you don't mind using your workaround until those land.
Dropshots fails to read images every now and then with this error:
I used to workaround this by manually granting
WRITE_EXTERNAL_STORAGE
permission in my tests, but do you know why is this even needed?The text was updated successfully, but these errors were encountered: