Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to launch application on iPhone through appium v-1.5.3 #6569

Closed
Ankit9568 opened this issue Jun 9, 2016 · 10 comments
Closed

Unable to launch application on iPhone through appium v-1.5.3 #6569

Ankit9568 opened this issue Jun 9, 2016 · 10 comments

Comments

@Ankit9568
Copy link

Hi Members,

I am unable to launch any application through latest appium v-1.5.3. I am wonder when I launched appium doctor shows below error:
info AppiumDoctor ✔ The Authorization DB is set up properly.
[TypeError: Cannot read property 'replace' of undefined]
For more details please find attached screenshot.
appiumdoctor

Environment

  • Appium version 1.5.3:
  • Last Appium version that did not exhibit the issue (if applicable):1.4.13
  • Desktop OS/version used to run Appium:OS X EI capiton v-10.11
  • Node.js version (unless using Appium.app|exe):
  • Mobile platform/version under test: iPhone 5 9.3.1
  • Real device or emulator/simulator: Real device
  • Appium CLI or Appium.app|exe: Appium CLI

Describe in more detail the problem you have been experiencing, if necessary.

Link to Appium logs

AppiumLog.txt

Any help will be appreciated.

@triager triager added the Needs Triage bugs which are not yet confirmed label Jun 9, 2016
@mykola-mokhnach
Copy link
Collaborator

Appium Doctor is not implemented yet for Appium 1.5+
In the attached log file I see you pass most of the parameters as command line parameters. This has been deprecated a while ago and Appium expects them to be passed as capabilities. Read http://appium.io/slate/en/master/?ruby#server-flags for more details

@imurchie
Copy link
Contributor

imurchie commented Jun 9, 2016

It is implemented, it is just not bundled with the server. Install it with npm install -g appium-doctor and then run appium-doctor.

@Ankit9568
Copy link
Author

@mykola-mokhnach

Is it possible to launch an application through appium server in prelaunch mode . I am trying but appium -server is not given any response , see above attached AppiumLog file.
Can you please suggest me a way to launch appium -server-v1.5.3 start in prelaunch mode.

@imurchie
I have downloaded appium doctor through npm and launch appium doctor successfully . but still i am not able to launch ipa file through appium server in prelaunch mode .

For reference see above attached AppiumLog file.

Any help will be appreciated.

@imurchie
Copy link
Contributor

You will need to start a session for the app to get launched.

@Ankit9568
Copy link
Author

Hi,
Sorry for late reply,

Still I am not able to launch application on android device through Appium (GUI) as well as through java-client [using services].

Problem 1:

"service = AppiumDriverLocalService.buildService(new AppiumServiceBuilder()
.usingDriverExecutable(new File("/Applications/Appium.app/Contents/Resources/node/bin/node"))
.withAppiumJS(new File("/Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js"))
.withIPAddress(Constants.APPIUM_SERVER_HOST)
.usingAnyFreePort()
.withArgument(GeneralServerFlag.LOG_NO_COLORS)
.withArgument(GeneralServerFlag.LOCAL_TIMEZONE)
.withStartUpTimeOut(60, TimeUnit.SECONDS)
.withEnvironment(env)
.withLogFile(new File(Constants.basePath + "/Logs/Appium.log")));

            service.start();"

Shows the below exception:
Invalid server instance exception has occured: The invalid appium node /Applications/Appium.app/Contents/Resources/node_modules/appium/bin/appium.js has been defined

I was wondered , When investigate these error . Appium.js file is not defined in above path but in appium 1.4.13 appium file is exist on path.

Problem2:
Also I am not able to launch application on android as as iOS using appium [GUI] in prelaunch mode.

If you changes appium.js file location and way to change launch application using appium[GUI] in prelaunch mode please let me know.

For Reference please refer attached Appium Log file When I launch application through appium [GUI] in prelaunch mode .

AppiumLog.txt

Any help will be greatly appreciated

@shabana-parveen
Copy link

Hey, I am also facing the same issue, I just upgrade my Appium ver from 1.5.1 to 1.5.3, Now I m unable to launch my app as it crashes when try to launch, it always showing me a error message instrument exit 253 error

Please refer below log:

Appium] Welcome to Appium v1.5.3 (REV f653cb8340de3c9acd1ddfb75c1a8c8f3195834a)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/f2849/Desktop/iOS_ipa/Shine27June.ipa","platformName":"iOS","sendKeyStrategy":"setValue","deviceName":"iPhone 5","platformVersion":"9.3"}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/f2849/Deskt...
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] app: '/Users/f2849/Desktop/iOS_ipa/Shine27June.ipa'
[Appium] platformName: 'iOS'
[Appium] sendKeyStrategy: 'setValue'
[Appium] deviceName: 'iPhone 5'
[Appium] platformVersion: '9.3'
[BaseDriver] Session created with session id: bc59b1eb-00f5-4471-8302-dde102265e74
[debug] [iOS] Not auto-detecting udid.
[BaseDriver] Using local app '/Users/f2849/Desktop/iOS_ipa/Shine27June.ipa'
[debug] [BaseDriver] Copying local zip to tmp dir
[debug] [BaseDriver] Unzipping /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/2016621-4797-1ab46xo.f2r8k9be29/appium-app.zip
[debug] [BaseDriver] Testing zip archive: /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/2016621-4797-1ab46xo.f2r8k9be29/appium-app.zip
[BaseDriver] Unzipped local app to '/var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/2016621-4797-1ab46xo.f2r8k9be29/Payload/Shine.app'
[debug] [iOS] Removing any remaining instruments sockets
[debug] [iOS] Cleaned up instruments socket /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/instruments_sock
[debug] [iOS] Setting Xcode version
[debug] [iOS] Xcode version set to 7.3
[debug] [iOS] Setting iOS SDK Version
[debug] [iOS] iOS SDK Version set to 9.3
[debug] [iOS] Checking whether instruments supports our device string
[debug] [Instruments] Getting list of devices instruments supports
[debug] [Instruments] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
[debug] [Instruments] Available devices: Apple TV 1080p (9.2) 393420D6-C6E5-4987-B6E4-AE314D974252,iPad 2 (9.3) 30A9E2F7-8D78-4EA0-ADA1-507C5291CBA6,iPad Air (9.3) 49E15C42-9090-4D1D-A23F-FB64C308943F,iPad Air 2 (9.3) E41283B2-64F3-4E66-A0CC-8C1F294A26FC,iPad Pro (9.3) 2AE81A71-84F8-4D58-A051-423D72BBE17C,iPad Retina (9.3) B4400DA1-D701-4F17-B443-239AE4539E48,iPhone 4s (9.3) 3D432B7E-3C85-4CFB-B9A0-70F8CCC844CF,iPhone 5 (9.3) 7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4,iPhone 5s (9.3) DD524A67-FAA2-4BF7-A964-1ED592B93C64,iPhone 6 (9.3) 9DCBB689-4222-4291-B29E-365103DACCBD,iPhone 6 Plus (9.3) 8533EEB6-5555-42B9-BB5D-AE3718DF457E,iPhone 6s (9.3) 4BCE48AA-79D8-430B-A405-39A6FA2181B0,iPhone 6s (9.3) + Apple Watch - 38mm (2.2) D447A288-627F-4F54-A56E-64888CF02C13,iPhone 6s Plus (9.3) E983943E-7212-44D8-A475-3F4844D61AA3,iPhone 6s Plus (9.3) + Apple Watch - 42mm (2.2) 4A8524EB-24B3-4182-A2BE-CCF95762E736
[iOSSim] Retrieving device name string for Xcode version 7.3
[debug] [iOSSim] Getting device string from options: {"deviceName":"iPhone 5","platformVersion":"9.3","forceIphone":false,"forceIpad":false}
[debug] [iOSSim] Final device string is 'iPhone 5 (9.3)'
[debug] [iOS] iOS sim UDID is 7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4
[iOSSim] Constructing iOS simulator for Xcode version 7.3
[debug] [iOS] No language specified. Using default strings
[debug] [iOS] Strings file not found. Looking in 'en.lproj' directory
[iOS] Could not file localizable strings file 'Localizable.strings'!
[debug] [ios-app-utils] Getting bundle ID from app
[iOS] Extracted bundleID: com.htmedia.shine from app: /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/2016621-4797-1ab46xo.f2r8k9be29/Payload/Shine.app
[debug] [iOS] Creating instruments
[debug] [UIAuto] Preparing bootstrap code
[debug] [UIAuto] Dynamic bootstrap dir: /Users/f2849/Library/Application Support/appium/bootstrap
[debug] [UIAuto] Dynamic env: {"nodePath":"/usr/local/bin/node","commandProxyClientPath":"/usr/local/lib/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js","instrumentsSock":"/var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/instruments_sock","interKeyDelay":null,"justLoopInfinitely":false,"autoAcceptAlerts":false,"autoDismissAlerts":false,"sendKeyStrategy":"setValue"}
[debug] [UIAuto] Dynamic bootstrap code: // This file is automatically generated...o not manually modify!
[debug] [UIAuto] Dynamic bootstrap path: /Users/f2849/Library/Application Support/appium/bootstrap/bootstrap-d40d3b1169b15601.js
[debug] [UIAuto] Reusing dynamic bootstrap: /Users/f2849/Library/Application Support/appium/bootstrap/bootstrap-d40d3b1169b15601.js
[debug] [iOS] User specified default device, letting instruments launch it
[debug] [iOS] Running ios sim reset flow
[debug] [iOS] Killing the simulator
[debug] [iOSSim] Killing all iOS Simulators
[debug] [iOS] Cleaning sim state.
[debug] [iOSSim] Cleaning app data files for 'Shine.app', 'com.htmedia.shine'
[debug] [iOSSim] Building bundle path map
[debug] [iOSSim] Building bundle path map
[debug] [Support] Plist file '/Users/f2849/Library/Developer/CoreSimulator/Devices/7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4/data/Containers/Bundle/Application/FIREBASE_LAST_TIMESTAMP/.com.apple.mobile_container_manager.metadata.plist' does not exist. Returning an empty plist.
[debug] [Support] Plist file '/Users/f2849/Library/Developer/CoreSimulator/Devices/7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4/data/Containers/Bundle/Application/FIREBASE_UNIQUE_INSTALL/.com.apple.mobile_container_manager.metadata.plist' does not exist. Returning an empty plist.
[debug] [iOSSim] Deleting directory: '/Users/f2849/Library/Developer/CoreSimulator/Devices/7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4/data/Containers/Data/Application/949E8D8B-BEF7-48B0-A0BC-68369FCEA5B6'
[debug] [iOSSim] Deleting directory: '/Users/f2849/Library/Developer/CoreSimulator/Devices/7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4/data/Containers/Bundle/Application/FF45425D-3C77-4C36-8050-88158D20CCC2'
[debug] [iOSSim] Deleting file: '/Users/f2849/Library/Developer/CoreSimulator/Devices/Library/Preferences/com.XX.XXX.plist'
[debug] [iOSSim] Killing any simulator daemons for 7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4
[iOSSim] Cleaning simulator 7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4
[debug] [iOS] Not setting locale
[debug] [iOS] No iOS / app preferences to set
[debug] [iOSLog] Starting iOS 9.3 simulator log capture
[debug] [iOSLog] System log path: /Users/f2849/Library/Logs/CoreSimulator/7AEE21D8-3AAA-4EDD-86D9-CD5DD7466BF4/system.log
[debug] [iOS] Not pre-launching simulator
[debug] [iOS] Starting UIAutoClient, and launching Instruments.
[debug] [UIAuto] Instruments socket server started at /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/instruments_sock
[debug] [Instruments] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
[debug] [Instruments] Attempting to launch instruments, this is try #1
[Instruments] Launching instruments
[debug] [Instruments] Attempting to run app on iPhone 5 (9.3)
[Instruments] On xcode 7.0+, instruments-without-delay does not work, skipping instruments-without-delay
[debug] [Instruments] Found Insruments-Without-Delay: /usr/local/lib/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/st/41dk4fnd10518617jytfvjhh0000gq/T/appium-instruments/instrumentscli0.trace -w "iPhone 5 (9.3)" /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/2016621-4797-1ab46xo.f2r8k9be29/Payload/Shine.app -e UIASCRIPT "/Users/f2849/Library/Application Support/appium/bootstrap/bootstrap-d40d3b1169b15601.js" -e UIARESULTSPATH /var/folders/st/41dk4fnd10518617jytfvjhh0000gq/T/appium-instruments'
[debug] [Instruments] And launch timeouts (in ms): {"global":90000}
[debug] [Instruments] [INST] Waiting for device to boot...
[Instruments] Instruments socket client never checked in; timing out (global)
[debug] [Instruments] Killing all instruments
[debug] [Instruments] [INST STDERR] Instruments Trace Error : Target failed to run: The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 1.) : Failed to launch process with bundle identifier 'com.htmedia.shine'
[debug] [Instruments] Instruments exited with code 253
[Instruments] Error launching instruments: Instruments never checked in
[debug] [iOSSim] Killing all iOS Simulators
[HTTP] <-- POST /wd/hub/session - - ms - -

@mykola-mokhnach
Copy link
Collaborator

Probably, 90 seconds timeout is not enough to start both the simulator and the app. Try to increase it to 180 seconds (launchTimeout capability)

@shabana-parveen
Copy link

will try and let you know..

@SrinivasanTarget
Copy link
Member

@triager please close

@triager triager closed this as completed Oct 23, 2016
@imurchie imurchie removed the Needs Triage bugs which are not yet confirmed label Apr 13, 2017
@lock
Copy link

lock bot commented Apr 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants