Skip to content

Instantly share code, notes, and snippets.

@mrvincenzo
Created November 18, 2021 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrvincenzo/f5312ca1284438c388cd147897fc0a47 to your computer and use it in GitHub Desktop.
Save mrvincenzo/f5312ca1284438c388cd147897fc0a47 to your computer and use it in GitHub Desktop.
[Appium] Welcome to Appium v1.17.0
[Appium] Non-default server args:
[Appium] port: 53633
[Appium] sessionOverride: true
[Appium] logNoColors: true
[Appium] chromedriverExecutable: /Users/myuser/Library/Application Support/TestProject/Agent/deps/drivers/Chrome/workdir/chromedriver
[Appium] allowInsecure: {
[Appium] 0: adb_shell
[Appium] }
[Appium] Appium REST http interface listener started on 0.0.0.0:53633
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.0"}}
[HTTP] <-- GET /wd/hub/status 200 6 ms - 68
[HTTP]
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.0"}}
[HTTP] <-- GET /wd/hub/status 200 1 ms - 68
[HTTP]
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[debug] [GENERIC] Calling AppiumDriver.getStatus() with args: []
[debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.17.0"}}
[HTTP] <-- GET /wd/hub/status 200 1 ms - 68
[HTTP]
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"appPackage":"com.myAppTest","skipServerLaunch":true,"noReset":true,"noSign":true,"skipWaitAppStart":true,"adbPort":"5037","fullReset":false,"appActivity":"com.myApp.ui.SplashScreenActivity","appWaitForLaunch":false,"newCommandTimeout":0,"platformVersion":"29","automationName":"UIAutomator2","browserName":"","skipDeviceInitialization":true,"skipUnlock":true,"appium:chromeOptions":{"w3c":true},"skipServerInstallation":true,"platformName":"ANDROID","udid":"emulator-5554","systemPort":53685},"capabilities":{"firstMatch":[{"appium:adbPort":"5037","appium:appActivity":"com.myApp.ui.SplashScreenActivity","appium:appPackage":"com.myAppTest","appWaitForLaunch":false,"appium:chromeOptions":{"w3c":true},"appium:automationName":"UIAutomator2","browserName":"","appium:fullReset":false,"appium:newCommandTimeout":0,"appium:noReset":true,"appium:noSign":true,"platformName":"android","appium:platformVersion":"29","appium:skipDeviceInitializat
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"appPackage":"com.myAppTest","skipServerLaunch":true,"noReset":true,"noSign":true,"skipWaitAppStart":true,"adbPort":"5037","fullReset":false,"appActivity":"com.myApp.ui.SplashScreenActivity","appWaitForLaunch":false,"newCommandTimeout":0,"platformVersion":"29","automationName":"UIAutomator2","browserName":"","skipDeviceInitialization":true,"skipUnlock":true,"appium:chromeOptions":{"w3c":true},"skipServerInstallation":true,"platformName":"ANDROID","udid":"emulator-5554","systemPort":53685},null,{"firstMatch":[{"appium:adbPort":"5037","appium:appActivity":"com.myApp.ui.SplashScreenActivity","appium:appPackage":"com.myAppTest","appWaitForLaunch":false,"appium:chromeOptions":{"w3c":true},"appium:automationName":"UIAutomator2","browserName":"","appium:fullReset":false,"appium:newCommandTimeout":0,"appium:noReset":true,"appium:noSign":true,"platformName":"android","appium:platformVersion":"29","appium:skipDeviceInitialization":true,"skipServerInstallation":true,"skipServerLa...
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1637154797601 (05:13:17 GMT-0800 (Pacific Standard Time))
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] appWaitForLaunch
[BaseDriver] skipServerInstallation
[BaseDriver] skipServerLaunch
[BaseDriver] skipWaitAppStart
[Appium] Appium v1.17.0 creating new AndroidUiautomator2Driver (v1.46.0) session
[debug] [Appium] There are no active sessions for cleanup
[Appium] Explicitly enabling use of insecure features:
[Appium] adb_shell
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] "alwaysMatch": {
[debug] [BaseDriver] "appium:appWaitForLaunch": false,
[debug] [BaseDriver] "browserName": "",
[debug] [BaseDriver] "platformName": "android",
[debug] [BaseDriver] "appium:skipServerInstallation": true,
[debug] [BaseDriver] "appium:skipServerLaunch": true,
[debug] [BaseDriver] "appium:skipWaitAppStart": true,
[debug] [BaseDriver] "appium:adbPort": "5037",
[debug] [BaseDriver] "appium:appActivity": "com.myApp.ui.SplashScreenActivity",
[debug] [BaseDriver] "appium:appPackage": "com.myAppTest",
[debug] [BaseDriver] "appium:chromeOptions": {
[debug] [BaseDriver] "w3c": true
[debug] [BaseDriver] },
[debug] [BaseDriver] "appium:automationName": "UIAutomator2",
[debug] [BaseDriver] "appium:fullReset": false,
[debug] [BaseDriver] "appium:newCommandTimeout": 0,
[debug] [BaseDriver] "appium:noReset": true,
[debug] [BaseDriver] "appium:noSign": true,
[debug] [BaseDriver] "appium:platformVersion": "29",
[debug] [BaseDriver] "appium:skipDeviceInitialization": true,
[debug] [BaseDriver] "appium:skipUnlock": true,
[debug] [BaseDriver] "appium:systemPort": 53685,
[debug] [BaseDriver] "appium:udid": "emulator-5554"
[debug] [BaseDriver] },
[debug] [BaseDriver] "firstMatch": [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Number capability passed in as string. Functionality may be compromised.
[BaseDriver] Capability 'adbPort' changed from string ('5037') to integer (5037). This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] skipServerLaunch
[BaseDriver] skipWaitAppStart
[BaseDriver] Session created with session id: 7e1f937b-5b3c-4ca9-b551-15e98347aeaf
[UiAutomator2] Starting 'com.myAppTest' directly on the device
[ADB] Found 4 'build-tools' folders under '/Users/myuser/Library/Android/sdk' (newest first):
[ADB] /Users/myuser/Library/Android/sdk/build-tools/30.0.2
[ADB] /Users/myuser/Library/Android/sdk/build-tools/30.0.0-rc2
[ADB] /Users/myuser/Library/Android/sdk/build-tools/29.0.3
[ADB] /Users/myuser/Library/Android/sdk/build-tools/28.0.3
[ADB] Using 'adb' from '/Users/myuser/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb' from '/Users/myuser/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[debug] [ADB] Setting device id to emulator-5554
[debug] [ADB] Running '/Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 29
[ADB] Getting device platform version
[debug] [ADB] Running '/Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 10
[debug] [ADB] Device API level: 29
[UiAutomator2] Relaxing hidden api policy
[debug] [ADB] Running '/Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[AndroidDriver] No app sent in, not parsing package/activity
[AndroidDriver] 'skipDeviceInitialization' is set. Skipping device initialization.
[debug] [Logcat] Starting logs capture with command: /Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 53685
[debug] [ADB] Forwarding system: 53685 to device: 6790
[debug] [ADB] Running '/Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:53685 tcp:6790'
[UiAutomator2] 'skipServerInstallation' is set. Skipping UIAutomator2 server installation.
[debug] [UiAutomator2] No app capability. Assuming it is already on the device
[debug] [UiAutomator2] Performing shallow cleanup of automation leftovers
[debug] [UiAutomator2] No obsolete sessions have been detected (407 - "<HTML><HEAD>\r\n<TITLE>Access Denied</TITLE>\r\n</HEAD>\r\n<BODY>\r\n<FONT face=\"Helvetica\">\r\n<big><strong></strong></big><BR>\r\n</FONT>\r\n<blockquote>\r\n<TABLE border=0 cellPadding=1 width=\"80%\">\r\n<TR><TD>\r\n<FONT face=\"Helvetica\">\r\n<big>Access Denied (authentication_failed)</big>\r\n<BR>\r\n<BR>\r\n</FONT>\r\n</TD></TR>\r\n<TR><TD>\r\n<FONT face=\"Helvetica\">\r\nYour credentials could not be authenticated: \"Credentials are missing.\". You will not be permitted access until your credentials can be verified.\r\n</FONT>\r\n</TD></TR>\r\n<TR><TD>\r\n<FONT face=\"Helvetica\">\r\nThis is typically caused by an incorrect username and/or password, but could also be caused by network problems.\r\n</FONT>\r\n</TD></TR>\r\n<TR><TD>\r\n<FONT face=\"Helvetica\" SIZE=2>\r\n<BR>\r\n\r\n</FONT>\r\n</TD></TR>\r\n</TABLE>\r\n</blockquote>\r\n</FONT>\r\n</BODY></HTML>\r\n")
[debug] [ADB] Running '/Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[UiAutomator2] 'skipServerInstallation' is set. Attempting to use UIAutomator2 server from the device
[UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online...
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:53685/wd/hub/status] with no body
[WD Proxy] Got response with status 407: <HTML><HEAD>
[WD Proxy] <TITLE>Access Denied</TITLE>
[WD Proxy] </HEAD>
[WD Proxy] <BODY>
[WD Proxy] <FONT face="Helvetica">
[WD Proxy] <big><strong></strong></big><BR>
[WD Proxy] </FONT>
[WD Proxy] <blockquote>
[WD Proxy] <TABLE border=0 cellPadding=1 width="80%">
[WD Proxy] <TR><TD>
[WD Proxy] <FONT face="Helvetica">
[WD Proxy] <big>Access Denied (authentication_failed)</big>
[WD Proxy] <BR>
[WD Proxy] <BR>
[WD Proxy] </FONT>
[WD Proxy] </TD></TR>
[WD Proxy] <TR><TD>
[WD Proxy] <FONT face="Helvetica">
[WD Proxy] Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your credentials can be verified.
[WD Proxy] </FONT>
[WD Proxy] </TD></TR>
[WD Proxy] <TR><TD>
[WD Proxy] <FONT face="Helvetica">
[WD Proxy] This is typically caused by an incorrect username and/or password, but could also be caused by network problems.
[WD Proxy] </FONT>
[WD Proxy] </TD></TR>
[WD Proxy] <TR><TD>
[WD Proxy] <FONT face="Helvetica" SIZE=2>
[WD Proxy] <BR>
[WD Proxy]
[WD Proxy] </FONT>
[WD Proxy] </TD></TR>
[WD Proxy] </TABLE>
[WD Proxy] </blockquote>
[WD Proxy] </FONT>
[WD Proxy] </BODY></HTML>
[WD Proxy]
...
...
...
[UiAutomator2] The instrumentation process cannot be initialized within 30000ms timeout. Make sure the application under test does not crash and investigate the logcat output. You could also try to increase the value of 'uiautomator2ServerLaunchTimeout' capability.
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched '/' to command name 'deleteSession'
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id
[debug] [ADB] Running '/Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.myAppTest'
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 53685
[debug] [ADB] Running '/Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:53685'
[UiAutomator2] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running '/Users/myuser/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1637154903042 (05:15:03 GMT-0800 (Pacific Standard Time))
[debug] [W3C] Encountered internal error running command: Error: The instrumentation process cannot be initialized within 30000ms timeout. Make sure the application under test does not crash and investigate the logcat output. You could also try to increase the value of 'uiautomator2ServerLaunchTimeout' capability.
[debug] [W3C] at Object.errorAndThrow (/__enclose_io_memfs__/node_modules/appium-support/lib/logging.js:87:35)
[debug] [W3C] at UiAutomator2Server.startSession (/__enclose_io_memfs__/node_modules/appium-uiautomator2-driver/lib/uiautomator2.js:220:15)
[debug] [W3C] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 35089 ms - 973
[HTTP]
at getResponseForW3CError (/__enclose_io_memfs__/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/__enclose_io_memfs__/node_modules/appium-base-driver/lib/protocol/protocol.js:392:37)
at getResponseForW3CError (/__enclose_io_memfs__/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/__enclose_io_memfs__/node_modules/appium-base-driver/lib/protocol/protocol.js:392:37)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:336)
at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:37)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:88)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:98)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:94)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
at getResponseForW3CError (/__enclose_io_memfs__/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/__enclose_io_memfs__/node_modules/appium-base-driver/lib/protocol/protocol.js:392:37)
at getResponseForW3CError (/__enclose_io_memfs__/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/__enclose_io_memfs__/node_modules/appium-base-driver/lib/protocol/protocol.js:392:37)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:336)
at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:37)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:88)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:98)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:94)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
at getResponseForW3CError (/__enclose_io_memfs__/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/__enclose_io_memfs__/node_modules/appium-base-driver/lib/protocol/protocol.js:392:37)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment