Getting error and not able to work with real device

I am using appium latest version to automate iOS app. but seems getting issue with it. Error log is given below :

info: [debug] Creating new appium session 30bdff5c-fd6a-478c-9108-38dc5a07311d
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Auto-detecting iOS udid…
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Could not parse plist file (as binary) at /var/folders/fq/3rswhv691rq18vc8ffkn3h9c0000gp/T/115823-2730-qo5gpp/Payload/Read Cursive.app/en.lproj/Localizable.strings
info: Will try to parse the plist file as XML
info: [debug] Could not parse plist file (as XML) at /var/folders/fq/3rswhv691rq18vc8ffkn3h9c0000gp/T/115823-2730-qo5gpp/Payload/Read Cursive.app/en.lproj/Localizable.strings
warn: Could not parse app Localizable.strings assuming it doesn’t exist
info: [debug] Getting bundle ID from app
info: [debug] Parsed app Info.plist (as binary)

info: [debug] Creating instruments
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/hardevsinh/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:“/Applications/Appium.app/Contents/Resources/node/bin/node”,“commandProxyClientPath”:“/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js”,“instrumentsSock”:“/tmp/instruments_sock”,“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false,“autoDismissAlerts”:false,“sendKeyStrategy”:“grouped”}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. Do not manually modify!

info: [debug] Dynamic bootstrap path: /Users/hardevsinh/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js

info: [debug] Reusing dynamic bootstrap: /Users/hardevsinh/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js
info: [debug] Attempting iOS device log capture via libimobiledevice idevicesyslog

info: [debug] Creating iDevice object with udid Xxxxxxxxxxxxxxxxxxxxxxxx

info: [debug] App is not installed. Will try to install the app.

info: [debug] Installing ipa found at /Users/hardevsinh/Desktop/jannya new ipa/Read Cursive_Production.ipa

info: [debug] Nothing found on device, going ahead and installing.

info: → GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.8”,“revision”:“c8179bd8352d3c62d98fa58b324491230df9342a”},“isShuttingDown”:false},“sessionId”:“30bdff5c-fd6a-478c-9108-38dc5a07311d”}

info: ← GET /wd/hub/status 200 7.487 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.4.8”,“revision”:“c8179bd8352d3c62d98fa58b324491230df9342a”},“isShuttingDown”:false},“sessionId”:“30bdff5c-fd6a-478c-9108-38dc5a07311d”}

info: → GET /wd/hub/status {}

info: [debug] Responding to client with success: {“status”:0,“value”:{“build”:{“version”:“1.4.8”,“revision”:“c8179bd8352d3c62d98fa58b324491230df9342a”},“isShuttingDown”:false},“sessionId”:“30bdff5c-fd6a-478c-9108-38dc5a07311d”}

info: ← GET /wd/hub/status 200 2.333 ms - 178 {“status”:0,“value”:{“build”:{“version”:“1.4.8”,“revision”:“c8179bd8352d3c62d98fa58b324491230df9342a”},“isShuttingDown”:false},“sessionId”:“30bdff5c-fd6a-478c-9108-38dc5a07311d”}

info: [debug] Starting command proxy.

info: [debug] Instruments socket server started at /tmp/instruments_sock

info: [debug] Starting instruments

info: [debug] Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on real device with UDID 4991f34c05570279dd65f5bcbc71d3679b17b469

info: [debug] 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 /tmp/appium-instruments/instrumentscli0.trace -w 4991f34c05570279dd65f5bcbc71d3679b17b469 com.webteamcorp.com.ReadCursiveinapp -e UIASCRIPT “/Users/hardevsinh/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:90000}

info: [debug] [INST STDERR] Instruments Usage Error : Specified target process is invalid: com.webteamcorp.com.ReadCursiveinapp
instruments, version 6.3 (57536)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument …]]]

info: [debug] [INSTSERVER] Instruments exited with code 255

info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #1
info: [debug] Killall iOS Simulator

info: Launching instruments

info: [debug] Attempting to run app on real device with UDID 4991f34c05570279dd65f5bcbc71d3679b17b469

info: [debug] 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 /tmp/appium-instruments/instrumentscli0.trace -w 4991f34c05570279dd65f5bcbc71d3679b17b469 com.webteamcorp.com.ReadCursiveinapp -e UIASCRIPT “/Users/hardevsinh/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:90000}

info: [debug] [INST STDERR] 2015-09-23 13:18:50.387 instruments[2749:62557] WebKit Threading Violation - initial use of WebKit from a secondary thread.

info: [debug] [INST STDERR] Instruments Usage Error : Specified target process is invalid: com.webteamcorp.com.ReadCursiveinapp
instruments, version 6.3 (57536)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument …]]]

info: [debug] [INSTSERVER] Instruments exited with code 255

info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #2
info: [debug] Killall iOS Simulator

info: Launching instruments

info: [debug] Attempting to run app on real device with UDID 4991f34c05570279dd65f5bcbc71d3679b17b469

info: [debug] 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 /tmp/appium-instruments/instrumentscli0.trace -w 4991f34c05570279dd65f5bcbc71d3679b17b469 com.webteamcorp.com.ReadCursiveinapp -e UIASCRIPT “/Users/hardevsinh/Library/Application Support/appium/bootstrap/bootstrap-6745615c424bb0c0.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {}
info: [debug] And launch timeouts (in ms): {“global”:90000}

info: [debug] [INST STDERR] 2015-09-23 13:18:56.114 instruments[2752:62578] WebKit Threading Violation - initial use of WebKit from a secondary thread.

info: [debug] [INST STDERR] Instruments Usage Error : Specified target process is invalid: com.webteamcorp.com.ReadCursiveinapp

info: [debug] [INST STDERR] instruments, version 6.3 (57536)
usage: instruments [-t template] [-D document] [-l timeLimit] [-i #] [-w device] [[-p pid] | [application [-e variable value] [argument …]]]

info: [debug] [INSTSERVER] Instruments exited with code 255
info: [debug] Killall instruments
info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #3
info: [debug] Killall iOS Simulator


I have connected Iphone 6+.[Actual Device , not simulator]


My code is :

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“device”,“iPhone 6+”);
capabilities.setCapability(“udid”,“XXXXXXXXXXXXXXXXXXXXXX”);
capabilities.setCapability(“deviceName”,“iPhone 6+”);
capabilities.setCapability(“platformVersion”,“8.4.1”);
capabilities.setCapability(“bundleid”,“com.ctss.com.Readapp”);
capabilities.setCapability(“app”,“/Users/jill/Readapp.ipa”);
driver = new IOSDriver(new URL(“http://127.0.0.1:4723/wd/hub/”), capabilities);

Please Help , I have been trying since last 2 days but no luck. I have tried with many devices.

Hi,

Why do you use “app” 2 times?

Did you compilate your application in the same device you use for test with Developper account?

Best regards,

1 Like

@Alex1 ,

Yes Sorry , I have just updated code. Actually log might be repeated there because I have run 2-3 times so. And yes I have tried with normal IPA file and Development account also. I mean my developer just provided me Developer signed IPA.

Not sure what is actual issue :frowning:

Make sure that u compilate your code on the same machine where you run your test!

@Alex1

Actually what we have here :

1 - Developer creates IPA and provide to Tester
2 - Tester take that IPA , Install to real device and trying to automate using appium.
3 - Machine for developer and tester are different.

So how we can solve issue? Do we need to install appium on same machine where developer is working?? can you please tell me what exactly you mean by “compilate”??

Please try this step: On iOS Device go to Settings>Developer>and Enable UI Automation.

And try to use the developper machine for test.

Best regards,

Okay , I will do same and let you know… thank you so much for quick support.

You are getting this error:

But you state this is what you are using for capabilities:

Are you sure you have the correct bundle id? This may help if you aren’t sure:
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html

Yes I have set correct bundle id but still facing error:(

You are still getting this error?

Logs also show instruments crash. Try the following on terminal:
ps -afx | grep appium
Above would show all process running. (Appium, node, instruments, webkit-debug-proxy etc.) For each of process, do
kill -9

Now rerun appium with correct ipa file and test bundleid.
Hope this helps.

1 Like

Hi , If your developer does not provide the source code with .app file, then you have to re-sign .ipa file with your profile. Check this link:

1 Like