NativeScript / nativescript-dev-appium

A package to help with writing and executing e2e Appium tests in NativeScript apps
Apache License 2.0
70 stars 27 forks source link

Unable to start appium server : pid undefined #220

Closed tdhman closed 5 years ago

tdhman commented 5 years ago

Environment

Describe the bug In my project, I have configured the appium test. Before, I could run all the tests without any error. However, since I updated to the latest CLI & tns-modules, I got the following error when running the tests:

> mocha --opts ./e2e/config/mocha.opts "--runType" "sim.iPhone8.iOS12.2" "--reuseDevice
...
Server args:   ["-p","4723","--log-level","info"]
1) "before all" hook: start server
TypeError [ERR_INVALID_ARG_TYPE]: The "pid" argument must be of type number. Received type undefined

Expected behavior The appium server is started & runs all the tests.

Thanks a lot for any help.

------------------EDIT------------------ The issue is due to the problem with appium installed by npm.

acacha commented 5 years ago

The error is caused if you forget to install appium globally so:

npm install -g appium