Unable to start node with appium 1.5.2

I have upgraded appium from 1.4.13 to 1.5.2.But, now I am unable to start appium node using below command:
/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/main.js -a -p

This was working fine till 1.4.13. I found out that after upgrading to latest version 1.5.2, there is no server folder exist under “/Applications/Appium.app/Contents/Resources/node_modules/appium/lib” in appium 1.5.2 package structure.

i have same issue if some one resolve it plz help thanks:slight_smile:

Yes, Appium 1.5 was a major refactor of Appium. If you become accustomed to doing certain things a certain way with previous versions of Appium, you’ll have to learn something new.

The server directory was removed. Check if there is a ‘main.js’ file under the packaged appium directory that comes as a part of the GUI version. I do not use the GUI, so I can’t simply give you the answer.

Hi All,

I am also facing problems with Appium 1.5 version, I am unable to execute IOS web Test scripts on Safari browser, this is blocker for me. Please tell me any one steps for executing test scripts on safari browser.
Is appium 1.5.2 does support iPhone 6 - ver 9.3.1.

Thanks in advance.

@prasad, this issue is not related to appium 1.5.2. Please stick to topic, you can post your query on separate post. Do not hack ongoing trails.

Priyank Shah

I am able to start appium node server on v1.5.2. Please see below:

  1. cd /Applications/Appium.app/Contents/Resources/node/bin
  2. node /Applications/Appium.app/Contents/Resources/node_modules/appium/build/lib/main.js -a <“appium ip”>-p <“appium port”> --udid <“your udid”> -bp <“your port”> --nodeconfig <“node config json file path”> --app <“xcode safari launcher build path”>

Please use java client v3.4.1 and selenium v2.52.

We tried below from java but no success:

We have been trying to start Appium using Java as below:

CommandLine command = new CommandLine("/Applications/Appium.app/Contents/Resources/node/bin/node");
command.addArgument("/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js", false);
command.addArgument("–address", false);
command.addArgument("–port", false);
command.addArgument("–no-reset", false);
DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
DefaultExecutor executor = new DefaultExecutor();
executor.execute(command, resultHandler);

It gives us below error:

throw err;

Error: Cannot find module ‘/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js’
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Function.Module.runMain (module.js:447:10)
at startup (node.js:146:18)
at node.js:404:3

1 Like

I am also getting same issue and I have checked into my folder structure this fine not found and giving same exception on console

For Appium 1.5.X you need to use a different directory path as it has changed from previous versions. If you are call the GUI app via command line like in the posts above, it should be something like node /Applications/Appium.app/Contents/Resources/node_modules/appium/build/lib/main.js --address --port 4723 .

Hope that helps.