java.lang.RuntimeException: Unable to capture screenshot.

amazon.com | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    java.lang.RuntimeException: Unable to capture screenshot

    GitHub | 3 years ago | denysz
    java.lang.RuntimeException: Unable to capture screenshot.
  2. 0

    Can't create screenshot dir on CI emulator

    GitHub | 2 years ago | sregg
    java.lang.RuntimeException: Unable to capture screenshot.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Android, Robotium and Spoon: A Practical Guide for Testing on Android Devices |

    sep.com | 7 months ago
    java.lang.RuntimeException: Unable to capture screenshot.
  5. 0

    It's like 10000 knives when all you need is a Spoon

    adventuresinqa.com | 6 months ago
    java.lang.RuntimeException: Unable to capture screenshot.

  1. tererecool 2 times, last 5 months ago
2 unregistered visitors

Root Cause Analysis

  1. java.lang.IllegalAccessException

    Unable to create output dir: /storage/emulated/0/app_spoon-screenshots

    at com.squareup.spoon.Spoon.createDir()
  2. com.squareup.spoon
    Spoon.screenshot
    1. com.squareup.spoon.Spoon.createDir(Spoon.java:262)
    2. com.squareup.spoon.Spoon.createDir(Spoon.java:259)
    3. com.squareup.spoon.Spoon.createDir(Spoon.java:259)
    4. com.squareup.spoon.Spoon.filesDirectory(Spoon.java:224)
    5. com.squareup.spoon.Spoon.obtainScreenshotDirectory(Spoon.java:140)
    6. com.squareup.spoon.Spoon.screenshot(Spoon.java:78)
    6 frames
  3. junit.rules
    ActivityTestRule$1.handle
    1. junit.rules.ActivityTestRule$1.handle(ActivityTestRule.java:50)
    1 frame
  4. android.support.test
    ViewInteraction.check
    1. android.support.test.espresso.ViewInteraction.runSynchronouslyOnUiThread(ViewInteraction.java:184)
    2. android.support.test.espresso.ViewInteraction.check(ViewInteraction.java:158)
    2 frames
  5. com.spreaker.android
    MainActivityExploreTests.testExploreShouldHandleNetworkFailure
    1. com.spreaker.android.radio.main.MainActivityExploreTests.testExploreShouldHandleNetworkFailure(MainActivityExploreTests.java:139)
    1 frame
  6. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame
  7. JUnit
    InvokeMethod.evaluate
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    4 frames
  8. android.support.test
    ActivityTestRule$ActivityStatement.evaluate
    1. android.support.test.internal.statement.UiThreadStatement.evaluate(UiThreadStatement.java:55)
    2. android.support.test.rule.ActivityTestRule$ActivityStatement.evaluate(ActivityTestRule.java:257)
    2 frames
  9. JUnit
    JUnitCore.run
    1. org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
    2. org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
    3. org.junit.rules.RunRules.evaluate(RunRules.java:20)
    4. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    5. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    7. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    8. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    9. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    10. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    11. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    12. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    13. org.junit.runners.Suite.runChild(Suite.java:128)
    14. org.junit.runners.Suite.runChild(Suite.java:27)
    15. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    16. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    17. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    18. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    19. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    20. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    21. org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    22. org.junit.runner.JUnitCore.run(JUnitCore.java:115)
    22 frames
  10. android.support.test
    AndroidJUnitRunner.onStart
    1. android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:54)
    2. android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:240)
    2 frames
  11. Android Platform
    Instrumentation$InstrumentationThread.run
    1. android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1879)
    1 frame