Nothing happens after app installation

I am trying to run the test but nothing happens after app installation. App flash screen appear 2-3 times and test cases are stuck.

Here are the logs

➜  ~ appium --relaxed-security     
[Appium] Welcome to Appium v1.8.0 (REV 7ad6d98cedde01809e32d56ab8ced064f6f28175)
[Appium] Non-default server args:
[Appium]   relaxedSecurityEnabled: true
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"iOS"}},"desiredCapabilities":{"app":"/Users/Test/Desktop/app/Test.app","platformName":"iOS","platformVersion":"11.3","deviceName":"iPhone 7","automationName":"XCUITest","showXcodeLog":true,"shutdownOtherSimulators":true}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/Test/Desktop/app/Test.app","platformName":"iOS","platformVersion":"11.3","deviceName":"iPhone 7","automationName":"XCUITest","showXcodeLog":true,"shutdownOtherSimulators":true},null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"iOS"}}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1524739766994 (15:49:26 GMT+0500 (PKT))
[Appium] Could not parse W3C capabilities: 'deviceName' can't be blank. Falling back to JSONWP protocol.
[Appium] The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: ["app","platformName","platformVersion","deviceName","automationName","showXcodeLog","shutdownOtherSimulators"]. Falling back to JSONWP protocol.
[Appium] Creating new XCUITestDriver (v2.76.2) session
[Appium] Capabilities:
[Appium]   app: /Users/Test/Desktop/app/Test.app
[Appium]   platformName: iOS
[Appium]   platformVersion: 11.3
[Appium]   deviceName: iPhone 7
[Appium]   automationName: XCUITest
[Appium]   showXcodeLog: true
[Appium]   shutdownOtherSimulators: true
[Appium] Applying relaxed security to XCUITestDriver as per server command line argument
[debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {"app":"/Users/Test...
[BaseDriver] Session created with session id: 9c3bb508-c7ee-42e5-b38e-adba376a83f3
[debug] [XCUITest] Current user: 'Test'
[debug] [XCUITest] Xcode version set to '9.3' (tools v9.3.0.0.1.1521514116)
[debug] [XCUITest] iOS SDK Version set to '11.3'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1524739767274 (15:49:27 GMT+0500 (PKT))
[iOSSim] Constructing iOS simulator for Xcode version 9.3 with udid 'FA26ABC7-E5EE-4B81-9015-DD01E558E536'
[XCUITest] Determining device to run tests on: udid: 'FA26ABC7-E5EE-4B81-9015-DD01E558E536', real device: false
[BaseDriver] Using local app '/Users/Test/Desktop/app/Test.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1524739767533 (15:49:27 GMT+0500 (PKT))
[debug] [XCUITest] Checking whether app '/Users/Test/Desktop/app/Test.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/Test/Desktop/app/Test.app': 'org.provider.Test'
[debug] [BaseDriver] Event 'resetStarted' logged at 1524739767546 (15:49:27 GMT+0500 (PKT))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event 'resetComplete' logged at 1524739767753 (15:49:27 GMT+0500 (PKT))
[debug] [XCUITest] Starting log capture for iOS Simulator with udid 'FA26ABC7-E5EE-4B81-9015-DD01E558E536', using 'xcrun simctl spawn FA26ABC7-E5EE-4B81-9015-DD01E558E536 log stream --style compact'
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1524739768106 (15:49:28 GMT+0500 (PKT))
[XCUITest] Setting up simulator
[XCUITest] Detected 1 other running Simulator.Shutting it down...
[debug] [XCUITest] Killing running processes 'xcodebuild.*B5F7824B-83B6-4260-832D-B0D35DDC5FF8, B5F7824B-83B6-4260-832D-B0D35DDC5FF8.*XCTRunner' for the device B5F7824B-83B6-4260-832D-B0D35DDC5FF8...
[debug] [XCUITest] 'pgrep -nif xcodebuild.*B5F7824B-83B6-4260-832D-B0D35DDC5FF8' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] 'pgrep -nif B5F7824B-83B6-4260-832D-B0D35DDC5FF8.*XCTRunner' didn't detect any matching processes. Return code: 1
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set
[debug] [iOSSim] Matched 1 Simulator cache item for cleanup: /Users/Test/Library/Developer/CoreSimulator/Devices/FA26ABC7-E5EE-4B81-9015-DD01E558E536/data/Library/Caches/com.apple.mobile.installd.staging
[debug] [iOSSim] Setting common Simulator preferences to {"ConnectHardwareKeyboard":false}
[debug] [iOSSim] Updated FA26ABC7-E5EE-4B81-9015-DD01E558E536 Simulator preferences at '/Users/Test/Library/Preferences/com.apple.iphonesimulator.plist' with {"ConnectHardwareKeyboard":false}
[debug] [iOSSim] The count of running Simulator UI client instances is 1
[iOSSim] Both Simulator with UDID FA26ABC7-E5EE-4B81-9015-DD01E558E536 and the UI client are currently running
[debug] [BaseDriver] Event 'simStarted' logged at 1524739779949 (15:49:39 GMT+0500 (PKT))
[debug] [XCUITest] Reset requested. Removing app with id 'org.provider.Test' from the device
[debug] [XCUITest] Installing '/Users/Test/Desktop/app/Test.app' on Simulator with UUID 'FA26ABC7-E5EE-4B81-9015-DD01E558E536'...
[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1524739788881 (15:49:48 GMT+0500 (PKT))
[XCUITest] Using WDA path: '/Users/Test/.nvm/versions/node/v9.3.0/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Users/Test/.nvm/versions/node/v9.3.0/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n  \"value\" : {\n    \"state\" : \"success\",\n    \"os\" : {\n      \"name\" : \"iOS\",\n      \"version\" : \"11.3\",\n      \"sdkVersion\" : \"11.3\"\n    },\n    \"ios\" : {\n      \"simulatorVersion\" : \"11.3\",\n      \"ip\" : \"192.168.1.159\"\n    },\n    \"build\" : {\n      \"time\" : \"Apr 25 2018 23:27:26\"\n    }\n  },\n  \"sessionId\" : \"FEBC4148-54EB-4F7D-85E0-8ACDE1CBF617\",\n  \"status\" : 0\n}"
[XCUITest] Will reuse previously cached WDA instance at 'http://localhost:8100/'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1524739789002 (15:49:49 GMT+0500 (PKT))
[XCUITest] Using provided WebdriverAgent at 'http://localhost:8100/'
[debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1524739789003 (15:49:49 GMT+0500 (PKT))
[debug] [XCUITest] Sending createSession command to WDA
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [JSONWP Proxy] Got response with status 200: "{\n  \"value\" : {\n    \"state\" : \"success\",\n    \"os\" : {\n      \"name\" : \"iOS\",\n      \"version\" : \"11.3\",\n      \"sdkVersion\" : \"11.3\"\n    },\n    \"ios\" : {\n      \"simulatorVersion\" : \"11.3\",\n      \"ip\" : \"192.168.1.159\"\n    },\n    \"build\" : {\n      \"time\" : \"Apr 25 2018 23:27:26\"\n    }\n  },\n  \"sessionId\" : \"FEBC4148-54EB-4F7D-85E0-8ACDE1CBF617\",\n  \"status\" : 0\n}"
[debug] [JSONWP Proxy] Proxying [POST /session] to [POST http://localhost:8100/session] with body: {"desiredCapabilities":{"bundleId":"org.provider.Test","arguments":[],"environment":{},"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}}

It was working fine earlier but all of a sudden it stopped working :frowning:

Pls check, is two simulator running in back ground.
First cloas all the simulator and try again

Only one simulator is running. so that’s not an issue

This usually means you are using an app built for devices and not for simulators. Here is some more info on building such a thing:

1 Like

@wreed - You are right. Thanks for sharing the link. To be exact, following link Helped me figure out the issue.

1 Like

Remove installed webdriveragentrunner app from simulator manually.
And then try again.