A new session could not be created. (Original error: Could not push strings.json)

Hi,

When I try to allocate a WebDriver from Selenium Hub, sometimes it will not return a driver due to this log message: A new session could not be created. (Original error: Could not push strings.json)

This happens occasionally.

Appium Version: 1.4.1 (node.js version)
Appium client: io.appium:java-client:1.6.1
Settings: 1 Selenium Hub, multiple Linux Hosts, multiple emulators per Linux Host.
Emulators: Android Stock Emulators, SDK level 19 (KitKat)

Log:
Error Message

java.lang.RuntimeException: Webdriver was unable to be created (Appium): org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Could not push strings.json) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 11.25 seconds
Build info: version: β€˜2.42.2’, revision: β€˜6a6995d31c7c56c340d6f45a76976d43506cd6cc’, time: β€˜2014-06-03 10:52:47’
System info: host: β€˜dbuildslave11.tag-dev.com’, ip: β€˜172.17.42.1’, os.name: β€˜Linux’, os.arch: β€˜amd64’, os.version: β€˜2.6.32-358.18.1.el6.x86_64’, java.version: β€˜1.8.0_45’
Driver info: com.tagged.appium.utils.SwipeableAppiumDriver
Stacktrace

java.lang.RuntimeException: Webdriver was unable to be created (Appium): org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Could not push strings.json) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 11.25 seconds
Build info: version: β€˜2.42.2’, revision: β€˜6a6995d31c7c56c340d6f45a76976d43506cd6cc’, time: β€˜2014-06-03 10:52:47’
System info: host: β€˜dbuildslave11.tag-dev.com’, ip: β€˜172.17.42.1’, os.name: β€˜Linux’, os.arch: β€˜amd64’, os.version: β€˜2.6.32-358.18.1.el6.x86_64’, java.version: β€˜1.8.0_45’
Driver info: com.tagged.appium.utils.SwipeableAppiumDriver
at com.tagged.appium.utils.WebDriverFactory.createDriver(WebDriverFactory.java:79)
at com.tagged.appium.tests.DashboardTest.testNavigation(DashboardTest.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:46)
at org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:37)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Since allocation of WebDriver failed at Selenium Hub level, no Appium log is available.

However, β€œCould not push strings.json” is message from Appium:
appium/lib/devices/android/android.js – line 347

var jsonFile = path.resolve(outputPath, stringsJson);
this.adb.push(jsonFile, remotePath, function (err) {
  if (err) return cb(new Error("Could not push strings.json"));
  cb();
});

Does anyone knows why is this happening, and how to enforce better logging from Node.js level? @willosser?

1 Like

Sorry, @kylechihcheng, I don’t know the answer, but it would be great if we could get better logging here to determine the cause of the failure. Perhaps @isaac or @jonahss can offer some insight.

I cross posted this yesterday, and it seemed it is fixed in master branch


1 Like

So have to solve the problem?