Error when running appium test parallel with selenium grid

When I run one test on several devices parallel, I get error: "“Failed to start an Appium session err was: Error: EPERM: operation not permitted, rename”

This error occurs on some of the device or some devices randomly. So I can run it and everything will be ok, but often I get this error.

I run hub:
java -jar selenium-server-standalone-2.53.0.jar -role webdriver -nodeConfig emulator-5554.json -hub

Appium server:
appium --address --port 4721 -bp 2253 --udid emulator-5554 --nodeconfig C:\SeleniumGrid\Android\emulator-5554.json

Example of the json configuration file:
{ “capabilities”:
“deviceName”: “emulator-5554”,
“maxInstances”: 2,
“appPackage”: “com.olx.olx”,
“appActivity”: “com.olx.olx.ui.activities.SplashActivity”,
“appWaitActivity”: “com.olx.olx.ui.activities.SplashActivity”
“proxy”: “org.openqa.grid.selenium.proxy.DefaultRemoteProxy”,
“host”: “”,
“port”: 4554,
“maxSession”: 10,
“register”: true,
“registerCycle”: 5000,
“hubPort”: 4444,
“hubHost”: “”
I can suppose, that it occurs because two or more threads refer to one apk file simultaneously

What do I wrong?

It is tutorial for starting appium servers and selenium hub. I know it.
I have a problem in execution tests

1 Like