Dump Window Hierarchy error message when executing mobile test scripts sequentially

Hi All,

I am unable to execute more than 10 tests one after the other, as after 2 or 3 tests, appium throws below error :> info: [debug] [UIAUTOMATOR STDOUT] java.io.FileNotFoundException: /data/local/tmp/local/tmp/dump.xml: open failed: ENOENT (No such file or directory)

info: [debug] [UIAUTOMATOR STDOUT] at libcore.io.IoBridge.open(IoBridge.java:409)
info: [debug] [UIAUTOMATOR STDOUT] at java.io.FileInputStream.(FileInputStream.java:78)
info: [debug] [UIAUTOMATOR STDOUT] at java.io.FileReader.(FileReader.java:42)
info: [debug] [UIAUTOMATOR STDOUT] at io.appium.android.bootstrap.utils.XMLHierarchy.getRawXMLHierarchy(XMLHierarchy.java:88)
info: [debug] [UIAUTOMATOR STDOUT] at io.appium.android.bootstrap.utils.XMLHierarchy.getFormattedXMLDoc(XMLHierarchy.java:96)
info: [debug] [UIAUTOMATOR STDOUT] at io.appium.android.bootstrap.handler.Source.execute(Source.java:25)
info: [debug] [UIAUTOMATOR STDOUT] at io.appium.android.bootstrap.AndroidCommandExecutor.execute(AndroidCommandExecutor.java:64)
info: [debug] [UIAUTOMATOR STDOUT] at io.appium.android.bootstrap.SocketServer.runCommand(SocketServer.java:168)
info: [debug] [UIAUTOMATOR STDOUT] at io.appium.android.bootstrap.SocketServer.handleClientData(SocketServer.java:89)
info: [debug] [UIAUTOMATOR STDOUT] at io.appium.android.bootstrap.SocketServer.listenForever(SocketServer.java:133)
info: [debug] [UIAUTOMATOR STDOUT] at io.appium.android.bootstrap.Bootstrap.testRunServer(Bootstrap.java:16)
info: [debug] [UIAUTOMATOR STDOUT] at java.lang.reflect.Method.invokeNative(Native Method)
info: [debug] [UIAUTOMATOR STDOUT] at java.lang.reflect.Method.invoke(Method.java:515)
info: [debug] [UIAUTOMATOR STDOUT] at junit.framework.TestCase.runTest(TestCase.java:168)
info: [debug] [UIAUTOMATOR STDOUT] at junit.framework.TestCase.runBare(TestCase.java:134)
info: [debug] [UIAUTOMATOR STDOUT] at junit.framework.TestResult$1.protect(TestResult.java:115)
info: [debug] [UIAUTOMATOR STDOUT] at junit.framework.TestResult.runProtected(TestResult.java:133)
info: [debug] [UIAUTOMATOR STDOUT] at junit.framework.TestResult.run(TestResult.java:118)
info: [debug] [UIAUTOMATOR STDOUT] at junit.framework.TestCase.run(TestCase.java:124)
info: [debug] [UIAUTOMATOR STDOUT] at
info: [debug] [UIAUTOMATOR STDOUT] com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:160)
info: [debug] [UIAUTOMATOR STDOUT] at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
info: [debug] [UIAUTOMATOR STDOUT] at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
info: [debug] [UIAUTOMATOR STDOUT] at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
info: [debug] [UIAUTOMATOR STDOUT] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
info: [debug] [UIAUTOMATOR STDOUT] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
info: [debug] [UIAUTOMATOR STDOUT] at dalvik.system.NativeStart.main(Native Method)
info: [debug] [UIAUTOMATOR STDOUT] Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
info: [debug] [UIAUTOMATOR STDOUT] at libcore.io.Posix.open(Native Method)
info: [debug] [UIAUTOMATOR STDOUT] at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
info: [debug] [UIAUTOMATOR STDOUT] at libcore.io.IoBridge.open(IoBridge.java:393)
info: [debug] [UIAUTOMATOR STDOUT] … 25 more
info: [debug] [BOOTSTRAP] [debug] Command returned error:java.lang.RuntimeException: Failed to Dump Window Hierarchy
info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command.”,“origValue”:“Failed to Dump Window Hierarchy”},“sessionId”:“a62cefbc-db5e-4a52-b932-b2cc4f2d60a7”}
info: ← GET /wd/hub/session/a62cefbc-db5e-4a52-b932-b2cc4f2d60a7/source 500 25.088 ms - 200
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“Failed to Dump Window Hierarchy”,“status”:13}

I am closing driver instance after each test and a new driver instance is created for a new test.

Could anyone help in this regard?

Thanks,
Sujata