Giter VIP home page Giter VIP logo

appium-interceptor-plugin's Introduction

appium-interceptor-plugin

This is an Appium plugin designed to intercept API response and mocking easy. This plugin uses mitmproxy

Prerequisite

  1. Appium version 2.0
  2. Intercepting API requests from android requires CA certificate to be installed on the device. Follow the instructions in How to install CA certificate on android section and install the CA certificate.

Installation - Server

Install the plugin using Appium's plugin CLI, either as a named plugin or via NPM:

appium plugin install --source=npm appium-interceptor

Activation

The plugin will not be active unless turned on when invoking the Appium server:

appium server -ka 800 --use-plugins=appium-interceptor -pa /wd/hub

what does this plugin do?

For every appium session, interceptor plugin will start a proxy server and updates the device proxy settings to pass all network traffic to proxy server. Mocking is disabled by default and can be enabled from the test by passing appium:intercept : true in the desired capability while creating a new appium session.

Please refer to the commands sections for detailed usage.

Supported Platforms

๐Ÿ’š Android

Mocking support

  1. Update outgoing request URL
  2. Fully Replace or partially modify the request payload (POST Body)
  3. Update the request headers
  4. Update the response headers
  5. Fully Replace or partially modify the response body
  6. Update the response status code.

Usage

Refer Examples here

Troubleshooting

In certain instances where the session terminates abruptly, the device proxy state may persist without being cleared, leading to a non-functional network connection. To rectify this issue and reset the device proxy state, execute the following adb command.

adb shell settings put global http_proxy :0

Build local

npm install

npm run build

Credits

A special thanks to creators and maintainers of node-http-mitm-proxy. Their efforts have laid the foundation for the capabilities embedded in this plugin.

appium-interceptor-plugin's People

Contributors

anilpatidar avatar anuj-agrawal-groww avatar bardius avatar lovesoni avatar pr4bh4sh avatar saikrishna321 avatar srinivasantarget avatar sudharsan-selvaraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

appium-interceptor-plugin's Issues

need help to setup proxy

i have tried to setup proxy in system

export http_proxy='myproxy:port'

but appium did not use system proxy for request it use system's network IP.

how can i solve this issue.

interceptor: startListening command not supported

I am facing "interceptor: startListening" command not supported
My appium version is: 2.0.1
Appium-interceptor plugin version: 1.0.0-beta.8
Java 11
capabilities.setCapability("appium:intercept ", "true");

Logs:

WARN Appium   - Plugin "appium-interceptor" (package `appium-interceptor`) may be incompatible with the current version of Appium (v2.0.1) due to its peer dependency on older Appium v^2.4.1. Please ask the developer of `appium-interceptor` to update the peer dependency on Appium to v2.0.1.
[Appium] Attempting to load plugin appium-interceptor...
[Appium] Welcome to Appium v2.0.1 (REV bab86d5de571015b63fd8fc30b47bbe072a1290e)
[Appium] Non-default server args:
[Appium] { address: '127.0.0.1',
[Appium]   allowInsecure: [ 'chromedriver_autodownload' ],
[Appium]   basePath: '/wd/hub/',
[Appium]   loglevel: 'info',
[Appium]   port: 48884,
[Appium]   relaxedSecurityEnabled: true,
[Appium]   usePlugins: [ 'appium-interceptor' ] }
[Appium] Attempting to load driver uiautomator2...
[Appium] Attempting to load driver xcuitest...
[Appium] Appium REST http interface listener started on http://127.0.0.1:48884/wd/hub
[Appium] Available drivers:
[Appium]   - [email protected] (automationName 'UiAutomator2')
[Appium]   - [email protected] (automationName 'XCUITest')
[Appium] Available plugins:
[Appium]   - [email protected]
[Appium]   - [email protected] (ACTIVE)
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[HTTP] <-- GET /wd/hub/status 200 3 ms - 128
[HTTP] 


######### APPIUM SERVER DASHBOARD ############
http://127.0.0.1:48884/device-farm
############################################## 


Test suite started at : 12:25:33
Total test cases : 1
Starting android app
Test case running number is : 1 out of total number of test cases : 1
Test case running is : skipGoogleLogin, which started at : 12:25:51
###################################################################
Test results so far as below. 
Total test cases passed till now : 0
Total test cases failed till now : 0
Total test cases skipped till now : 0
###################################################################
skipGoogleLogin is skipped. It skipped at : 12:25:51
org.openqa.selenium.UnsupportedCommandException: interceptor: startListening
Build info: version: '4.9.0', revision: 'd7057100a6'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.2.1', java.version: '11.0.15.1'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [4d4e5a74-d59b-4ee4-a69c-c41a6407f495, interceptor: startListening {}]
Capabilities {appium:app: /Users/anuj/Desktop/app_aut..., appium:appPackage: com.nextbillion.groww.next, appium:appWaitForLaunch: false, appium:autoAcceptAlerts: true, appium:autoGrantPermissions: true, appium:automationName: UiAutomator2, appium:browserstack.appium_version: 2.0.0, appium:browserstack.idleTimeout: 300, appium:browserstack.local: true, appium:browserstack.networkLogs: true, appium:browserstack.networkLogsOptions: {captureContent: true}, appium:build: android/example.xml, appium:databaseEnabled: false, appium:desired: {app: /Users/anuj/Desktop/app_aut..., appWaitForLaunch: false, autoAcceptAlerts: true, autoGrantPermissions: true, automationName: UiAutomator2, browserstack.appium_version: 2.0.0, browserstack.idleTimeout: 300, browserstack.local: true, browserstack.networkLogs: true, browserstack.networkLogsOptions: {captureContent: true}, build: android/example.xml, deviceAvailabilityTimeout: , disableWindowAnimation: true, fullReset: true, ignoreHiddenApiPolicyError: true, intercept : true, noReset: false, noResetValue: false, noSign: true, platformName: ANDROID, unlockKey: 123456, unlockType: pin, useNewWDA: false}, appium:deviceApiLevel: 25, appium:deviceAvailabilityTimeout: , appium:deviceManufacturer: Google, appium:deviceModel: Android SDK built for arm64, appium:deviceName: emulator-5554, appium:deviceScreenDensity: 440, appium:deviceScreenSize: 1080x2280, appium:deviceUDID: emulator-5554, appium:disableWindowAnimation: true, appium:fullReset: true, appium:ignoreHiddenApiPolicyError: true, appium:intercept : true, appium:javascriptEnabled: true, appium:locationContextEnabled: false, appium:networkConnectionEnabled: true, appium:noReset: false, appium:noResetValue: false, appium:noSign: true, appium:pixelRatio: 2.75, appium:platformVersion: 7.1.1, appium:statBarHeight: 66, appium:takesScreenshot: true, appium:unlockKey: 123456, appium:unlockType: pin, appium:useNewWDA: false, appium:viewportRect: {height: 2214, left: 0, top: 66, width: 1080}, appium:warnings: {}, appium:webStorageEnabled: false, platformName: ANDROID}
Session ID: 4d4e5a74-d59b-4ee4-a69c-c41a6407f495
        at org.openqa.selenium.remote.codec.AbstractHttpCommandCodec.encode(AbstractHttpCommandCodec.java:250)
        at org.openqa.selenium.remote.codec.AbstractHttpCommandCodec.encode(AbstractHttpCommandCodec.java:122)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:181)
        at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:262)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:598)
        at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:272)
        at in.groww.automation.frontend.apps.android._GrowwAndroidApp.captureNetwork(_GrowwAndroidApp.java:116)
        at in.groww.automation.frontend.flows.VisitorFlow.setup(VisitorFlow.java:35)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
        at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
        at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:340)
        at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:294)
        at org.testng.internal.TestInvoker.runConfigMethods(TestInvoker.java:683)
        at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:510)
        at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:172)
        at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
        at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:804)
        at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:145)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Testcase skipped

`java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.`

Describe the Issue
I have a Hybrid Application developed using CapacitorJS.
I am using Appium with WebDriverIO.
I am mocking the REST API in test by following the guide in this repo, however, when the request is sent by the app this exception arises in logcat

java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
                                                                                                    javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
                                                                                                    	at com.android.org.conscrypt.SSLUtils.toSSLHandshakeException(SSLUtils.java:356)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngine.convertException(ConscryptEngine.java:1134)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1089)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:876)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:747)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngine.unwrap(ConscryptEngine.java:712)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:896)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.-$$Nest$mprocessDataFromSocket(Unknown Source:0)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngineSocket.doHandshake(ConscryptEngineSocket.java:236)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngineSocket.startHandshake(ConscryptEngineSocket.java:218)
                                                                                                    	at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:196)
                                                                                                    	at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:153)
                                                                                                    	at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)
                                                                                                    	at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)
                                                                                                    	at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)
                                                                                                    	at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
                                                                                                    	at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)
                                                                                                    	at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)
                                                                                                    	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)
                                                                                                    	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
                                                                                                    	at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:262)
                                                                                                    	at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:219)
                                                                                                    	at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:30)
                                                                                                    	at com.getcapacitor.plugin.util.CapacitorHttpUrlConnection.writeRequestBody(CapacitorHttpUrlConnection.java:239)
                                                                                                    	at com.getcapacitor.plugin.util.CapacitorHttpUrlConnection.setRequestBody(CapacitorHttpUrlConnection.java:210)
                                                                                                    	at com.getcapacitor.plugin.util.HttpRequestHandler.request(HttpRequestHandler.java:414)
                                                                                                    	at com.getcapacitor.plugin.CapacitorHttp$1.run(CapacitorHttp.java:66)
                                                                                                    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
                                                                                                    	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
                                                                                                    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
                                                                                                    Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
                                                                                                    	at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:656)
                                                                                                    	at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:505)
                                                                                                    	at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:425)
                                                                                                    	at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:353)
                                                                                                    	at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
                                                                                                    	at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:90)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngineSocket$2.checkServerTrusted(ConscryptEngineSocket.java:163)
2024-03-25 19:13:15.169  6592-6756  Capacitor/Plugin                  E  	at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:260)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngine.verifyCertificateChain(ConscryptEngine.java:1638)
                                                                                                    	at com.android.org.conscrypt.NativeCrypto.ENGINE_SSL_read_direct(Native Method)
                                                                                                    	at com.android.org.conscrypt.NativeSsl.readDirectByteBuffer(NativeSsl.java:569)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngine.readPlaintextDataDirect(ConscryptEngine.java:1095)
                                                                                                    	at com.android.org.conscrypt.ConscryptEngine.readPlaintextData(ConscryptEngine.java:1079)

I have also replaced the implementation of fetch and XMLHttpRequest with native implementation using Capacitor HTTP Plugin, still got no success.

How to reproduce ?

  1. Create a Capacitor App.
  2. Replace the fetch and XMLHttpRequest with native implementation using Capacitor HTTP Plugin.
  3. Write a fetch request from JS Code.
  4. follow the guide on this repo to setup appium-interceptor-plugin.
  5. Test the application.

Device Information
OS: Android
Version: API 34 (Android 14)
Device: Pixel 7 Pro

Proxy does not work on the device

2024-05-15T10:03:44.498Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:54578
[0-0] at ClientRequest. (file:///Users/purvikeny/Desktop/Tesco%20Mobile/TescoAppAutomationCode/mobileapp-tests/node_modules/got/dist/source/core/index.js:790:107)
[0-0] at Object.onceWrapper (node:events:632:26)
[0-0] at ClientRequest.emit (node:events:529:35)
[0-0] at ClientRequest.emit (node:domain:489:12)
[0-0] at Socket.socketErrorListener (node:_http_client:501:9)
[0-0] at Socket.emit (node:events:517:28)
[0-0] at Socket.emit (node:domain:489:12)
[0-0] at emitErrorNT (node:internal/streams/destroy:151:8)
[0-0] at emitErrorCloseNT (node:internal/streams/destroy:116:3)
[0-0] at processTicksAndRejections (node:internal/process/task_queues:82:21)
[0-0] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
[0-0] 2024-05-15T10:03:44.499Z ERROR @wdio/runner: Error: Failed to create session.
[0-0] Unable to connect to "http://127.0.0.1:54578/", make sure browser driver is running on that address.
[0-0] It seems like the service failed to start or is rejecting any connections.
[0-0] at startWebDriverSession (file:///Users/purvikeny/Desktop/Tesco%20Mobile/TescoAppAutomationCode/mobileapp-tests/node_modules/webdriver/build/utils.js:69:15)
[0-0] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[0-0] at async Function.newSession (file:///Users/purvikeny/Desktop/Tesco%20Mobile/TescoAppAutomationCode/mobileapp-tests/node_modules/webdriver/build/index.js:20:45)
[0-0] at async remote (file:///Users/purvikeny/Desktop/Tesco%20Mobile/TescoAppAutomationCode/mobileapp-tests/node_modules/webdriverio/build/index.js:46:22)
[0-0] at async Runner._startSession (file:///Users/purvikeny/Desktop/Tesco%20Mobile/TescoAppAutomationCode/mobileapp-tests/node_modules/@wdio/runner/build/index.js:241:29)
[0-0] at async Runner._initSession (file:///Users/purvikeny/Desktop/Tesco%20Mobile/TescoAppAutomationCode/mobileapp-tests/node_modules/@wdio/runner/build/index.js:207:25)
[0-0] at async Runner.run (file:///Users/purvikeny/Desktop/Tesco%20Mobile/TescoAppAutomationCode/mobileapp-tests/node_modules/@wdio/runner/build/index.js:88:19)
[0-0] 2024-05-15T10:03:44.501Z DEBUG @wdio/utils:shim: Finished to run "after" hook in 0ms
2024-05-15T10:03:44.631Z DEBUG @wdio/local-runner: Runner 0-0 finished with exit code 1
[0-0] FAILED in Android - file:///Users/purvikeny/Desktop/Tesco%20Mobile/TescoAppAutomationCode/mobileapp-tests/tests/paym/specs/journeys/change_password.spec.ts
2024-05-15T10:03:44.631Z INFO @wdio/cli:launcher: Run onWorkerEnd hook
2024-05-15T10:03:44.632Z DEBUG @wdio/cli:utils: Finished to run "onWorkerEnd" hook in 0ms
2024-05-15T10:03:44.632Z INFO @wdio/cli:launcher: Run onComplete hook
2024-05-15T10:03:44.632Z INFO @wdio/appium-service: Appium (pid: 21782) killed
2024-05-15T10:03:44.632Z DEBUG @wdio/cli:utils: Finished to run "onComplete" hook in 0ms

Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:02

2024-05-15T10:03:44.634Z INFO @wdio/local-runner: Shutting down spawned worker
2024-05-15T10:03:44.887Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2024-05-15T10:03:44.889Z INFO @wdio/local-runner: shutting down
purvikeny@Purvis-MacBook-Pro mobileapp-tests %

Issue : The following script arguments are not known and will be ignored: url,statusCode | Encountered internal error running command: UnknownCommandError: Unknown mobile command "interceptor:addMock"

Example 1 :

<---------Java Code------------>

Map<String, String> config = new HashMap();
config.put("url", "**/api/lobbyApi/v1/getMatches");
config.put("statusCode","500");
((JavascriptExecutor)driver).executeScript("interceptor: addMock",config);

Example 2 :

Object authorizationMock = driver.executeScript("interceptor:addMock", new Object[]{
"config", new Object[]{
"url", "**/api/lobbyApi/v1/getMatches",
"statusCode", 500
}
});

<---------Example 1 Logs------------>

[HTTP] {"script":"interceptor: addMock","args":[{"url":"/api/lobbyApi/v1/getMatches","statusCode":"500"}]}
[device-farm-/Users/anil-patidar/.appium] Updating lastCmdExecutedAt for device EQJZH6VONZA6TSWW in session fe666a72-0305-42a4-b7bd-e8d12e75e14c
[AndroidUiautomator2Driver@3e8a (fe666a72)] Calling AppiumDriver.execute() with args: ["interceptor: addMock",[{"url":"
/api/lobbyApi/v1/getMatches","statusCode":"500"}],"fe666a72-0305-42a4-b7bd-e8d12e75e14c"]

[HTTP] --> POST /wd/hub/session/fe666a72-0305-42a4-b7bd-e8d12e75e14c/execute/sync
[HTTP] {"script":"interceptor: addMock","args":[{"url":"/api/lobbyApi/v1/getMatches","statusCode":"500"}]}
[device-farm-/Users/anil-patidar/.appium] Updating lastCmdExecutedAt for device EQJZH6VONZA6TSWW in session fe666a72-0305-42a4-b7bd-e8d12e75e14c
[AndroidUiautomator2Driver@3e8a (fe666a72)] Calling AppiumDriver.execute() with args: ["interceptor: addMock",[{"url":"
/api/lobbyApi/v1/getMatches","statusCode":"500"}],"fe666a72-0305-42a4-b7bd-e8d12e75e14c"]
[AppiumDriver@e6c7] Clearing new command timeout pre-emptively since plugin(s) will handle this command
[AppiumDriver@e6c7] Plugins which can handle cmd 'execute': device-farm,appium-dashboard,gestures,appium-interceptor
[AppiumDriver@e6c7] Plugin appium-interceptor is now handling cmd 'execute'
[BaseDriver] The following script arguments are not known and will be ignored: url,statusCode
[AppiumDriver@e6c7] Command 'execute' was not handled by the following behaviours or plugins, even though they were registered to handle it: ["default","device-farm","appium-dashboard","gestures"]. The command was handled by these: ["appium-interceptor"].
[AppiumDriver@e6c7] Restarting new command timeout via umbrella driver since plugin did not allow default handler to execute
[AndroidUiautomator2Driver@3e8a (fe666a72)] Encountered internal error running command: BadParametersError: The following required parameter is missing: ["config"]
[AndroidUiautomator2Driver@3e8a (fe666a72)] Known required parameters are: ["config"]
[AndroidUiautomator2Driver@3e8a (fe666a72)] You have provided none
[AndroidUiautomator2Driver@3e8a (fe666a72)] at checkParams (/Users/anil-patidar/node_modules/@appium/base-driver/lib/protocol/protocol.js:159:9)
[AndroidUiautomator2Driver@3e8a (fe666a72)] at validateExecuteMethodParams (/Users/anil-patidar/node_modules/@appium/base-driver/lib/protocol/protocol.js:246:5)
[AndroidUiautomator2Driver@3e8a (fe666a72)] at AppiumInterceptorPlugin.executeMethod (/Users/anil-patidar/node_modules/@appium/base-plugin/lib/plugin.js:79:45)
[AndroidUiautomator2Driver@3e8a (fe666a72)] at AppiumInterceptorPlugin. (/Users/anil-patidar/.appium/node_modules/appium-interceptor/src/plugin.ts:165:23)
[AndroidUiautomator2Driver@3e8a (fe666a72)] at Generator.next ()
[AndroidUiautomator2Driver@3e8a (fe666a72)] at /Users/anil-patidar/.appium/node_modules/appium-interceptor/lib/plugin.js:8:71
[AndroidUiautomator2Driver@3e8a (fe666a72)] at new Promise ()
[AndroidUiautomator2Driver@3e8a (fe666a72)] at __awaiter (/Users/anil-patidar/.appium/node_modules/appium-interceptor/lib/plugin.js:4:12)
[AndroidUiautomator2Driver@3e8a (fe666a72)] at AppiumInterceptorPlugin.execute (/Users/anil-patidar/.appium/node_modules/appium-interceptor/lib/plugin.js:142:16)
[AndroidUiautomator2Driver@3e8a (fe666a72)] at /Users/anil-patidar/.nvm/versions/node/v16.15.1/lib/node_modules/appium/lib/appium.js:1175:35
[AndroidUiautomator2Driver@3e8a (fe666a72)] at AppiumDriver.executeWrappedCommand (/Users/anil-patidar/.nvm/versions/node/v16.15.1/lib/node_modules/appium/lib/appium.js:1215:22)
[AndroidUiautomator2Driver@3e8a (fe666a72)] at AppiumDriver.executeCommand (/Users/anil-patidar/.nvm/versions/node/v16.15.1/lib/node_modules/appium/lib/appium.js:1121:28)
[AndroidUiautomator2Driver@3e8a (fe666a72)] at runMicrotasks ()
[AndroidUiautomator2Driver@3e8a (fe666a72)] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[AndroidUiautomator2Driver@3e8a (fe666a72)] at asyncHandler (/Users/anil-patidar/.nvm/versions/node/v16.15.1/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:393:19)
[W3C] Bad parameters: BadParametersError: The following required parameter is missing: ["config"]
[W3C] Known required parameters are: ["config"]
[W3C] You have provided none
[HTTP] <-- POST /wd/hub/session/fe666a72-0305-42a4-b7bd-e8d12e75e14c/execute/sync 400 214 ms - 1839
[HTTP]
[device-farm-/Users/anil-patidar/.appium] Found 1 device candidates to be released
[device-farm-/Users/anil-patidar/.appium] Cleaning pending sessions...
[device-farm-/Users/anil-patidar/.appium] No pending sessions to clean
[device-farm-/Users/anil-patidar/.appium] Found 1 device candidates to be released
[device-farm-/Users/anil-patidar/.appium] Cleaning pending sessions...
[device-farm-/Users/anil-patidar/.appium] No pending sessions to clean
HTTPS_CLIENT_ERROR
[Error: 4388980096:error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1546:SSL alert number 46
] {
library: 'SSL routines',
function: 'ssl3_read_bytes',
reason: 'sslv3 alert certificate unknown',
code: 'ERR_SSL_SSLV3_ALERT_CERTIFICATE_UNKNOWN'
}

<---------Example 2 Logs------------>

creating SNI context for conff.dc.oppomobile.com
[HTTP] --> POST /wd/hub/session/291f75ec-9509-4e27-9b0f-7649e84804b9/execute/sync
[HTTP] {"script":"interceptor:addMock","args":["config",["url","/api/lobbyApi/v1/getMatches","statusCode",500]]}
[device-farm-/Users/anil-patidar/.appium] Updating lastCmdExecutedAt for device EQJZH6VONZA6TSWW in session 291f75ec-9509-4e27-9b0f-7649e84804b9
[AndroidUiautomator2Driver@a6fb (291f75ec)] Calling AppiumDriver.execute() with args: ["interceptor:addMock",["config",["url","
/api/lobbyApi/v1/getMatches","statusCode",500]],"291f75ec-9509-4e27-9b0f-7649e84804b9"]
[AppiumDriver@f5c9] Clearing new command timeout pre-emptively since plugin(s) will handle this command
[AppiumDriver@f5c9] Plugins which can handle cmd 'execute': device-farm,appium-dashboard,gestures,appium-interceptor
[AppiumDriver@f5c9] Plugin appium-interceptor is now handling cmd 'execute'
[Plugin [appium-interceptor]] Plugin did not know how to handle method 'interceptor:addMock'. Passing control to next
[AppiumDriver@f5c9] Plugin gestures is now handling cmd 'execute'
[Plugin [gestures]] Plugin did not know how to handle method 'interceptor:addMock'. Passing control to next
[AppiumDriver@f5c9] Plugin appium-dashboard is now handling cmd 'execute'
[AppiumDriver@f5c9] Plugin device-farm is now handling cmd 'execute'
[AppiumDriver@f5c9] Executing default handling behavior for command 'execute'
[device-farm-/Users/anil-patidar/.appium] Updating lastCmdExecutedAt for device EQJZH6VONZA6TSWW in session 291f75ec-9509-4e27-9b0f-7649e84804b9
[AndroidUiautomator2Driver@a6fb (291f75ec)] Encountered internal error running command: UnknownCommandError: Unknown mobile command "interceptor:addMock". Only shell, execEmuConsoleCommand, dragGesture, flingGesture, doubleClickGesture, clickGesture, longClickGesture, pinchCloseGesture, pinchOpenGesture, swipeGesture, scrollGesture, scrollBackTo, scroll, viewportScreenshot, viewportRect, deepLink, startLogsBroadcast, stopLogsBroadcast, deviceidle, acceptAlert, dismissAlert, batteryInfo, deviceInfo, getDeviceTime, changePermissions, getPermissions, performEditorAction, startScreenStreaming, stopScreenStreaming, getNotifications, openNotifications, listSms, type, replaceElementValue, pushFile, pullFile, pullFolder, deleteFile, isAppInstalled, queryAppState, activateApp, removeApp, terminateApp, installApp, clearApp, backgroundApp, getCurrentActivity, getCurrentPackage, startActivity, startService, stopService, broadcast, getContexts, getAppStrings, installMultipleApks, lock, unlock, isLocked, refreshGpsCache, startMediaProjectionRecording, isMediaProjectionRecordingRunning, stopMediaProjectionRecording, getConnectivity, setConnectivity, toggleGps, isGpsEnabled, hideKeyboard, isKeyboardShown, pressKey, getDisplayDensity, getSystemBars, fingerprint, sendSms, gsmCall, gsmSignal, gsmVoice, powerAc, powerCapacity, networkSpeed, sensorSet, getPerformanceData, getPerformanceDataTypes, statusBar, screenshots, scheduleAction, getActionHistory, unscheduleAction, getUiMode, setUiMode, sendTrimMemory commands are supported.
[AndroidUiautomator2Driver@a6fb (291f75ec)] at AndroidUiautomator2Driver.executeMobile (/Users/anil-patidar/.appium/node_modules/appium-uiautomator2-driver/lib/commands/execute.js:56:11)
[AndroidUiautomator2Driver@a6fb (291f75ec)] at AndroidUiautomator2Driver.execute (/Users/anil-patidar/.appium/node_modules/appium-uiautomator2-driver/lib/commands/execute.js:27:23)
[AndroidUiautomator2Driver@a6fb (291f75ec)] at commandExecutor (/Users/anil-patidar/node_modules/@appium/base-driver/lib/basedriver/driver.ts:106:18)
[AndroidUiautomator2Driver@a6fb (291f75ec)] at /Users/anil-patidar/node_modules/async-lock/lib/index.js:171:12
[AndroidUiautomator2Driver@a6fb (291f75ec)] at AsyncLock._promiseTry (/Users/anil-patidar/node_modules/async-lock/lib/index.js:306:31)
[AndroidUiautomator2Driver@a6fb (291f75ec)] at exec (/Users/anil-patidar/node_modules/async-lock/lib/index.js:170:9)
[AndroidUiautomator2Driver@a6fb (291f75ec)] at AsyncLock.acquire (/Users/anil-patidar/node_modules/async-lock/lib/index.js:189:3)
[AndroidUiautomator2Driver@a6fb (291f75ec)] at AndroidUiautomator2Driver.executeCommand (/Users/anil-patidar/node_modules/@appium/base-driver/lib/basedriver/driver.ts:122:39)
[AndroidUiautomator2Driver@a6fb (291f75ec)] at runMicrotasks ()
[AndroidUiautomator2Driver@a6fb (291f75ec)] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[AndroidUiautomator2Driver@a6fb (291f75ec)] at defaultBehavior (/Users/anil-patidar/.nvm/versions/node/v16.15.1/lib/node_modules/appium/lib/appium.js:1109:14)
[HTTP] <-- POST /wd/hub/session/291f75ec-9509-4e27-9b0f-7649e84804b9/execute/sync 404 144 ms - 4048
[HTTP]
HTTPS_CLIENT_ERROR
[Error: 4411344256:error:14094416:SSL routines:ssl3_read_bytes:sslv3 alert certificate unknown:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1546:SSL alert number 46
] {
library: 'SSL routines',
function: 'ssl3_read_bytes',
reason: 'sslv3 alert certificate unknown',
code: 'ERR_SSL_SSLV3_ALERT_CERTIFICATE_UNKNOWN'

Unable to create session | I have two appium server running, one in ci machine which intact with another appium server on second machine which has devices connect

WARN Appium Appium encountered 1 warning while validating drivers found in manifest /Users/anil-patidar/.appium/node_modules/.cache/appium/extensions.yaml
WARN Appium Driver "uiautomator2" has 1 potential problem:
WARN Appium - Driver "uiautomator2" (package appium-uiautomator2-driver) may be incompatible with the current version of Appium (v2.3.0) due to its peer dependency on older Appium v^2.4.1. Please upgrade appium-uiautomator2-driver to v3.7.4 or newer.
WARN Appium Appium encountered 5 warnings while validating plugins found in manifest /Users/anil-patidar/.appium/node_modules/.cache/appium/extensions.yaml
WARN Appium Plugin "device-farm" has 1 potential problem:
WARN Appium - Plugin "device-farm" (package appium-device-farm) may be incompatible with the current version of Appium (v2.3.0) due to its peer dependency on older Appium v^2.5.4. Please upgrade appium-device-farm to vnull or newer.
WARN Appium Plugin "element-wait" has 1 potential problem:
WARN Appium - Plugin "element-wait" (package appium-wait-plugin) may be incompatible with the current version of Appium (v2.3.0) due to its peer dependency on older Appium v^2.4.1. Please ask the developer of appium-wait-plugin to update the peer dependency on Appium to v2.3.0.
WARN Appium Plugin "appium-interceptor" has 1 potential problem:
WARN Appium - Plugin "appium-interceptor" (package appium-interceptor) may be incompatible with the current version of Appium (v2.3.0) due to its peer dependency on older Appium v^2.4.1. Please ask the developer of appium-interceptor to update the peer dependency on Appium to v2.3.0.
info Appium Attempting to load plugin device-farm...
info Appium Attempting to load plugin gestures...
info Appium Attempting to load plugin appium-interceptor...
dbug Appium Requiring plugin at /Users/anil-patidar/.appium/node_modules/appium-device-farm/lib/src/main.js
dbug Appium Requiring plugin at /Users/anil-patidar/.appium/node_modules/appium-interceptor/lib/index.js
dbug Appium Requiring plugin at /Users/anil-patidar/.appium/node_modules/appium-gestures-plugin/lib/index.js
{ DeviceFarmProLoader: [class P], default: [class P] }
dbug Appium uT has been successfully loaded in 2.953s
dbug Appium AppiumInterceptorPlugin has been successfully loaded in 2.953s
dbug Appium GesturesPlugin has been successfully loaded in 2.953s
info Appium Welcome to Appium v2.3.0 (REV 0ccd099bff8e384043883c4ae01b589794b13d72)
info Appium Non-default server args:
info Appium { address: '127.0.0.1',
info Appium basePath: '/wd/hub/',
info Appium port: 28004,
info Appium relaxedSecurityEnabled: true,
info Appium usePlugins: [ 'device-farm', 'gestures', 'appium-interceptor' ] }
dbug Appium The APPIUM_HOME environment variable: /Users/anil-patidar/.appium
info Appium Attempting to load driver uiautomator2...
dbug Appium Requiring driver at /Users/anil-patidar/.appium/node_modules/appium-uiautomator2-driver/build/index.js
dbug Appium AndroidUiautomator2Driver has been successfully loaded in 0.904s
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑ Update server with CLI Args: {"subcommand":"server","address":"127.0.0.1","basePath":"/wd/hub/","logFile":"/Users/anil-patidar/Documents/Automation/mecfunctional/target/appiumlogs/appium_logs.txt","port":28004,"relaxedSecurityEnabled":true,"configFile":"/Users/anil-patidar/Documents/Automation/mecfunctional/target/server.json","extraArgs":[],"usePlugins":["device-farm","gestures","appium-interceptor"],"plugin":{"device-farm":{"cloud":{"devices":[{"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"P12289001284","platform":"android","pCloudy_DeviceFullName":"P12289001284"}],"cloudName":"pCloudy","url":"http://mydevicelab.com:4723"},"platform":"android","androidDeviceType":"both","iosDeviceType":"both"}},"allowCors":false,"allowInsecure":[],"callbackPort":4723,"debugLogSpacing":false,"denyInsecure":[],"keepAliveTimeout":600,"localTimezone":false,"loglevel":"debug","logNoColors":false,"logTimestamp":false,"pluginsImportChunkSize":7,"driversImportChunkSize":3,"longStacktrace":false,"noPermsCheck":false,"sessionOverride":false,"strictCaps":false,"useDrivers":[],"tmpDir":"/var/folders/75/bnv7pk3s5gx47h_c0dhk01_w0000gq/T"}
{ DeviceFarmProLoader: [class P], default: [class P] }
[ADB] Found 7 'build-tools' folders under '/Users/anil-patidar/Library/Android/sdk' (newest first):
[ADB] /Users/anil-patidar/Library/Android/sdk/build-tools/35.0.0
[ADB] /Users/anil-patidar/Library/Android/sdk/build-tools/33.0.0
[ADB] /Users/anil-patidar/Library/Android/sdk/build-tools/32.1.0-rc1
[ADB] /Users/anil-patidar/Library/Android/sdk/build-tools/32.0.0
[ADB] /Users/anil-patidar/Library/Android/sdk/build-tools/31.0.0
[ADB] /Users/anil-patidar/Library/Android/sdk/build-tools/30.0.3
[ADB] /Users/anil-patidar/Library/Android/sdk/build-tools/30.0.0
[ADB] Using 'adb' from '/Users/anil-patidar/Library/Android/sdk/platform-tools/adb'
[ADB] Running '/Users/anil-patidar/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[device-farm-/Users/anil-patidar/.appium] Cli Args: {"subcommand":"server","address":"127.0.0.1","basePath":"/wd/hub/","logFile":"/Users/anil-patidar/Documents/Automation/mecfunctional/target/appiumlogs/appium_logs.txt","port":28004,"relaxedSecurityEnabled":true,"configFile":"/Users/anil-patidar/Documents/Automation/mecfunctional/target/server.json","extraArgs":[],"usePlugins":["device-farm","gestures","appium-interceptor"],"plugin":{"device-farm":{"cloud":{"devices":[{"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"P12289001284","platform":"android","pCloudy_DeviceFullName":"P12289001284"}],"cloudName":"pCloudy","url":"http://mydevicelab.com:4723"},"platform":"android","androidDeviceType":"both","iosDeviceType":"both"}},"allowCors":false,"allowInsecure":[],"callbackPort":4723,"debugLogSpacing":false,"denyInsecure":[],"keepAliveTimeout":600,"localTimezone":false,"loglevel":"debug","logNoColors":false,"logTimestamp":false,"pluginsImportChunkSize":7,"driversImportChunkSize":3,"longStacktrace":false,"noPermsCheck":false,"sessionOverride":false,"strictCaps":false,"useDrivers":[],"tmpDir":"/var/folders/75/bnv7pk3s5gx47h_c0dhk01_w0000gq/T"}
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑ Update server with Plugin Args: {"platform":"android","iosDeviceType":"both","androidDeviceType":"both","skipChromeDownload":true,"maxSessions":8,"adbRemote":[],"emulators":[],"simulators":[],"deviceAvailabilityTimeoutMs":300000,"deviceAvailabilityQueryIntervalMs":10000,"sendNodeDevicesToHubIntervalMs":30000,"checkStaleDevicesIntervalMs":30000,"checkBlockedDevicesIntervalMs":30000,"newCommandTimeoutSec":60,"cloud":{"devices":[{"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"P12289001284","platform":"android","pCloudy_DeviceFullName":"P12289001284"}],"cloudName":"pCloudy","url":"http://mydevicelab.com:4723"},"bindHostOrIp":"xxx.xxx.xxx.xxx","enableDashboard":false,"removeDevicesFromDatabaseBeforeRunningThePlugin":false,"remoteConnectionTimeout":60000,"liveStreaming":false,"wdaBundleId":"","preBuildWDAPath":""}
[device-farm-/Users/anil-patidar/.appium] Initializing storage
[device-farm-/Users/anil-patidar/.appium] Initializing database
[device-farm-/Users/anil-patidar/.appium] Creating new database: /Users/anil-patidar/.appium/db.json
[device-farm-/Users/anil-patidar/.appium] Database loaded
[device-farm-/Users/anil-patidar/.appium] proxy is not required for axios
[device-farm-/Users/anil-patidar/.appium] Registering proxy middleware
[device-farm-/Users/anil-patidar/.appium] Registering websocket handler for Android Streaming
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฃ๐Ÿ“ฃ๐Ÿ“ฃ I'm a hub and I'm listening on xxx.xxx.xxx.xxx:28004
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฃ๐Ÿ“ฃ๐Ÿ“ฃ Cloud runner sessions dont require constant device checks
[device-farm-/Users/anil-patidar/.appium] Loading devices from server config
[device-farm-/Users/anil-patidar/.appium] Loading devices from server config
[device-farm-/Users/anil-patidar/.appium] Added 1 new devices to local database
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฃ๐Ÿ“ฃ๐Ÿ“ฃ Device Farm Plugin will be served at ๐Ÿ”— http://xxx.xxx.xxx.xxx:28004/device-farm with id b9fdbc0c-b5f5-41cd-b0e2-38aafbd3eec0
info Appium Appium REST http interface listener started on http://127.0.0.1:28004/wd/hub
info Appium Available drivers:
info Appium - [email protected] (automationName 'UiAutomator2')
info Appium Available plugins:
info Appium - [email protected]
info Appium - [email protected] (ACTIVE)
info Appium - [email protected]
info Appium - [email protected] (ACTIVE)
info Appium - [email protected] (ACTIVE)
[HTTP] --> GET /wd/hub/status {}
[device-farm-/Users/anil-patidar/.appium] Received non-webdriver request with url /wd/hub/status. So, not proxying it to downstream.
[AppiumDriver@43e4] Calling AppiumDriver.getStatus() with args: []
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑ Plugin Args: {"cloud":{"devices":[{"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"P12289001284","platform":"android","pCloudy_DeviceFullName":"P12289001284"}],"cloudName":"pCloudy","url":"http://mydevicelab.com:4723"},"platform":"android","androidDeviceType":"both","iosDeviceType":"both"}
[AppiumDriver@43e4] Plugins which can handle cmd 'getStatus': device-farm
[AppiumDriver@43e4] Plugin device-farm is now handling cmd 'getStatus'
[AppiumDriver@43e4] Executing default handling behavior for command 'getStatus'
[AppiumDriver@43e4] Responding to client with driver.getStatus() result: {"ready":true,"message":"The server is ready to accept new connections","build":{"version":"2.3.0","git-sha":"0ccd099bff8e384043883c4ae01b589794b13d72","built":"2022-10-13 16:25:25 -0700"}}
[HTTP] <-- GET /wd/hub/status 200 13 ms - 199
2024-07-23 16:59:10 INFO AppiumServerManager:79 - com.appium.manager.AppiumServerManagerAppium Server Started at......http://127.0.0.1:28004/wd/hub/
13
[HTTP] --> GET /device-farm/api/device {}
[device-farm-/Users/anil-patidar/.appium] Received non-webdriver request with url /device-farm/api/device. So, not proxying it to downstream.
[HTTP] --> GET /dashboard/api/ping {}
[device-farm-/Users/anil-patidar/.appium] Received non-webdriver request with url /dashboard/api/ping. So, not proxying it to downstream.
[HTTP] No route found for /dashboard/api/ping
[HTTP] <-- GET /dashboard/api/ping 404 7 ms - 211
[HTTP] <-- GET /device-farm/api/device 200 60 ms - 583
2024-07-23 16:59:11 INFO Logger:34 - [NO-TEST-RAN] - Running tests locally. Cleanup devices before proceeding
2024-07-23 16:59:11 INFO RunnerTest:38 - [NO-TEST-RAN] - Running tests locally. Cleanup devices before proceeding
2024-07-23 16:59:13 INFO Logger:34 - [NO-TEST-RAN] - Calling Get IP Address of the device API method
2024-07-23 16:59:13 INFO DeviceFarmExecutor:38 - [NO-TEST-RAN] - Calling Get IP Address of the device API method
2024-07-23 16:59:13 INFO Logger:34 - [NO-TEST-RAN] - Calling touch pointer of the device API method
2024-07-23 16:59:13 INFO DeviceFarmExecutor:38 - [NO-TEST-RAN] - Calling touch pointer of the device API method
2024-07-23 16:59:14 INFO Logger:34 - [NO-TEST-RAN] - Running tests from package - com.abc.e2e.tests.functional
2024-07-23 16:59:14 INFO RunnerTest:38 - [NO-TEST-RAN] - Running tests from package - com.abc.e2e.tests.functional
2024-07-23 16:59:14 INFO ATDRunner:88 - com.appium.manager.ATDRunnerTotal Number of devices detected::1

2024-07-23 16:59:14 INFO Reflections:219 - Reflections took 312 ms to scan 1 urls, producing 1 keys and 265 values
2024-07-23 16:59:14 INFO Helpers:94 - Custom Listener not found!!
...
... TestNG 7.5 by Cรฉdric Beust ([email protected])
...

2024-07-23 16:59:15 INFO Utils:112 - [Utils] MethodGroupsHelper.sortMethods() took 0 ms.
2024-07-23 16:59:16,984 Test worker INFO Log4j appears to be running in a Servlet environment, but there's no log4j-web module available. If you want better web container support, please add the log4j-web JAR to your web archive or server lib directory.
2024-07-23 16:59:17 INFO Version:21 - HV000001: Hibernate Validator 6.1.7.Final
2024-07-23 16:59:19,591 Test worker INFO Log4j appears to be running in a Servlet environment, but there's no log4j-web module available. If you want better web container support, please add the log4j-web JAR to your web archive or server lib directory.
2024-07-23 16:59:19,646 Test worker ERROR Error processing element appender ([configuration: null]): CLASS_NOT_FOUND
2024-07-23 16:59:19,655 Test worker ERROR Unknown object "logger" of type org.apache.logging.log4j.core.config.LoggerConfig is ignored: try nesting it inside one of: ["Appenders", "Loggers", "Properties", "Scripts", "CustomLevels"].
2024-07-23 16:59:19,657 Test worker ERROR Unknown object "logger" of type org.apache.logging.log4j.core.config.LoggerConfig is ignored: try nesting it inside one of: ["Appenders", "Loggers", "Properties", "Scripts", "CustomLevels"].
2024-07-23 16:59:19,659 Test worker ERROR Unknown object "logger" of type org.apache.logging.log4j.core.config.LoggerConfig is ignored: try nesting it inside one of: ["Appenders", "Loggers", "Properties", "Scripts", "CustomLevels"].
2024-07-23 16:59:19,660 Test worker ERROR Unknown object "root" of type org.apache.logging.log4j.core.config.LoggerConfig is ignored: try nesting it inside one of: ["Appenders", "Loggers", "Properties", "Scripts", "CustomLevels"].

}
[HTTP] --> GET /device-farm/api/cliArgs {}
[device-farm-/Users/anil-patidar/.appium] Received non-webdriver request with url /device-farm/api/cliArgs. So, not proxying it to downstream.
[HTTP] <-- GET /device-farm/api/cliArgs 200 4 ms - 1208
[HTTP] Request idempotency key: 33608e0c-f5df-4e7f-8676-92df162855da
[HTTP] --> POST /wd/hub/session {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:adbExecTimeout":60000,"appium:appActivity":"com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/\" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{\"serverIp\": \"xxx.xxx.xxx.xxx\", \"serverPort\": \"7122\"}"","appium:appPackage":"com.abc.android.stage","appium:appWaitForLaunch":false,"appium:autoAcceptAlerts":true,"appium:autoGrantPermissions":true,"appium:automationName":"UIAutomator2","appium:chromeOptions":{"w3c":false},"appium:enableMultiWindows":true,"appium:enableWebviewDetailsCollection":true,"appium:intercept":true,"appium:newCommandTimeout":1200,"appium:noReset":false,"appium:noSign":true,"appium:session-override":"true","appium:skipServerInstallation":false,"appium:uiautomator2ServerInstallTimeout":90000,"appium:uiautomator2ServerLaunchTimeout":90000,"appium:uninstallOtherPackages":"apps.abc.com.mobilerummy.stage, com.abc.r...
[AppiumDriver@43e4] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"appium:adbExecTimeout":60000,"appium:appActivity":"com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{\"serverIp\": \"xxx.xxx.xxx.xxx\", \"serverPort\": \"7122\"}"","appium:appPackage":"com.abc.android.stage","appium:appWaitForLaunch":false,"appium:autoAcceptAlerts":true,"appium:autoGrantPermissions":true,"appium:automationName":"UIAutomator2","appium:chromeOptions":{"w3c":false},"appium:enableMultiWindows":true,"appium:enableWebviewDetailsCollection":true,"appium:intercept":true,"appium:newCommandTimeout":1200,"appium:noReset":false,"appium:noSign":true,"appium:session-override":"true","appium:skipServerInstallation":false,"appium:uiautomator2ServerInstallTimeout":90000,"appium:uiautomator2ServerLaunchTimeout":90000,"appium:uninstallOtherPackages":"apps.abc.com.mobilerummy.stage, com.abc.rummyc...
[AppiumDriver@43e4] Plugins which can handle cmd 'createSession': device-farm,appium-interceptor
[AppiumDriver@43e4] Plugin appium-interceptor is now handling cmd 'createSession'
[AppiumDriver@43e4] Plugin device-farm is now handling cmd 'createSession'
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑ pluginArgs: {"platform":"android","iosDeviceType":"both","androidDeviceType":"both","skipChromeDownload":true,"maxSessions":8,"adbRemote":[],"emulators":[],"simulators":[],"deviceAvailabilityTimeoutMs":300000,"deviceAvailabilityQueryIntervalMs":10000,"sendNodeDevicesToHubIntervalMs":30000,"checkStaleDevicesIntervalMs":30000,"checkBlockedDevicesIntervalMs":30000,"newCommandTimeoutSec":60,"cloud":{"devices":[{"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"P12289001284","platform":"android","pCloudy_DeviceFullName":"P12289001284"}],"cloudName":"pCloudy","url":"http://mydevicelab.com:4723"},"bindHostOrIp":"xxx.xxx.xxx.xxx","enableDashboard":false,"removeDevicesFromDatabaseBeforeRunningThePlugin":false,"remoteConnectionTimeout":60000,"liveStreaming":false,"wdaBundleId":"","preBuildWDAPath":""}
[device-farm-/Users/anil-patidar/.appium] Receiving session request at host: xxx.xxx.xxx.xxx
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑ Creating temporary session capability_id: d0a74a56-8ae2-44d1-8be8-6aed9a6e9de0
[device-farm-/Users/anil-patidar/.appium] Max session count: 8, Busy device count: 0
[device-farm-/Users/anil-patidar/.appium] Waiting for free device. Filter: {"platform":"android","busy":false,"userBlocked":false}}
[device-farm-/Users/anil-patidar/.appium] Updated devices with filter: {"platform":"android","busy":false,"userBlocked":false}
[device-farm-/Users/anil-patidar/.appium] Updated devices with filter: {"platform":"android","busy":false,"userBlocked":false}
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑ Blocking device 8006ae4a-c0e8-42fe-8cba-cd169a1397d3 at host http://mydevicelab.com:4723 for new session
[device-farm-/Users/anil-patidar/.appium] Updating cloud capability for Device
[device-farm-/Users/anil-patidar/.appium] Updating allocated device: "{"userBlocked":false,"offline":false,"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"8006ae4a-c0e8-42fe-8cba-cd169a1397d3","platform":"android","pCloudy_DeviceFullName":"P12289001284","host":"http://mydevicelab.com:4723","busy":false,"deviceType":"real","capability":{"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"P12289001284","platform":"android","pCloudy_DeviceFullName":"P12289001284"},"cloud":"pCloudy","name":"P12289001284","sdk":"dummy","meta":{"revision":0,"created":1721734149952,"version":0},"$loki":1}"
[device-farm-/Users/anil-patidar/.appium] Updated allocated device: "[{"userBlocked":false,"offline":false,"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"8006ae4a-c0e8-42fe-8cba-cd169a1397d3","platform":"android","pCloudy_DeviceFullName":"P12289001284","host":"http://mydevicelab.com:4723","busy":true,"deviceType":"real","capability":{"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"P12289001284","platform":"android","pCloudy_DeviceFullName":"P12289001284"},"cloud":"pCloudy","name":"P12289001284","sdk":"dummy","meta":{"revision":2,"created":1721734149952,"version":0,"updated":1721734177538},"$loki":1,"newCommandTimeout":1200}]"
[device-farm-/Users/anil-patidar/.appium] device.host: http://mydevicelab.com:4723 and pluginArgs.bindHostOrIp: xxx.xxx.xxx.xxx
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑd0a74a56-8ae2-44d1-8be8-6aed9a6e9de0 --- Forwarding session request to http://mydevicelab.com:4723
[device-farm-/Users/anil-patidar/.appium] Creating session with desiredCapabilities: "{"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:adbExecTimeout":60000,"appium:appActivity":"com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{\"serverIp\": \"xxx.xxx.xxx.xxx\", \"serverPort\": \"7122\"}"","appium:appPackage":"com.abc.android.stage","appium:appWaitForLaunch":false,"appium:autoAcceptAlerts":true,"appium:autoGrantPermissions":true,"appium:automationName":"UIAutomator2","appium:chromeOptions":{"w3c":false},"appium:enableMultiWindows":true,"appium:enableWebviewDetailsCollection":true,"appium:intercept":true,"appium:newCommandTimeout":1200,"appium:noReset":false,"appium:noSign":true,"appium:session-override":"true","appium:skipServerInstallation":false,"appium:uiautomator2ServerInstallTimeout":90000,"appium:uiautomator2ServerLaunchTimeout":90000,"appium:uninstallOtherPackages":"apps.abc.com.mobilerummy.stage, com.abc.abc.rummy.stage, apps.abc.com.mobilerummy, com.abc.abc.rummy, com.abc.android.stage, com.myapp.stage, com.abc.abc.fantasycricket, com.pokercircle.android.stage, io.appium.uiautomator2.server, io.appium.uiautomator2.server.test","browserName":"","platformName":"ANDROID","appium:pCloudy_DeviceVersion":"dummy","appium:pCloudy_DeviceManufacturer":"dummy","appium:udid":"P12289001284","appium:platform":"android","appium:pCloudy_DeviceFullName":"P12289001284"},"pendingSessionId":"d0a74a56-8ae2-44d1-8be8-6aed9a6e9de0"}}"
[device-farm-/Users/anil-patidar/.appium] With axios config: "{"method":"post","url":"http://mydevicelab.com:4723/wd/hub/session","timeout":60000,"httpAgent":{"_events":{},"_eventsCount":2,"defaultPort":80,"protocol":"http:","options":{"keepAlive":true,"keepAliveMsecs":60000,"path":null},"requests":{},"sockets":{},"freeSockets":{},"keepAliveMsecs":60000,"keepAlive":true,"maxSockets":null,"maxFreeSockets":256,"scheduling":"lifo","maxTotalSockets":null,"totalSocketCount":0},"httpsAgent":{"_events":{},"_eventsCount":2,"defaultPort":443,"protocol":"https:","options":{"rejectUnauthorized":false,"keepAlive":true,"keepAliveMsecs":60000,"path":null},"requests":{},"sockets":{},"freeSockets":{},"keepAliveMsecs":60000,"keepAlive":true,"maxSockets":null,"maxFreeSockets":256,"scheduling":"lifo","maxTotalSockets":null,"totalSocketCount":0,"maxCachedSessions":100,"_sessionCache":{"map":{},"list":[]}},"headers":{"Content-Type":"application/json"},"data":{"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:adbExecTimeout":60000,"appium:appActivity":"com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{\"serverIp\": \"xxx.xxx.xxx.xxx\", \"serverPort\": \"7122\"}"","appium:appPackage":"com.abc.android.stage","appium:appWaitForLaunch":false,"appium:autoAcceptAlerts":true,"appium:autoGrantPermissions":true,"appium:automationName":"UIAutomator2","appium:chromeOptions":{"w3c":false},"appium:enableMultiWindows":true,"appium:enableWebviewDetailsCollection":true,"appium:intercept":true,"appium:newCommandTimeout":1200,"appium:noReset":false,"appium:noSign":true,"appium:session-override":"true","appium:skipServerInstallation":false,"appium:uiautomator2ServerInstallTimeout":90000,"appium:uiautomator2ServerLaunchTimeout":90000,"appium:uninstallOtherPackages":"apps.abc.com.mobilerummy.stage, com.abc.abc.rummy.stage, apps.abc.com.mobilerummy, com.abc.abc.rummy, com.abc.android.stage, com.myapp.stage, com.abc.abc.fantasycricket, com.pokercircle.android.stage, io.appium.uiautomator2.server, io.appium.uiautomator2.server.test","browserName":"","platformName":"ANDROID","appium:pCloudy_DeviceVersion":"dummy","appium:pCloudy_DeviceManufacturer":"dummy","appium:udid":"P12289001284","appium:platform":"android","appium:pCloudy_DeviceFullName":"P12289001284"},"pendingSessionId":"d0a74a56-8ae2-44d1-8be8-6aed9a6e9de0"}}}"
[device-farm-/Users/anil-patidar/.appium] remote node response {"value":{"capabilities":{"browserName":"","platformName":"ANDROID","adbExecTimeout":60000,"appActivity":"com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{\"serverIp\": \"xxx.xxx.xxx.xxx\", \"serverPort\": \"7122\"}"","appPackage":"com.abc.android.stage","appWaitForLaunch":false,"autoAcceptAlerts":true,"autoGrantPermissions":true,"automationName":"UIAutomator2","chromeOptions":{"w3c":false},"enableMultiWindows":true,"enableWebviewDetailsCollection":true,"intercept":true,"newCommandTimeout":1200,"noReset":false,"noSign":true,"session-override":"true","skipServerInstallation":false,"uiautomator2ServerInstallTimeout":90000,"uiautomator2ServerLaunchTimeout":90000,"uninstallOtherPackages":"apps.abc.com.mobilerummy.stage, com.abc.abc.rummy.stage, apps.abc.com.mobilerummy, com.abc.abc.rummy, com.abc.android.stage, com.myapp.stage, com.abc.abc.fantasycricket, com.pokercircle.android.stage, io.appium.uiautomator2.server, io.appium.uiautomator2.server.test","pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","platform":"LINUX","pCloudy_DeviceFullName":"P12289001284","udid":"P12289001284","systemPort":59180,"chromeDriverPort":59181,"adbPort":5037,"mjpegServerPort":59182,"webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"","platformName":"ANDROID","adbExecTimeout":60000,"appActivity":"com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{\"serverIp\": \"xxx.xxx.xxx.xxx\", \"serverPort\": \"7122\"}"","appPackage":"com.abc.android.stage","appWaitForLaunch":false,"autoAcceptAlerts":true,"autoGrantPermissions":true,"automationName":"UIAutomator2","chromeOptions":{"w3c":false},"enableMultiWindows":true,"enableWebviewDetailsCollection":true,"intercept":true,"newCommandTimeout":1200,"noReset":false,"noSign":true,"session-override":"true","skipServerInstallation":false,"uiautomator2ServerInstallTimeout":90000,"uiautomator2ServerLaunchTimeout":90000,"uninstallOtherPackages":"apps.abc.com.mobilerummy.stage, com.abc.abc.rummy.stage, apps.abc.com.mobilerummy, com.abc.abc.rummy, com.abc.android.stage, com.myapp.stage, com.abc.abc.fantasycricket, com.pokercircle.android.stage, io.appium.uiautomator2.server, io.appium.uiautomator2.server.test","pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","platform":"android","pCloudy_DeviceFullName":"P12289001284","udid":"P12289001284","systemPort":59180,"chromeDriverPort":59181,"adbPort":5037,"mjpegServerPort":59182},"deviceName":"P12289001284","deviceUDID":"P12289001284","pixelRatio":"2.625","statBarHeight":136,"viewportRect":{"left":0,"top":136,"width":1080,"height":2264},"deviceApiLevel":33,"platformVersion":"13","deviceManufacturer":"Nothing","deviceModel":"A063","deviceScreenSize":"1080x2400","deviceScreenDensity":420},"sessionId":"8b3eb6d1-a9c0-4e07-a2c1-7cd0b5b0a2e5"}}
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑ Session received with details: {"value":{"capabilities":{"browserName":"","platformName":"ANDROID","adbExecTimeout":60000,"appActivity":"com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{\"serverIp\": \"xxx.xxx.xxx.xxx\", \"serverPort\": \"7122\"}"","appPackage":"com.abc.android.stage","appWaitForLaunch":false,"autoAcceptAlerts":true,"autoGrantPermissions":true,"automationName":"UIAutomator2","chromeOptions":{"w3c":false},"enableMultiWindows":true,"enableWebviewDetailsCollection":true,"intercept":true,"newCommandTimeout":1200,"noReset":false,"noSign":true,"session-override":"true","skipServerInstallation":false,"uiautomator2ServerInstallTimeout":90000,"uiautomator2ServerLaunchTimeout":90000,"uninstallOtherPackages":"apps.abc.com.mobilerummy.stage, com.abc.abc.rummy.stage, apps.abc.com.mobilerummy, com.abc.abc.rummy, com.abc.android.stage, com.myapp.stage, com.abc.abc.fantasycricket, com.pokercircle.android.stage, io.appium.uiautomator2.server, io.appium.uiautomator2.server.test","pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","platform":"LINUX","pCloudy_DeviceFullName":"P12289001284","udid":"P12289001284","systemPort":59180,"chromeDriverPort":59181,"adbPort":5037,"mjpegServerPort":59182,"webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"","platformName":"ANDROID","adbExecTimeout":60000,"appActivity":"com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{\"serverIp\": \"xxx.xxx.xxx.xxx\", \"serverPort\": \"7122\"}"","appPackage":"com.abc.android.stage","appWaitForLaunch":false,"autoAcceptAlerts":true,"autoGrantPermissions":true,"automationName":"UIAutomator2","chromeOptions":{"w3c":false},"enableMultiWindows":true,"enableWebviewDetailsCollection":true,"intercept":true,"newCommandTimeout":1200,"noReset":false,"noSign":true,"session-override":"true","skipServerInstallation":false,"uiautomator2ServerInstallTimeout":90000,"uiautomator2ServerLaunchTimeout":90000,"uninstallOtherPackages":"apps.abc.com.mobilerummy.stage, com.abc.abc.rummy.stage, apps.abc.com.mobilerummy, com.abc.abc.rummy, com.abc.android.stage, com.myapp.stage, com.abc.abc.fantasycricket, com.pokercircle.android.stage, io.appium.uiautomator2.server, io.appium.uiautomator2.server.test","pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","platform":"android","pCloudy_DeviceFullName":"P12289001284","udid":"P12289001284","systemPort":59180,"chromeDriverPort":59181,"adbPort":5037,"mjpegServerPort":59182},"deviceName":"P12289001284","deviceUDID":"P12289001284","pixelRatio":"2.625","statBarHeight":136,"viewportRect":{"left":0,"top":136,"width":1080,"height":2264},"deviceApiLevel":33,"platformVersion":"13","deviceManufacturer":"Nothing","deviceModel":"A063","deviceScreenSize":"1080x2400","deviceScreenDensity":420},"sessionId":"8b3eb6d1-a9c0-4e07-a2c1-7cd0b5b0a2e5"}}
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑ d0a74a56-8ae2-44d1-8be8-6aed9a6e9de0 Session response: {"protocol":"W3C","value":["8b3eb6d1-a9c0-4e07-a2c1-7cd0b5b0a2e5",{"browserName":"","platformName":"ANDROID","adbExecTimeout":60000,"appActivity":"com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{\"serverIp\": \"xxx.xxx.xxx.xxx\", \"serverPort\": \"7122\"}"","appPackage":"com.abc.android.stage","appWaitForLaunch":false,"autoAcceptAlerts":true,"autoGrantPermissions":true,"automationName":"UIAutomator2","chromeOptions":{"w3c":false},"enableMultiWindows":true,"enableWebviewDetailsCollection":true,"intercept":true,"newCommandTimeout":1200,"noReset":false,"noSign":true,"session-override":"true","skipServerInstallation":false,"uiautomator2ServerInstallTimeout":90000,"uiautomator2ServerLaunchTimeout":90000,"uninstallOtherPackages":"apps.abc.com.mobilerummy.stage, com.abc.abc.rummy.stage, apps.abc.com.mobilerummy, com.abc.abc.rummy, com.abc.android.stage, com.myapp.stage, com.abc.abc.fantasycricket, com.pokercircle.android.stage, io.appium.uiautomator2.server, io.appium.uiautomator2.server.test","pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","platform":"LINUX","pCloudy_DeviceFullName":"P12289001284","udid":"P12289001284","systemPort":59180,"chromeDriverPort":59181,"adbPort":5037,"mjpegServerPort":59182,"webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"browserName":"","platformName":"ANDROID","adbExecTimeout":60000,"appActivity":"com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{\"serverIp\": \"xxx.xxx.xxx.xxx\", \"serverPort\": \"7122\"}"","appPackage":"com.abc.android.stage","appWaitForLaunch":false,"autoAcceptAlerts":true,"autoGrantPermissions":true,"automationName":"UIAutomator2","chromeOptions":{"w3c":false},"enableMultiWindows":true,"enableWebviewDetailsCollection":true,"intercept":true,"newCommandTimeout":1200,"noReset":false,"noSign":true,"session-override":"true","skipServerInstallation":false,"uiautomator2ServerInstallTimeout":90000,"uiautomator2ServerLaunchTimeout":90000,"uninstallOtherPackages":"apps.abc.com.mobilerummy.stage, com.abc.abc.rummy.stage, apps.abc.com.mobilerummy, com.abc.abc.rummy, com.abc.android.stage, com.myapp.stage, com.abc.abc.fantasycricket, com.pokercircle.android.stage, io.appium.uiautomator2.server, io.appium.uiautomator2.server.test","pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","platform":"android","pCloudy_DeviceFullName":"P12289001284","udid":"P12289001284","systemPort":59180,"chromeDriverPort":59181,"adbPort":5037,"mjpegServerPort":59182},"deviceName":"P12289001284","deviceUDID":"P12289001284","pixelRatio":"2.625","statBarHeight":136,"viewportRect":{"left":0,"top":136,"width":1080,"height":2264},"deviceApiLevel":33,"platformVersion":"13","deviceManufacturer":"Nothing","deviceModel":"A063","deviceScreenSize":"1080x2400","deviceScreenDensity":420},"W3C"]}
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑ Removing pending session with capability_id: d0a74a56-8ae2-44d1-8be8-6aed9a6e9de0
[device-farm-/Users/anil-patidar/.appium] d0a74a56-8ae2-44d1-8be8-6aed9a6e9de0 ๐Ÿ“ฑ Session response is CreateSessionResponseInternal
[device-farm-/Users/anil-patidar/.appium] ๐Ÿ“ฑ d0a74a56-8ae2-44d1-8be8-6aed9a6e9de0 ----- Device UDID 8006ae4a-c0e8-42fe-8cba-cd169a1397d3 blocked for session 8b3eb6d1-a9c0-4e07-a2c1-7cd0b5b0a2e5
[device-farm-/Users/anil-patidar/.appium] Updating allocated device: "{"userBlocked":false,"offline":false,"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"8006ae4a-c0e8-42fe-8cba-cd169a1397d3","platform":"android","pCloudy_DeviceFullName":"P12289001284","host":"http://mydevicelab.com:4723","busy":false,"deviceType":"real","capability":{"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"P12289001284","platform":"android","pCloudy_DeviceFullName":"P12289001284"},"cloud":"pCloudy","name":"P12289001284","sdk":"dummy","meta":{"revision":0,"created":1721734149952,"version":0},"$loki":1}"
[device-farm-/Users/anil-patidar/.appium] Updated allocated device: "[{"userBlocked":false,"offline":false,"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"8006ae4a-c0e8-42fe-8cba-cd169a1397d3","platform":"android","pCloudy_DeviceFullName":"P12289001284","host":"http://mydevicelab.com:4723","busy":true,"deviceType":"real","capability":{"pCloudy_DeviceVersion":"dummy","pCloudy_DeviceManufacturer":"dummy","udid":"P12289001284","platform":"android","pCloudy_DeviceFullName":"P12289001284"},"cloud":"pCloudy","name":"P12289001284","sdk":"dummy","meta":{"revision":3,"created":1721734149952,"version":0,"updated":1721734183160},"$loki":1,"newCommandTimeout":1200,"session_id":"8b3eb6d1-a9c0-4e07-a2c1-7cd0b5b0a2e5","lastCmdExecutedAt":1721734183159,"sessionStartTime":1721734183159}]"
[device-farm-/Users/anil-patidar/.appium] Creating remote proxy for session 8b3eb6d1-a9c0-4e07-a2c1-7cd0b5b0a2e5 to http://mydevicelab.com:4723
[device-farm-/Users/anil-patidar/.appium] Skipping dashboard report
[device-farm-/Users/anil-patidar/.appium] Not adding the session 8b3eb6d1-a9c0-4e07-a2c1-7cd0b5b0a2e5 with type cloud to session map
[device-farm-/Users/anil-patidar/.appium] d0a74a56-8ae2-44d1-8be8-6aed9a6e9de0 ๐Ÿ“ฑ Updating Device 8006ae4a-c0e8-42fe-8cba-cd169a1397d3 with session ID 8b3eb6d1-a9c0-4e07-a2c1-7cd0b5b0a2e5
[AppiumDriver@43e4] Command 'createSession' was not handled by the following behaviours or plugins, even though they were registered to handle it: ["default"]. The command was handled by these: ["device-farm","appium-interceptor"].
[AppiumDriver@43e4] Encountered internal error running command: Error: Error getting device property "ro.build.characteristics" for P12289001284: Cannot read properties of undefined (reading 'adbExec')
at /Users/anil-patidar/.appium/node_modules/appium-interceptor/src/utils/adb.ts:19:11
at Generator.throw ()
at rejected (/Users/anil-patidar/.appium/node_modules/appium-interceptor/lib/utils/adb.js:6:65)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[HTTP] <-- POST /wd/hub/session 500 5698 ms - 913
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: An unknown server-side error occurred while processing the command. Original error: Error getting device property "ro.build.characteristics" for P12289001284: Cannot read properties of undefined (reading 'adbExec')
Host info: host: 'AnilPatidar-wifi.blr.abc.com', ip: 'fe80:0:0:0:1a:86bb:32c9:18d6%en0'
Build info: version: '4.14.1', revision: '03f8ede370'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '11.2', java.version: '11.0.11'
Driver info: io.appium.java_client.android.AndroidDriver
Command: [null, newSession {capabilities=[{appium:adbExecTimeout=60000, appium:appActivity=com.myapp.stage.deeplinkActivity -e "setup_string" "https://docker-ab3evo.fickle.abc.com/" -e "build_mode" "BUILD_WITH_URL" -e pocoEnvData "{"serverIp": "xxx.xxx.xxx.xxx", "serverPort": "7122"}", appium:appPackage=com.abc.android.stage, appium:appWaitForLaunch=false, appium:chromeOptions={"w3c":false}, appium:intercept=true, appium:autoAcceptAlerts=true, appium:autoGrantPermissions=true, appium:automationName=UIAutomator2, browserName=, appium:enableMultiWindows=true, appium:enableWebviewDetailsCollection=true, appium:newCommandTimeout=1200, appium:noReset=false, appium:noSign=true, platformName=ANDROID, appium:session-override=true, appium:skipServerInstallation=false, appium:uiautomator2ServerInstallTimeout=90000, appium:uiautomator2ServerLaunchTimeout=90000, appium:uninstallOtherPackages=apps.abc.com.mobilerummy.stage, com.abc.abc.rummy.stage, apps.abc.com.mobilerummy, com.abc.abc.rummy, com.abc.android.stage, com.myapp.stage, com.abc.abc.fantasycricket, com.pokercircle.android.stage, io.appium.uiautomator2.server, io.appium.uiautomator2.server.test}], desiredCapabilities=Capabilities {adbExecTimeout: 60000, appActivity: com.abc.coregame.comm..., appPackage: com.abc.android.stage, appWaitForLaunch: false, appium:chromeOptions: {"w3c":false}, appium:intercept: true, autoAcceptAlerts: true, autoGrantPermissions: true, automationName: UIAutomator2, browserName: , enableMultiWindows: true, enableWebviewDetailsCollection: true, newCommandTimeout: 1200, noReset: false, noSign: true, platformName: ANDROID, session-override: true, skipServerInstallation: false, uiautomator2ServerInstallTimeout: 90000, uiautomator2ServerLaunchTimeout: 90000, uninstallOtherPackages: apps.abc.com.mobile...}}]
Capabilities {adbExecTimeout: 60000, appActivity: com.abc.coregame.comm..., appPackage: com.abc.android.stage, appWaitForLaunch: false, appium:chromeOptions: {"w3c":false}, appium:intercept: true, autoAcceptAlerts: true, autoGrantPermissions: true, automationName: UIAutomator2, browserName: , enableMultiWindows: true, enableWebviewDetailsCollection: true, newCommandTimeout: 1200, noReset: false, noSign: true, platformName: ANDROID, session-override: true, skipServerInstallation: false, uiautomator2ServerInstallTimeout: 90000, uiautomator2ServerLaunchTimeout: 90000, uninstallOtherPackages: apps.abc.com.mobile...}
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:140)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:133)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:102)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:177)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:238)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:602)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:268)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:163)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:90)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:102)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:109)
at com.appium.manager.AppiumDriverManager.createAppiumDriver(AppiumDriverManager.java:66)
at com.appium.manager.AppiumDriverManager.initialiseDriver(AppiumDriverManager.java:52)
at com.appium.manager.AppiumDriverManager.startAppiumDriverInstance(AppiumDriverManager.java:104)
at com.appium.manager.AppiumDriverManager.startAppiumDriverInstance(AppiumDriverManager.java:89)
at com.appium.manager.AppiumParallelMethodTestListener.allocateDeviceAndStartDriver(AppiumParallelMethodTestListener.java:101)
at com.appium.manager.AppiumParallelMethodTestListener.beforeInvocation(AppiumParallelMethodTestListener.java:74)
at org.testng.internal.invokers.InvokedMethodListenerInvoker.invokeListener(InvokedMethodListenerInvoker.java:55)
at org.testng.internal.invokers.BaseInvoker.runInvokedMethodListeners(BaseInvoker.java:67)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:641)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:220)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:945)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:193)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
FAILED: validateUserIsAbleToSyncContactsAndSeeingGlobalLocalFollowSuggestions(validateUserIsAbleToSyncContactsAndSeeingGlobalLocalFollowSuggestions: Wrong number of arguments were passed by the Data Provider: found 1 but expected 0)
java.lang.NullPointerException
at com.abc.e2e.core.utils.devices.DeviceFarmExecutor.getIPAddressOfDevice(DeviceFarmExecutor.java:330)
at com.abc.e2e.tests.BaseTest.getDeviceIp(BaseTest.java:298)
at com.abc.e2e.tests.BaseTest.run(BaseTest.java:66)
at org.testng.internal.invokers.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:266)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:665)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:220)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:945)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:193)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)

===============================================
regression
Tests run: 1, Failures: 1, Skips: 0

Error: Android 14 CA certifcate installed testing connection fails

Describe the issue
After manually copying and installing CA certificate on Android Emulator. And running this command appium plugin run appium-interceptor test-connection.
I am getting
image
but on the emulator I am getting this

How do we solve this ?

Device Information
OS: Android
Version: API 34 (Android 14)
Device: Pixel 7 Pro

Error installing Appium-interceptor-plugin through commandline

Command used to install plugin: appium plugin install --source=npm appium-interceptor-plugin
Machine Apple Macbook(Intel i9)
Output
Error: npm command 'info appium-interceptor-plugin peerDependencies dependencies --json' failed with code 1.

STDOUT:
{
"error": {
"code": "E404",
"summary": "Not Found - GET https://registry.npmjs.org/appium-interceptor-plugin - Not found",
"detail": "\n 'appium-interceptor-plugin@*' is not in this registry.\n\nNote that you can also install from a\ntarball, folder, http url, or git url."
}
}

STDERR:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/appium-interceptor-plugin - Not found
npm ERR! 404
npm ERR! 404 'appium-interceptor-plugin@*' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: /Users/{username}/.npm/_logs/2024-01-08T09_54_15_622Z-debug-0.log

It looks like plugin is not available on global registry

Error(Android): Invalid agrument: Did not receive an appropriate execute method parameters object. It needs to be deserializable as a plain JS object

Describe the issue
Mocking request using below code

await driver.execute("interceptor: addMock", [
      {
        config: {
          url: "https://domain/sms/sendOTP",
          method: "POST",
          responseBody: JSON.stringify({
            success: true,
            message: "OTP sent successfully",
          }),
        },
      },
    ]);

results in this error on Appium server logs
invalid argument: Did not receive an appropriate execute method parameters object. It needs to be deserializable as a plain JS object

This also happens if we pass an empty object or the example code in the commands sections

 const authorizationMock = await driver.execute("interceptor: addMock", [{
    config: {
        url: "**/reqres.in/**",
        headers: {
            "Authorization" : "Bearer bearertoken"
        }
    }
 }]);

Device Information
OS: Android
Version: API 34 (Android 14)
Device: Pixel 7 Pro

appium-interceptor test connection script got failed

Prerequisites:
Appium Version: 2.4.1
Npm Version: 10.2.4
Apple Macbook Intel(i9)
Steps to Reproduce
a) Install appium inspector plugin
appium plugin install --source=npm appium-interceptor
Screenshot 2024-01-08 at 18 59 30
b) Now download ca certificate from here and install it on device
Screenshot 2024-01-08 at 19 01 20
Note: Make sure certificate is trusted
c) Now test the connection with following command
appium plugin run appium-interceptor test-connection
Screenshot 2024-01-08 at 19 02 43
d) Observe that test connection script is getting failed

Java Mock Example not working

`             JSONObject customObject = new JSONObject();
                customObject.put("url","/api/users?.*");
                customObject.put("responseBody","{\n" +
                        "  \"page\": 2,\n" +
                        "  \"per_page\": 6,\n" +
                        "  \"total\": 12,\n" +
                        "  \"total_pages\": 2,\n" +
                        "  \"data\": [\n" +
                        "    {\n" +
                        "      \"id\": 7,\n" +
                        "      \"email\": \"[email protected]\",\n" +
                        "      \"first_name\": \"Michael\",\n" +
                        "      \"last_name\": \"Lawson\",\n" +
                        "      \"avatar\": \"https://reqres.in/img/faces/7-image.jpg\"\n" +
                        "    }\n" +
                        "  ]\n" +
                        "}");
                JSONObject parentJson = new JSONObject();
                parentJson.put("config", customObject);
                ((JavascriptExecutor)DriverManager.getDriver()).executeScript("interceptor: addMock",new JSONObject(parentJson));
`

Using the exact same java code provided in the example, I'm getting
java.lang.IllegalArgumentException: Argument is of an illegal type: org.json.JSONObject at org.openqa.selenium.remote.internal.WebElementToJsonConverter.apply(WebElementToJsonConverter.java:83)

getting ssl certification error even though cert is installed

[AndroidUiautomator2Driver@e7f0 (d1d1af34)] Calling AppiumDriver.execute() with args: ["interceptor: stopListening",[],"d1d1af34-0f41-4d97-b37a-e173e66e1700"]
[AppiumDriver@8e3b] Clearing new command timeout pre-emptively since plugin(s) will handle this command
[AppiumDriver@8e3b] Plugins which can handle cmd 'execute': appium-interceptor
[AppiumDriver@8e3b] Plugin appium-interceptor is now handling cmd 'execute'
[AppiumInterceptorPlugin] Stopping listener with id: undefined
[AppiumDriver@8e3b] Command 'execute' was not handled by the following behaviours or plugins, even though they were registered to handle it: ["default"]. The command was handled by these: ["appium-interceptor"].
[AppiumDriver@8e3b] Restarting new command timeout via umbrella driver since plugin did not allow default handler to execute
[AndroidUiautomator2Driver@e7f0 (d1d1af34)] Responding to client with driver.execute() result: []
[HTTP] <-- POST /session/d1d1af34-0f41-4d97-b37a-e173e66e1700/execute/sync 200 3 ms - 12
[HTTP]
creating SNI context for www.google.com
HTTPS_CLIENT_ERROR
[Error: C07A8E0402000000:error:0A000416:SSL routines:ssl3_read_bytes:ssl/tls alert certificate unknown:ssl/record/rec_layer_s3.c:907:SSL alert number 46
] {
library: 'SSL routines',
reason: 'ssl/tls alert certificate unknown',
code: 'ERR_SSL_SSL/TLS_ALERT_CERTIFICATE_UNKNOWN'
}
[AppiumInterceptorPlugin] HTTPS_CLIENT_ERROR: Error: C07A8E0402000000:error:0A000416:SSL routines:ssl3_read_bytes:ssl/tls alert certificate unknown:ssl/record/rec_layer_s3.c:907:SSL alert number 46
[AppiumInterceptorPlugin]
HTTPS_CLIENT_ERROR
[Error: C07A8E0402000000:error:0A000416:SSL routines:ssl3_read_bytes:ssl/tls alert certificate unknown:ssl/record/rec_layer_s3.c:907:SSL alert number 46
] {
library: 'SSL routines',
reason: 'ssl/tls alert certificate unknown',
code: 'ERR_SSL_SSL/TLS_ALERT_CERTIFICATE_UNKNOWN'
}
[AppiumInterceptorPlugin] HTTPS_CLIENT_ERROR: Error: C07A8E0402000000:error:0A000416:SSL routines:ssl3_read_bytes:ssl/tls alert certificate unknown:ssl/record/rec_layer_s3.c:907:SSL alert number 46
[AppiumInterceptorPlugin]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.