This repository has been archived by the owner on Dec 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Screenshots not being pulled on API 22 #151
Labels
Comments
Merged
Thanks for detailed description! |
Any news on that? |
This would be really great to get in :) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi there!
TL;DR:
Composer always pulls screenshots from
/storage/emulated/0/
but in API 22 they're stored in/storage/sdcard/
.Long version:
We have a device farm with some API 22 emulators, and we're seeing that the screenshots are not being pulled off the device.
The error printed by Composer is basically:
After much digging, we're seeing that Composer has a hardcoded folder to pull screenshots from:
/storage/emulated/0/
composer/composer/src/main/kotlin/com/gojuno/composer/TestRun.kt
Line 166 in 5319795
But Spoon (and similar tools) save screenshots in
Environment.getExternalStorageDirectory()
.here. In API 22 emulators this route corresponds to
/storage/sdcard/
, while in higher versions it's/storage/emulated/0/
.Since Composer has a hardcoded path to a different root it's not able to pull screenshots from the right directory.
A possible fix would be to get the external storage path from the device like Spoon does by reading the
EXTERNAL_STORAGE
environment variable. hereThe text was updated successfully, but these errors were encountered: