Appium 1.5 Beta Release

I can’t get past this issue that I always fail to install appium-chromedriver:

> [email protected] install /home/rkrisztian1/tmp/appium-beta/appium-1.5/node_modules/appium-chromedriver
> node install-npm.js


/home/rkrisztian1/tmp/appium-beta/appium-1.5/node_modules/bluebird/js/main/promisify.js:268
        throw new TypeError("fn must be a function\u000a\u000a    See http://goo.gl/916lJJ\u000a");
              ^
TypeError: fn must be a function

    See http://goo.gl/916lJJ

    at Function.Promise.promisify (/home/rkrisztian1/tmp/appium-beta/appium-1.5/node_modules/bluebird/js/main/promisify.js:268:15)

Doesn’t matter if I run it from a checkout with the mentioned npm install appium-chromedriver trick or via npm install appium@beta (without the checkout). It always fails.

Can you install appium-chromedriver on its own? If you go into a clean directory and run npm install appium-chromedriver what happens?

Hello @isaac ! Thanks for Shaping up Appium to be more reliable.

The appium@beta install is getting failed with below error related to appium chrome driver. Could you please suggest if something needs to get fixed from my side to get the latest appium 1.5 beta 7 installed ?

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "appium@beta" "--verbose"
npm ERR! node v4.1.0
npm ERR! npm  v2.14.4
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node install-npm.js'.
npm ERR! This is most likely a problem with the appium-chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install-npm.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls appium-chromedriver
npm ERR! There is likely additional logging output above.

Hi,

Getting this error when try to run appium.

/usr/lib/node_modules/appium/node_modules/bluebird/js/main/promisify.js:268
throw new TypeError(“fn must be a function\u000a\u000a See http://goo.gl/916lJJ\u000a”);
^
TypeError: fn must be a function

See http://goo.gl/916lJJ

at Function.Promise.promisify (/usr/lib/node_modules/appium/node_modules/bluebird/js/main/promisify.js:268:15)
at Object.<anonymous> (lib/fs.js:46:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/lib/node_modules/appium/node_modules/appium-support/build/lib/tempdir.js:12:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/lib/node_modules/appium/node_modules/appium-support/build/index.js:11:19)

i think you have to update your node version. which one are you using?

My node version is v0.10.25

My npm version is 1.3.10

see the discussion in https://github.com/appium/appium/issues/5814

Thanks, Problem solved.

Hi, I have been using appium 1.4.16 successfully with android and ios, on both simulators and real devices. And have just tried using the 1.5 beta 9 but I get all sorts of problems. I’m hoping i’ve just missed some setup steps needed to use the 1.5 version of appium. I’m installing via ‘npm install -g [email protected]

For IOS
I could not run on simulator (using same capabilities as used for 1.4.16). I have found this was due to having the capability fullReset: true. Seems it was deleting the simulator before the test and then not recreating it so the device was unable to be found for the test. Removing the capability resolved this problem(I also needed to recreate the simulator versions manually through the simulators manage devices option).

I could not run on a real device until I reinstalled ideviceinstaller through brew.
I am using xcode 7.1 and ios simulator 9.1

For Android
I cannot get it to find my app which is hosted on a local network (http://myaddress/android.apk).

[Selendroid] Error: Could not find app apk at 'http://myaddress/android.apk' at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13) at SelendroidDriver.checkAppPresent$ (lib/driver.js:226:14) at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) at run (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:104:47) at /usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/es6.promise.js:115:28 at flush (/usr/local/lib/node_modules/appium/node_modules/core-js/library/modules/$.microtask.js:19:5) at nextTickCallbackWith0Args (node.js:433:9) at process._tickCallback (node.js:362:13) [Error: Could not find app apk at 'http://myaddress/android.apk'] [debug] [Selendroid] Deleting Selendroid session

If I switch to a local copy for the app it then moves to a different error. Where it cannot find the android sdk’s build-tools folder. It is looking for ‘…android-sdk/build-tools’, however my sdk’s build folder is at ‘…android-sdk/24.4.1_1/build-tools’

[MJSONWP] Calling AppiumDriver.createSession() with args: [{“appPackage”:“nz.co.mcom.phone”,“appActivity”:“.activities.MobilitiActivity”,“platformName”:“Android”,“automationName”:“Selendroid”,"autoAcceptAl…
[Appium] Creating new SelendroidDriver session
[BaseDriver] The following capabilities were provided, but are not recognized by appium: autoAcceptAlerts, deviceType.
[BaseDriver] Session created with session id: 54336238-2655-4cdb-a335-88b914dc1533
[debug] [Selendroid] Checking whether app is actually present
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_45
[ADB] Checking whether adb is present
[debug] [Selendroid] Deleting Selendroid session
[MJSONWP] Encountered internal error running command: Error: ENOENT: no such file or directory, scandir ‘/usr/local/Cellar/android-sdk/build-tools’
at Error (native)

note: the same error occurs if I use automationName: Appium, instead of Selendroid.
EDIT: rolling back to 1.4.16 did not resolve sdk issues this time. Seems like my Android SDK is messed up. So just the network url for the app path that is an issue for Android it seems. And perhaps that is an issue with Selendroid 0.17 since it doesent happen with Appium as the AutomatinoName

Any thoughts on how to resolve these issues? need me to provide more logging?

@isaac Today had removed appium version 1.4.16 ( installed though npm ) and installed beta version as per your post.

I couple of doubts wrt it

  1. [email protected] but in github it shows https://github.com/appium/appium/releases 1.5.0-beta12 ,why is the difference ?

  2. npm list --global shows below messages

npm ERR! missing: appium-ios-simulator@^1.4.0, required by [email protected]
npm ERR! missing: appium-logger@^2.1.0, required by [email protected]
npm ERR! missing: appium-support@^2.0.9, required by [email protected]

How to fix these ?

Thanks,
Vikram

  1. Because as bugs are found and fixed there have been new releases, and whoever did the release was not necessarily good about tagging it as a release. But you want the most recent one (as of this moment, beta 16).

  2. I think this is probably due to some holdover from a previous install. You may need to remove the old appium installation (wherever Appium has been installed) and reinstall the beta. Sometimes npm misses things.

@isaac Thanks for quick updates

in case someone else faces this issue , need to follow below solutions

http://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x ( refer For brew users, OSX: )

I am using Windows 7 and i am not sure how to download and install Appium 1.5 beta.

i am not sure about npm etccc… but is there a way to download appium like .exe or the stack containing .exe?

@UD
Step from npm:

  1. Download node from node. prefer v0.12.10 (because it works for me)
  2. check if npm is available or not in command prompt by executing npm -v. If you don’t see the version you need to set the env. var.
  3. install it by executing npm -g install appium
  4. After the process complete, run appium -v to check appium version
  5. you can now run appium from command line with appium

step from source:

  1. follow previous step 1-2 if not already
  2. clone the appium repo from command line at any place you wish and navigate to appium folder i.e. cd appium
  3. Now run npm install on command prompt
  4. if everything goes well you can run appium server in the current directry with command prompt as node .
1 Like

Thanks Pr4bh4sh,

Initially i installed through, npm i got some error and was not succeeded.

But later i restarted my machine, and tried to install through npm, it worked.

One quick question here, when i launch through “appium” command in command prompt, it doesnt show any Appium UI. How to get this appium UI?

You can’t get UI unless you install the appium.exe. I don’t UI is needed as long unless you are doing iOS app automation or you are recording. You can’t do any of this on windows UI version of appium.

If you need to inspect elements just use Uiautomatorviewer, which the appium uses to show in the inspector pan. So why not use it directly.

If you have anything else in your mind for preferring the UI version, please share.

The reason why i am asking for UI is, for example at any instance if the script is halted, and i rerun the script again i am getting “org.openqa.selenium.SessionNotCreatedException: A new session could not be created.” Though i wait sometime and rerun the script getting the same exception.
If we would have UI, in appium server we click stop and start and also it is also to clearnthe logs in UI, but not the case in npm, so asking.

So basically, you want the UI version so you can stop the appium server when you need. There are two way to do this with CLI version:

  1. Kill the existing server from the CLI by pressing crtl+c. This is what the stop button does more or less(i.e. kill the process)
    OR
  2. Run CLI appium command as ‘appium --session-override’

You could add a system call to the beginning of your testing framework that kills any current running appium. Something like:

tskill appium

Might do the trick. More here:

Hi,
When i run “npm install -g appium” its thowring following error on the console. Can someone help me out?

npm ERR! Darwin 15.4.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “appium”
npm ERR! node v4.4.1
npm ERR! npm v2.14.20
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo

npm ERR! network getaddrinfo ENOTFOUND registry.npm.org registry.npm.org:443
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. See: ‘npm help config’

npm ERR! Please include the following file with any support request:
npm ERR! /Users/weyv/npm-debug.log