Understanding Appium Inspector log - appium

I am starting to use Appium and I am trying to open up the simulated device. However, I do not understand this message. It starts getting looped again and again. What am I missing for this one?
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' appium/build/lib/main.js --debug-log-spacing --automation-name "Appium" --platform-name "Android" --platform-version "5.1" --app "/Users/wangeltamang/Downloads/AUT.apk" --avd "Nexus_S_API_19"
[Appium] Welcome to Appium v1.5.3
[Appium] Non-default server args:
[Appium] debugLogSpacing: true
[Appium] platformName: 'Android'
[Appium] platformVersion: '5.1'
[Appium] automationName: 'Appium'
[Appium] app: '/Users/wangeltamang/Downloads/AUT.apk'
[Appium] avd: 'Nexus_S_API_19'
[Appium] Deprecated server args:
[Appium] --platform-name => --default-capabilities '{"platformName":"Android"}'
[Appium] --platform-version => --default-capabilities '{"platformVersion":"5.1"}'
[Appium] --automation-name => --default-capabilities '{"automationName":"Appium"}'
[Appium] --app => --default-capabilities '{"app":"/Users/wangeltamang/Downloads/AUT.apk"}'
[Appium] --avd => --default-capabilities '{"avd":"Nexus_S_API_19"}'
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] platformName: 'Android'
[Appium] platformVersion: '5.1'
[Appium] automationName: 'Appium'
[Appium] app: '/Users/wangeltamang/Downloads/AUT.apk'
[Appium] avd: 'Nexus_S_API_19'
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...

This part of the log is showing Appium being launched. It starts off with showing the used command, then moves on to show the DesiredCapabilities for your launch.
Launching Appium with command: '/Applications/Appium.app/Contents/Resources/node/bin/node' appium/build/lib/main.js --debug-log-spacing --automation-name "Appium" --platform-name "Android" --platform-version "5.1" --app "/Users/wangeltamang/Downloads/AUT.apk" --avd "Nexus_S_API_19"
[Appium] Welcome to Appium v1.5.3
[Appium] Non-default server args:
[Appium] debugLogSpacing: true
[Appium] platformName: 'Android'
[Appium] platformVersion: '5.1'
[Appium] automationName: 'Appium'
[Appium] app: '/Users/wangeltamang/Downloads/AUT.apk'
[Appium] avd: 'Nexus_S_API_19'
[Appium] Deprecated server args:
[Appium] --platform-name => --default-capabilities '{"platformName":"Android"}'
[Appium] --platform-version => --default-capabilities '{"platformVersion":"5.1"}'
[Appium] --automation-name => --default-capabilities '{"automationName":"Appium"}'
Below that you can see the GET command to check for the server status, as well as the response from the command (which is the section that's looping).
[HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []
[MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.5.3"...

Also you should know about response codes in appium logs like
0 for success
7 NoSuchElement etc.
https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol
After reading this webpage you will be able to easily understand appium logs

I am assuming that you are working with the GUI from the format of you appium log.
Make sure you select the "Prelaunch Application" in the General Settings
See screenshot

Related

Webdriver io cucumber test fails to run with invalid argument error

I am new to webdriver io. I ran my cucumber test and it fails with this error
`[0-0] 2023-02-14T21:47:36.064Z WARN webdriver: Request failed with status 400 due to invalid argument: unrecognized capability: pollTimeout
[0-0] 2023-02-14T21:47:36.065Z INFO webdriver: Retrying 1/3
[0-0] 2023-02-14T21:47:36.066Z INFO webdriver: [POST] http://localhost:9515/session
[0-0] 2023-02-14T21:47:36.066Z INFO webdriver: DATA {
[0-0] capabilities: {
[0-0] alwaysMatch: {
[0-0] browserName: 'chrome',
[0-0] acceptInsecureCerts: true,
[0-0] pollTimeout: 10000
[0-0] },
[0-0] firstMatch: [ {} ]
[0-0] },
[0-0] desiredCapabilities: {
[0-0] browserName: 'chrome',
[0-0] acceptInsecureCerts: true,
[0-0] pollTimeout: 10000
[0-0] }
[0-0] }`
Any suggesion on how i can resolve this please?
i tried to comment out waitforTimeout: 10000, in wdio.config.js but it doesnt solve the problem
I solved the problem for myself. I uninstall node and install them with brew to the next version (19.6.0).
After that - 500. Because, chromedriver don`t support Chrome. After that, I updated Google chrome and everything worked.
I install new node version and re-init the wdio, now it work.

fluentbit to signalfx: could not connect to localhost:8095

I'm trying to convert logs and ingest to signalfx as metrics. I'm using the fluent-bit internal http plugin to send to a locally installed signalfx agent. Installation of both fluent-bit and signalfx is successfull. i'm able to see the docker containers.
But while sending the logs from fluent-bit to the exposed signalfx endpoint 8095. it is not able to find the host.
Error:
[net] could not connect to localhost:8095
signalfx-processor | [2022/09/01 11:47:59] [debug] [net] could not connect to localhost:8095
signalfx-processor | [2022/09/01 11:47:59] [debug] [task] destroy task=0x7fa02603d690 (task_id=2)
signalfx-processor | [2022/09/01 11:47:59] [debug] [upstream] connection #-1 failed to localhost:8095
signalfx-processor | [2022/09/01 11:47:59] [debug] [upstream] connection #-1 failed to localhost:8095
signalfx-processor | [2022/09/01 11:47:59] [debug] [task] task_id=1 reached retry-attempts limit 1/1
signalfx-processor | [2022/09/01 11:47:59] [error] [output:http:http.0] no upstream connections available to localhost:8095
signalfx-processor | [2022/09/01 11:47:59] [error] [output:http:http.0] no upstream connections available to localhost:8095
could not connect to localhost:8095
docker compose file
version: '3.7'
services:
signalfx-agent:
image: quay.io/signalfx/signalfx-agent:5
ports:
- "8095:8095"
- "9080:9080"
volumes:
- /:/hostfs:ro
- ./etc/signalfx:/etc/signalfx:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: always
fluent-bit:
image: fluent/fluent-bit:1.9-debug
user: root
depends_on:
- signalfx-agent
volumes:
- $PWD/fluentd/nginx.log:/nginx-access.log
- $PWD/fluentd:/fluent-bit/etc
container_name: signalfx-processor
restart: always
I hope this is something to do with docker network setup. Any help will be really helpful.
Thanks in advance

Very slow Appium execution in Azure Pipelines

WebdriverIO Use
wdio.conf.js
maxInstances: 1,
capabilities: [{
platformName: 'iOS',
noReset: true,
fullReset: false,
maxInstances: 1,
automationName: 'XCUITest',
deviceName: 'iPhone 11',
platformVersion: '14.5',
app: path.resolve(`. /{app}.zip`),
}],
waitforTimeout: 10000,
connectionRetryTimeout: 50000,
connectionRetryCount: 6,
services: [
'appium'.
],
appium: {
command: 'appium',
args: {},
},
port: 4723,
path: '/wd/hub',
azure-pipelines.yml
- script: |
npm install -g appium
appium &.
sudo xcode-select -s /Applications/Xcode_12.5.app/Contents/Developer
xcrun simctl list
After running the test, it takes about 10 minutes before the test actually starts.
Why is this?

Running Electron with webdriverio throws chrome not reachable

Has anyone tried working with electron and webdriverio? I am using the latest electron 16 version with "wdio-chromedriver-service": "^7.2.2" and chromedriver "96.0.0" version. I am getting the following error:
$ npx wdio run ./wdio.conf.js --spec welcome-test.e2e.js
Execution of 1 workers started at 2021-11-30T11:14:38.431Z
2021-11-30T11:14:38.516Z INFO #wdio/cli:launcher: Run onPrepare hook
2021-11-30T11:14:38.517Z INFO chromedriver: Start Chromedriver (C:\Projects\abc\node_modules\chromedriver\lib\chromedriver\chromedriver.exe) with args --silent --port=9515 --url-base=/
2021-11-30T11:14:38.652Z INFO #wdio/cli:launcher: Run onWorkerStart hook
2021-11-30T11:14:38.657Z INFO #wdio/local-runner: Start worker 0-0 with arg: run,./wdio.conf.js,--spec,welcome-test.e2e.js
[0-0] 2021-11-30T11:14:39.340Z INFO #wdio/local-runner: Run worker command: run
[0-0] RUNNING in chrome - C:\Projects\abc\test\specs\welcome-test.e2e.js
[0-0] 2021-11-30T11:14:40.069Z INFO webdriver: Initiate new session using the WebDriver protocol
[0-0] 2021-11-30T11:14:40.136Z INFO webdriver: [POST] http://localhost:9515/session
[0-0] 2021-11-30T11:14:40.137Z INFO webdriver: DATA {
[0-0] capabilities: {
[0-0] alwaysMatch: {
[0-0] browserName: 'chrome',
[0-0] acceptInsecureCerts: true,
[0-0] 'goog:chromeOptions': [Object]
[0-0] },
[0-0] firstMatch: [ {} ]
[0-0] },
[0-0] desiredCapabilities: {
[0-0] browserName: 'chrome',
[0-0] acceptInsecureCerts: true,
[0-0] 'goog:chromeOptions': {
[0-0] binary: 'C:/Projects/abc/node_modules/electron/dist/electron.exe',
[0-0] args: [Array]
[0-0] }
[0-0] }
[0-0] }
[0-0] 2021-11-30T11:14:45.557Z WARN webdriver: Request failed with status 500 due to unknown error: Chrome failed to start: exited normally.
[0-0] (chrome not reachable)
[0-0] (The process started from chrome location C:/Projects/abc/node_modules/electron/dist/electron.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
My wdio.conf.js file look like this:
capabilities: [{
// maxInstances can get overwritten per capability. So if you have an in-house Selenium
// grid with only 5 firefox instances available you can make sure that not more than
// 5 instances get started at a time.
maxInstances: 1,
browserName: 'chrome',
acceptInsecureCerts: true,
'goog:chromeOptions': {
binary: 'C:/Projects/abc/node_modules/electron/dist/electron.exe', // Path to your Electron binary.
args: ['app=C:/Projects/abc', '--no-sandbox', '--headless'], // Optional, perhaps 'app=' + /path/to/your/app/
},
// If outputDir is provided WebdriverIO can capture driver session logs
// it is possible to configure which logTypes to include/exclude.
// excludeDriverLogs: ['*'], // pass '*' to exclude all driver session logs
// excludeDriverLogs: ['bugreport', 'server'],
}],
Any help is appreciated.

selenium with behat : Unable to find provider for session

So I'm trying to configure selenium in a docker container, to use with behat, and the hub has the status not ready when I reach http://localhost:4444/status :
{
"value": {
"ready": false,
"message": "Selenium Grid not ready.",
"nodes": [
{
"id": "f746de23-58e4-499d-85fd-9bad4f904488",
"uri": "http:\u002f\u002f172.22.0.5:5555",
"maxSessions": 2,
"stereotypes": [
{
"capabilities": {
"browserName": "chrome"
},
"count": 2
}
],
"sessions": [
]
}
]
}
}
And when I run the tests :
Could not open connection: Payload received from webdriver is valid but unexpected json: {
"value": {
"error": "session not created",
"message": "Unable to find provider for session: Capabilities {browser: firefox, browserName: chrome, ignoreZoomSetting: false, name: Behat feature suite, tags: [509f70556c1c, PHP 7.4.9]}, Capabilities {browserName: chrome}, Capabilities {browserName: firefox}, Capabilities {}\nBuild info: version: '4.0.0-alpha-7', revision: '117b9d61c9'\nSystem info: host: '7f39dcd595c7', ip: '172.22.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.76-linuxkit', java.version: '1.8.0_265'\nDriver info: driver.version: unknown",
"stacktrace": "org.openqa.selenium.SessionNotCreatedException: Unable to find provider for session: Capabilities {browser: firefox, browserName: chrome, ignoreZoomSetting: false, name: Behat feature suite, tags: [509f70556c1c, PHP 7.4.9]}, Capabilities {browserName: chrome}, Capabilities {browserName: firefox}, Capabilities {}\nBuild info: version: '4.0.0-alpha-7', revision: '117b9d61c9'\nSystem info: host: '7 (Behat\Mink\Exception\DriverException)
I tried many configuration, mostly in the wd_host param in behat.yml, but everything I tried (different url, different port...) brought me errors.
My docker-composer.yml:
version: '3'
services:
chrome:
image: selenium/node-chrome:4.0.0-alpha-7-prerelease-20200907
volumes:
- /dev/shm:/dev/shm
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
ports:
- "6900:5900"
selenium-hub:
image: selenium/hub:4.0.0-alpha-7-prerelease-20200907
container_name: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"
restart: always
My behat.yml:
extensions:
Behat\MinkExtension:
base_url: "http://localhost"
browser_name: 'chrome'
sessions:
my_session:
selenium2:
wd_host: "http://selenium-hub:4444"
browser: chrome
capabilities: { "browserName": "chrome"}
FriendsOfBehat\SymfonyExtension: null
For a moment I thought it was related to the "capabilities" parameter so I tried to put things in it but it didn't change anything, and I guess if it was just that, the hub would still tell me that it is ready.
Any idea ? Thank you
I made it work with a previous version the the image of chrome selenium/node-chrome:3.141.59-oxygen .
And I had to change the base_url in behat.yml for the container "url" of my webserver. (http://nginx is my case)

Resources