Appium 1.5.2 released

We are happy to release Appium version 1.5.2, which pulls in the changes, mostly bug fixes, that have been made in the past three weeks.

General

  • deprecated --command-timeout. Use newCommandTimeout desired capability instead
  • ensure implicit wait can be set through timeout method
  • add better logging for EPIPE errors

iOS

  • make sure ipa files are handled correctly for installing on real devices
  • ensure that existing SafariLauncher on device is used instead of rebuilding and reinstalling
  • fix issues with getting webview contexts on real devices
  • add full timeout support through timeout method
  • make sure Xpath searches respect implicit wait timeout
  • make sure bare Instruments process arguments are accepted

Android

  • fix failure when apk file is too large
  • re-implement setting geolocation so it does not use Telnet.
  • add support for Chromium browser
  • fix issues with flick
  • fix bug where touch action release would throw an error
  • fix bug in later Android SDK version where noticing a newly started avd would fail
  • implement autoWebviewTimeout

Release notes: https://github.com/appium/appium/releases/tag/v1.5.2

2 Likes

How could I update my appium version to 1.5.2 when I am using 1.5.1 on Mac OS? I tried to use command npm install -g appium and got error as below:

npm ERR! not a package /usr/local/bin/appium
npm ERR! addLocal Could not install /usr/local/bin/appium
npm ERR! Darwin 15.3.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “-g” “appium”
npm ERR! node v5.9.1
npm ERR! npm v3.7.3
npm ERR! path /var/folders/zw/csk71gts7n72pnqp468jz5y40000gn/T/npm-72687-d20d308a/unpack-218cd21a/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open ‘/var/folders/zw/csk71gts7n72pnqp468jz5y40000gn/T/npm-72687-d20d308a/unpack-218cd21a/package.json’
npm ERR! enoent ENOENT: no such file or directory, open ‘/var/folders/zw/csk71gts7n72pnqp468jz5y40000gn/T/npm-72687-d20d308a/unpack-218cd21a/package.json’
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/bin/npm-debug.log

How could I going on with this? Any suggestion is appreciated:)

@isaac

Maybe due to network problem, after I restart my Mac, I can use the same command to install 1.5.2 now. Forget this.

I updated to 1.5.2 release and I can no longer install / run apps on device simulator.
I had to revert to UI 1.4.13 and npm 1.4.16

I’m also encountering this issue and had to revert.

Here is the steps to fix the simulator crash for 1.5.2.

  1. Select Apple icon from Appium UI.
  2. Select “Advanced” tab.
  3. Click “Change” button on Xcode Path.
  4. Re-select the Xcode path

Confirm the change and restart the appium.

It fixes the App installation and crash for simulators.

It doesn’t seem like version 1.5.2 is honoring the new “newCommandTimeout” setting. I have it set as “7,200” in the General Settings menu in the Mac desktop app, but when I launch a new session, it times out after 60 seconds. Am I missing something?

My General Settings menu - showing the value of 7,200:

First few lines of the log after a new session is launched (which shows 7,200):

[Appium] Welcome to Appium v1.5.2

[Appium] Non-default server args:
[Appium] debugLogSpacing: true
[Appium] defaultCommandTimeout: 7200
[Appium] platformName: ‘Android’

After 60 seconds:

[BaseDriver] Shutting down because we waited 60 seconds for a command

[debug] [AndroidDriver] Shutting down Android driver

[Appium] Closing session, cause was ‘New Command Timeout of 60 seconds expired. Try customizing the timeout using the ‘newCommandTimeout’ desired capability’

Isn’t the “newCommandTimeout” what I’m setting in the General Settings menu?

2 Likes

Problem:

I am trying to automate mobile web application in iOS. For that I need to launch safari. But unable to launch safari it showing following errors:

/usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 5.43 seconds

Environment:
Using following to launch application via code:

String nodeJSPath = “/usr/local/bin/node”;
String appiumJSPath = “/usr/local/lib/node_modules/appium/build/lib/main.js”;

Appium version: 1.5.2
Desktop OS/version used to run Appium: OS X El Capitan
Node.js version : latest version
Mobile platform/version under test:iOS
Real device: iPod

I am having this same issue as well

I can’t start my app in real device after upgrading appium 1.5.2 from 1.4.13. It works normally with 1.4.13. I don’t change setting. Is there any difference with previous builds? Could you give a screenshot of setting? Thanks. I attached appium log here.
Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ build/lib/main.js --address “127.0.0.1” --port “4725” --command-timeout “7200” --pre-launch --debug-log-spacing --strict-caps --platform-version “8.1” --platform-name “iOS” --app “/Users/Admin/Documents/workspace/Test/apps/sample.app” --udid “xxx” --show-ios-log --default-device

[Appium] Welcome to Appium v1.5.2

[Appium] Non-default server args:

[Appium] address: ‘127.0.0.1’

[Appium] port: 4725
[Appium] launch: true
[Appium] defaultDevice: true
[Appium] enforceStrictCaps: true
[Appium] debugLogSpacing: true
[Appium] defaultCommandTimeout: 7200
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘8.1’
[Appium] app: ‘/Users/Admin/Documents/workspace/Test/apps/sample.app’

[Appium] udid: ‘xxx’
[Appium] showIOSLog: true
[Appium] Deprecated server args:
[Appium] --platform-name => --default-capabilities ‘{“platformName”:“iOS”}’
[Appium] --platform-version => --default-capabilities ‘{“platformVersion”:“8.1”}’

[Appium] --app => --default-capabilities ‘{“app”:"/Users/Admin/Documents/workspace/Test/apps/sample.app"}’
[Appium] -U,–udid => --default-capabilities ‘{“udid”:“xxxx”}’
[Appium] --show-ios-log => --default-capabilities ‘{“showIOSLog”:true}’
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:

[Appium] platformName: ‘iOS’

[Appium] platformVersion: ‘8.1’
[Appium] app: ‘/Users/Admin/Documents/workspace/Test/apps/sample.app’
[Appium] udid: ‘xxx’
[Appium] showIOSLog: true

[Appium] Appium REST http interface listener started on 127.0.0.1:4725

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.2”,“revision”:null}}

[HTTP] <-- GET /wd/hub/status 200 24 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.2”,“revision”:null}}

[HTTP] <-- GET /wd/hub/status 200 14 ms - 83

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.5.2”,“revision”:null}}

[HTTP] <-- GET /wd/hub/status 200 93 ms - 83

I found a solution to the new timeout problem using the GUI.

Opening the Developer Settings and add the following line to the Custom Server Flags:

–default-capabilities “{“newCommandTimeout”: “0”}”

2 Likes

Thanks @haskida this worked for me too! I had played around with using JSON for several of the default capabilities including newCommandTimeout but for some reason it didn’t work. With just this one specified it seems to be working as expected.

I am facing issue exact at the same line.
Also I copied the SafariLauncher.app which I installed on device too at location /usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/
Now in the logs I see …

debug] [Instruments] Attempting to run app on real device with UDID ‘47b42fd2d0304ce7e143e8458cb988087d571c6e’
[debug] [Instruments] Found Insruments-Without-Delay: /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-instruments/thirdparty/iwd7
[debug] [Instruments] Spawning instruments with command: ‘/Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /var/folders/qg/0b9gnqx96bj19_nztx69s9t80000gn/T/appium-instruments/instrumentscli0.trace -w 47b42fd2d0304ce7e143e8458cb988087d571c6e com.bytearc.SafariLauncher -e UIASCRIPT “/Users/zymr/Library/Application Support/appium/bootstrap/bootstrap-e1fa8bfd2faabbaf.js” -e UIARESULTSPATH /var/folders/qg/0b9gnqx96bj19_nztx69s9t80000gn/T/appium-instruments’
[debug] [Instruments] And extra without-delay env: {}
[debug] [Instruments] And launch timeouts (in ms): {“global”:300000}
[debug] [Instruments] [INST STDERR] 2016-05-10 10:55:24.538 instruments[29061:1983875] WebKit Threading Violation - initial use of WebKit from a secondary thread.

[debug] [Instruments] [INST STDERR] Instruments Usage Error: Specified target process is invalid: com.bytearc.SafariLauncher
instruments, version 7.3 (60133)

[debug] [Instruments] [INST STDERR] usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument …]]]

[Instruments] Error launching instruments: Instruments crashed on startup

[debug] [Instruments] Instruments exited with code 255
[iOSLog] [IOS_SYSLOG_ROW] May 10 10:55:25 Pavan-iphone gputoolsd[214] : schedule invalidation <DYTransport 0x17569250, error: lost transport connection (31)>

So if I replace the bundle id which i highlighted and replace it with one which i used to install on real device and run this complete command on cli manually then it launches SafariLauncher for me.
Now I am not sure from where is this å Id value getting fetched while running.
I tried to replace expected bundle id of safarilauncher (com.launchSafariPO) in my case in every file which has string com.bytearc.SafariLauncher but it didnt help.

Note : There was no issue when working with simulator , where I could launch Safari browser and also could redirect to expected url with .get()

hi @pavan_appium, could you find a solution for this problem? I have exacty the same issue and dont know what to do :frowning:

No Am still struggling on this, I might revert back to 1.4.13 version and check if issue is new with latest version of Appium

Thanks for posting this, @haskida !
Had the same issue, your solution fixes the problem.

Did you find a solution to this problem? I am facing the same problem and unable to get out of it.

Thank you @haskida. This issue was really frustrating. Your workaround worked for me too.

info: ← POST /wd/hub/session/326aa211-8cf8-4400-8488-e1f03a68c2d4/element 500 5327.106 ms - 195
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“No element found”,“status”:7}
info: → DELETE /wd/hub/session/326aa211-8cf8-4400-8488-e1f03a68c2d4 {}
info: Shutting down appium session
info: [debug] Pressing the HOME button
info: [debug] executing cmd: “C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe” -s emulator-5558 shell “input keyevent 3”
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“OK, shutting down”,“status”:0}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 23.393
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Responding to client with success: {“status”:0,“value”:null,“sessionId”:“326aa211-8cf8-4400-8488-e1f03a68c2d4”}
info: ← DELETE /wd/hub/session/326aa211-8cf8-4400-8488-e1f03a68c2d4 200 5372.411 ms - 76 {“status”:0,“value”:null,“sessionId”:“326aa211-8cf8-4400-8488-e1f03a68c2d4”}