appium / appium-flutter-driver

Appium Flutter Driver is a test automation tool for Flutter apps on multiple platforms/OSes. Appium Flutter Driver is part of the Appium mobile test automation tool maintained by community
MIT License
463 stars 184 forks source link

Original error: Cannot read property 'match' of undefined #248

Closed Muratoi closed 2 years ago

Muratoi commented 2 years ago

image

image

Can somebody help me with that?

Appium Version: 1.22.0

Same at Appium 2.0

camillomurcia commented 2 years ago

You already tried it by sending the ID obtained with the adb devices command and you place that ID in deviceName

Also in automationName put Flutter With the first letter Mayus.

Also check in the app that at the beginning you have an r and also try not to have spaces in the routes image

Muratoi commented 2 years ago

@camillomurcia I have the same error with your instruction :( without the r, in python backslashes are treated as escape characters

Muratoi commented 2 years ago

image

camillomurcia commented 2 years ago

@Muratoi Cannot read property 'match' of undefined occurs when appium-flutter-driver failed to find a device. restarting the device under test fixes some cases.

Muratoi commented 2 years ago

Same problem after restart, anyway thanks for trying to help!

Muratoi commented 2 years ago

logs at Appium V2 image

camillomurcia commented 2 years ago

Can you upload the complete appium log of the execution?

lorenacimpean commented 2 years ago

Hi,

I've been redirected here from this issue: https://github.com/KazuCocoa/appium_dart/issues/39 I'm having the same problem when setting the capability to Flutter.

I am able to create sessions, use appium inspector and even drive tests with uiautomator2, but when I switch capabilites to flutter I'm getting this error. So it seems like it's not an appium/app/project config issue.

I'm currently using Appium v1.22.0. I've tried with Appium 2.0 as well, but moved to an older versions because of project dependencies. Either way, I get the same error with Appium 2.0. So it looks like it's not an Appium issue.

enableFlutterDriverExtension() is added to the main.dart file of the app.

So far it seems like it might be an issue with appium flutter driver:

Encountered internal error running command: TypeError: Cannot read property 'match' of undefined [2022-02-19 03:10:16][W3C] at Object.exports.processLogToGetobservatory (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-flutter-driver/build/driver/lib/sessions/observatory.js:118:9) [2022-02-19 03:10:16][W3C] at Object.exports.getObservatoryWsUri (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-flutter-driver/lib/sessions/android.ts:39:21) [2022-02-19 03:10:16][W3C] at Object.exports.startAndroidSession (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-flutter-driver/lib/sessions/android.ts:26:30) [2022-02-19 03:10:16][W3C] at runMicrotasks () [2022-02-19 03:10:16][W3C] at processTicksAndRejections (internal/process/task_queues.js:85:5) [2022-02-19 03:10:16][W3C] at FlutterDriver.exports.createSession (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-flutter-driver/lib/sessions/session.ts:21:47) [2022-02-19 03:10:16][W3C] at AppiumDriver.createSession (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/lib/appium.js:387:35) [2022-02-19 03:10:16][HTTP] <-- POST /wd/hub/session 500 8464 ms - 667

I'm attaching the complete appium logs from the most recent attempt.

This is pretty much a blocker, can you please prioritize it accordingly?

appium-server-logs.txt

KazuCocoa commented 2 years ago

Basically, the error occurs when this driver cannot find logs (logcat in android, system log in iOS) https://github.com/appium-userland/appium-flutter-driver/blob/3eac68ffc7bf6f27cff0eeea11a6ceadfb2b9a81/driver/lib/sessions/observatory.ts#L142-L145 in the new session steps. So, logcat may help to see the cause. For example, the logcat log appears before the flutter driver starts. (I don't know such case could happen though)

lorenacimpean commented 2 years ago

Could it work if you launch with uiAutomator/xcui and then switch to flutter ?

KazuCocoa commented 2 years ago

Perhaps no, since Flutter driver does it in its new session. e.g. https://github.com/appium-userland/appium-flutter-driver/blob/3eac68ffc7bf6f27cff0eeea11a6ceadfb2b9a81/driver/lib/sessions/android.ts#L22

You could try out newer flutter driver versions such as 0.0.35 that have a few improvements for the observatory method and so. It is available via appium 2 (available via appium@next + appium driver install flutter) or appium@beta for now.

aprilahijriyan commented 2 years ago

I tried the latest version of appium, found at appium@next. And it seems it's still an issue, here's the appium log:

[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"alwaysMatch":{"platformName":"Android","appium:deviceName":"Android API 32","appium:appPackage":"com.yeah.lolol","appium:appActivity":".MainActivity","appium:udid":"emulator-5554","appium:app":"/Users/uwuw/Projects/headache/data/app/app-release.apk","appium:automationName":"Flutter","appium:appWaitForLaunch":false,"appium:adbExecTimeout":40000,"appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":5000,"appium:connectHardwareKeyboard":true,"appium:skipLogcatCapture":false,"appium:clearDeviceLogsOnStart":true,"appium:ignoreHiddenApiPolicyError":true,"appium:logcatFormat":"process","appium:recreateChromeDriverSessions":true,"appium:fullReset":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"Android","deviceName":"Android API 32","appPackage":"com.yeah.lolol","appActivity":".MainActivity","udid":"emulator-5554","app":"/Users/uwuw/Projects/headache/data/app/app-release.apk","automationName":"Flutter",...
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","deviceName":"Android API 32","appPackage":"com.yeah.lolol","appActivity":".MainActivity","udid":"emulator-5554","app":"/Users/uwuw/Projects/headache/data/app/app-release.apk","automationName":"Flutter","appWaitForLaunch":false,"adbExecTimeout":40000,"appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":5000,"appium:connectHardwareKeyboard":true,"skipLogcatCapture":false,"clearDeviceLogsOnStart":true,"ignoreHiddenApiPolicyError":true,"logcatFormat":"process","recreateChromeDriverSessions":true,"fullReset":true},null,{"alwaysMatch":{"platformName":"Android","appium:deviceName":"Android API 32","appium:appPackage":"com.yeah.lolol","appium:appActivity":".MainActivity","appium:udid":"emulator-5554","appium:app":"/Users/uwuw/Projects/headache/data/app/app-release.apk","appium:automationName":"Flutter","appium:appWaitForLaunch":false,"appium:adbExecTimeout":40000,"appium:ensureWebviewsHavePages":true,"appium...
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1647833911184 (10:38:31 GMT+0700 (Western Indonesia Time))
[Appium] Attempting to find matching driver for automationName 'Flutter' and platformName 'Android'
[Appium] The 'flutter' driver was installed and matched caps.
[Appium] Will require it at /Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver
[Appium] Appium v2.0.0-beta.25 creating new FlutterDriver (v1.0.1) session
[Appium] Checking BaseDriver versions for Appium and FlutterDriver
[Appium] Appium's BaseDriver version is 8.2.4
[Appium] FlutterDriver's BaseDriver version is 8.2.4
[BaseDriver] Appium received (M)JSONWP desired capabilities in alongside the W3C capabilities; they will be ignored
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver]   "alwaysMatch": {
[debug] [BaseDriver]     "platformName": "Android",
[debug] [BaseDriver]     "appium:deviceName": "Android API 32",
[debug] [BaseDriver]     "appium:appPackage": "com.yeah.lolol",
[debug] [BaseDriver]     "appium:appActivity": ".MainActivity",
[debug] [BaseDriver]     "appium:udid": "emulator-5554",
[debug] [BaseDriver]     "appium:app": "/Users/uwuw/Projects/headache/data/app/app-release.apk",
[debug] [BaseDriver]     "appium:automationName": "Flutter",
[debug] [BaseDriver]     "appium:appWaitForLaunch": false,
[debug] [BaseDriver]     "appium:adbExecTimeout": 40000,
[debug] [BaseDriver]     "appium:ensureWebviewsHavePages": true,
[debug] [BaseDriver]     "appium:nativeWebScreenshot": true,
[debug] [BaseDriver]     "appium:newCommandTimeout": 5000,
[debug] [BaseDriver]     "appium:connectHardwareKeyboard": true,
[debug] [BaseDriver]     "appium:skipLogcatCapture": false,
[debug] [BaseDriver]     "appium:clearDeviceLogsOnStart": true,
[debug] [BaseDriver]     "appium:ignoreHiddenApiPolicyError": true,
[debug] [BaseDriver]     "appium:logcatFormat": "process",
[debug] [BaseDriver]     "appium:recreateChromeDriverSessions": true,
[debug] [BaseDriver]     "appium:fullReset": true
[debug] [BaseDriver]   },
[debug] [BaseDriver]   "firstMatch": [
[debug] [BaseDriver]     {}
[debug] [BaseDriver]   ]
[debug] [BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver]   appPackage
[BaseDriver]   appActivity
[BaseDriver]   app
[BaseDriver]   appWaitForLaunch
[BaseDriver]   adbExecTimeout
[BaseDriver]   ensureWebviewsHavePages
[BaseDriver]   nativeWebScreenshot
[BaseDriver]   connectHardwareKeyboard
[BaseDriver]   skipLogcatCapture
[BaseDriver]   clearDeviceLogsOnStart
[BaseDriver]   ignoreHiddenApiPolicyError
[BaseDriver]   logcatFormat
[BaseDriver]   recreateChromeDriverSessions
[BaseDriver] Session created with session id: 30aa8788-a843-4e8f-b061-c48a9acf20b8
[FlutterDriver] Starting an Android proxy session
[BaseDriver] Appium received (M)JSONWP desired capabilities in alongside the W3C capabilities; they will be ignored
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver]   "alwaysMatch": {
[debug] [BaseDriver]     "platformName": "Android",
[debug] [BaseDriver]     "appium:deviceName": "Android API 32",
[debug] [BaseDriver]     "appium:appPackage": "com.yeah.lolol",
[debug] [BaseDriver]     "appium:appActivity": ".MainActivity",
[debug] [BaseDriver]     "appium:udid": "emulator-5554",
[debug] [BaseDriver]     "appium:app": "/Users/uwuw/Projects/headache/data/app/app-release.apk",
[debug] [BaseDriver]     "appium:automationName": "Flutter",
[debug] [BaseDriver]     "appium:appWaitForLaunch": false,
[debug] [BaseDriver]     "appium:adbExecTimeout": 40000,
[debug] [BaseDriver]     "appium:ensureWebviewsHavePages": true,
[debug] [BaseDriver]     "appium:nativeWebScreenshot": true,
[debug] [BaseDriver]     "appium:newCommandTimeout": 5000,
[debug] [BaseDriver]     "appium:connectHardwareKeyboard": true,
[debug] [BaseDriver]     "appium:skipLogcatCapture": false,
[debug] [BaseDriver]     "appium:clearDeviceLogsOnStart": true,
[debug] [BaseDriver]     "appium:ignoreHiddenApiPolicyError": true,
[debug] [BaseDriver]     "appium:logcatFormat": "process",
[debug] [BaseDriver]     "appium:recreateChromeDriverSessions": true,
[debug] [BaseDriver]     "appium:fullReset": true
[debug] [BaseDriver]   },
[debug] [BaseDriver]   "firstMatch": [
[debug] [BaseDriver]     {}
[debug] [BaseDriver]   ]
[debug] [BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver]   connectHardwareKeyboard
[BaseDriver] Session created with session id: 693c59db-e189-486f-a087-fefa89d95004
[BaseDriver] Using local app '/Users/uwuw/Projects/headache/data/app/app-release.apk'
[debug] [UiAutomator2] Checking whether app is actually present
[ADB] Found 4 'build-tools' folders under '/Users/uwuw/Library/Android/sdk' (newest first):
[ADB]     /Users/uwuw/Library/Android/sdk/build-tools/33.0.0-rc1
[ADB]     /Users/uwuw/Library/Android/sdk/build-tools/32.1.0-rc1
[ADB]     /Users/uwuw/Library/Android/sdk/build-tools/32.0.0
[ADB]     /Users/uwuw/Library/Android/sdk/build-tools/29.0.2
[ADB] Using 'adb' from '/Users/uwuw/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb' from '/Users/uwuw/Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[debug] [ADB] Setting device id to emulator-5554
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 32
[ADB] Getting device platform version
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 12
[debug] [ADB] Device API level: 32
[UiAutomator2] Relaxing hidden api policy
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] 'io.appium.settings' is installed
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('4.0.0' >= '4.0.0')
[debug] [ADB] There is no need to install/upgrade '/Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [Logcat] Clearing logcat logs from device
[debug] [Logcat] Starting logs capture with command: /Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v process
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790'
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] 'io.appium.uiautomator2.server' is installed
[debug] [ADB] Getting package info for 'io.appium.uiautomator2.server'
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('5.3.1' >= '5.3.1')
[debug] [UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
[debug] [ADB] Checking app cert for /Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.3.1.apk
[ADB] Using 'apksigner.jar' from '/Users/uwuw/Library/Android/sdk/build-tools/33.0.0-rc1/lib/apksigner.jar'
[debug] [ADB] Starting apksigner: /opt/homebrew/Cellar/openjdk/17.0.2/libexec/openjdk.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/uwuw/Library/Android/sdk/build-tools/33.0.0-rc1/lib/apksigner.jar verify --print-certs /Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.3.1.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: xxx
[debug] [ADB] Signer #1 certificate SHA-1 digest: xxx
[debug] [ADB] Signer #1 certificate MD5 digest: xxx
[debug] [ADB] 
[debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-v5.3.1.apk'
[ADB] '/Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.3.1.apk' is signed with the default certificate
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server.test'
[debug] [ADB] 'io.appium.uiautomator2.server.test' is installed
[debug] [ADB] Checking app cert for /Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting apksigner: /opt/homebrew/Cellar/openjdk/17.0.2/libexec/openjdk.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/uwuw/Library/Android/sdk/build-tools/33.0.0-rc1/lib/apksigner.jar verify --print-certs /Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: xxx
[debug] [ADB] Signer #1 certificate SHA-1 digest: xxx
[debug] [ADB] Signer #1 certificate MD5 digest: xxx
[debug] [ADB] 
[debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk'
[ADB] '/Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate
[UiAutomator2] Server packages are not going to be (re)installed
[debug] [UiAutomator2] Waiting up to 30000ms for services to be available
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list instrumentation'
[debug] [UiAutomator2] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[ADB] Adding packages ["io.appium.settings","io.appium.uiautomator2.server","io.appium.uiautomator2.server.test"] to Doze whitelist
[debug] [ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server.test",";"]]
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[debug] [ADB] Checking app cert for /Users/uwuw/Projects/headache/data/app/app-release.apk
[debug] [ADB] Starting apksigner: /opt/homebrew/Cellar/openjdk/17.0.2/libexec/openjdk.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/uwuw/Library/Android/sdk/build-tools/33.0.0-rc1/lib/apksigner.jar verify --print-certs /Users/uwuw/Projects/headache/data/app/app-release.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: C=US, O=Android, CN=Android Debug
[debug] [ADB] Signer #1 certificate SHA-256 digest: xxx
[debug] [ADB] Signer #1 certificate SHA-1 digest: xxx
[debug] [ADB] Signer #1 certificate MD5 digest: xxx
[debug] [ADB] 
[ADB] '/Users/uwuw/Projects/headache/data/app/app-release.apk' is signed with a non-default certificate
[debug] [ADB] Uninstalling com.yeah.lolol
[debug] [ADB] Getting install status for com.yeah.lolol
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package com.yeah.lolol'
[debug] [ADB] 'com.yeah.lolol' is not installed
[ADB] com.yeah.lolol was not uninstalled, because it was not present on the device
[debug] [ADB] Getting install status for com.yeah.lolol
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package com.yeah.lolol'
[debug] [ADB] 'com.yeah.lolol' is not installed
[debug] [AndroidDriver] Running full reset on 'com.yeah.lolol' (reinstall)
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 help'
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 features'
[ADB] The application at '/Users/uwuw/Projects/headache/data/app/app-release.apk' will not be cached, because the device under test has confirmed the support of streamed installs
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 install -r /Users/uwuw/Projects/headache/data/app/app-release.apk'
[ADB] The installation of 'app-release.apk' took 849ms
[debug] [ADB] Install command stdout: Performing Streamed Install
[debug] [ADB] Success
[debug] [UiAutomator2] Performing shallow cleanup of automation leftovers
[debug] [UiAutomator2] No obsolete sessions have been detected (socket hang up)
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[UiAutomator2] Starting UIAutomator2 server 5.3.1
[UiAutomator2] Using UIAutomator2 server from '/Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.3.1.apk' and test from '/Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online...
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[WD Proxy] socket hang up
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[WD Proxy] socket hang up
[debug] [WD Proxy] Matched '/status' to command name 'getStatus'
[debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[debug] [UiAutomator2] The initialization of the instrumentation process took 2086ms
[debug] [WD Proxy] Matched '/session' to command name 'createSession'
[debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8200/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"Android API 32","appPackage":"com.yeah.lolol","appActivity":".MainActivity","udid":"emulator-5554","app":"/Users/uwuw/Projects/headache/data/app/app-release.apk","automationName":"Flutter","appWaitForLaunch":false,"adbExecTimeout":40000,"ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":5000,"connectHardwareKeyboard":true,"skipLogcatCapture":false,"clearDeviceLogsOnStart":true,"ignoreHiddenApiPolicyError":true,"logcatFormat":"process","recreateChromeDriverSessions":true,"fullReset":true},"platformName":"Android","deviceName":"emulator-5554","appPackage":"com.yeah.lolol","appActivity":".MainActivity","udid":"emulator-5554","app":"/Users/uwuw/Projects/headache/data/app/app-rele...
[debug] [WD Proxy] Got response with status 200: {"sessionId":"6cb7f0d6-ba47-4f2d-b627-93eb5137a338","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","deviceName":"Android API 32","appPackage":"com.yeah.lolol","appActivity":".MainActivity","udid":"emulator-5554","app":"/Users/uwuw/Projects/headache/data/app/app-release.apk","automationName":"Flutter","appWaitForLaunch":false,"adbExecTimeout":40000,"ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":5000,"connectHardwareKeyboard":true,"skipLogcatCapture":false,"clearDeviceLogsOnStart":true,"ignoreHiddenApiPolicyError":true,"logcatFormat":"process","recreateChromeDriverSessions":true,"fullReset":true},"platformName":"Android","deviceName":"emulator-5554","appPackage":"com.yeah.lolol","appActivity":".MainActivity","udid":"emulator-5554","app...
[WD Proxy] Determined the downstream protocol as 'W3C'
[debug] [WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/session/6cb7f0d6-ba47-4f2d-b627-93eb5137a338/appium/device/info] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"6cb7f0d6-ba47-4f2d-b627-93eb5137a338","value":{"androidId":"18b51123ed44c9c9","apiVersion":"32","bluetooth":{"state":"ON"},"brand":"google","carrierName":"T-Mobile","displayDensity":420,"locale":"en_US","manufacturer":"Google","model":"sdk_gphone64_arm64","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":30000,"linkUpstreamBandwidthKbps":12000,"networkCapabilities":"NET_CAPABILITY_NOT_METERED,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_FOREGROUND,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","signalStrength":-50,"transportTypes":"TRANSPORT_WIFI"},"detailedState":"CONNECTED","extraInfo":"","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":-1,"subtypeName":"","type":1,"typeName":"WIFI"},{"capabilities":{"SSID":null,"linkDownBandwidthKbps":4300,"linkUpstreamBandwidthKbps":1800,"networkCapabili...
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'com.yeah.lolol/.MainActivity and waiting for 'com.yeah.lolol/.MainActivity'
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -n com.yeah.lolol/.MainActivity -S'
[debug] [WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/session/6cb7f0d6-ba47-4f2d-b627-93eb5137a338/appium/device/pixel_ratio] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"6cb7f0d6-ba47-4f2d-b627-93eb5137a338","value":2.625}
[debug] [WD Proxy] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/session/6cb7f0d6-ba47-4f2d-b627-93eb5137a338/appium/device/system_bars] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"6cb7f0d6-ba47-4f2d-b627-93eb5137a338","value":{"statusBar":63}}
[debug] [WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[debug] [WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/session/6cb7f0d6-ba47-4f2d-b627-93eb5137a338/window/current/size] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"6cb7f0d6-ba47-4f2d-b627-93eb5137a338","value":{"height":1878,"width":1080}}
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched '/' to command name 'deleteSession'
[debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/session/6cb7f0d6-ba47-4f2d-b627-93eb5137a338] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"6cb7f0d6-ba47-4f2d-b627-93eb5137a338","value":null}
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.yeah.lolol'
[debug] [UiAutomator2] Capability 'fullReset' set to 'true', Uninstalling 'com.yeah.lolol'
[debug] [ADB] Uninstalling com.yeah.lolol
[debug] [ADB] Getting install status for com.yeah.lolol
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package com.yeah.lolol'
[debug] [Instrumentation] .
[debug] [Instrumentation] Time: 2.044
[debug] [Instrumentation] 
[debug] [Instrumentation] OK (1 test)
[debug] [ADB] 'com.yeah.lolol' is installed
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.yeah.lolol'
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 uninstall com.yeah.lolol'
[debug] [ADB] 'adb uninstall com.yeah.lolol' command output: Success
[ADB] com.yeah.lolol was successfully uninstalled
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200 
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8200'
[UiAutomator2] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running '/Users/uwuw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy''
[debug] [FlutterDriver] Deleting Flutter Driver session
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1647833919157 (10:38:39 GMT+0700 (Western Indonesia Time))
[debug] [W3C] Encountered internal error running command: TypeError: Cannot read properties of undefined (reading 'match')
[debug] [W3C]     at processLogToGetobservatory (/Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/build/driver/lib/sessions/observatory.js:124:9)
[debug] [W3C]     at getObservatoryWsUri (/Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/lib/sessions/android.ts:40:47)
[debug] [W3C]     at startAndroidSession (/Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/lib/sessions/android.ts:27:49)
[debug] [W3C]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[debug] [W3C]     at FlutterDriver.createSession (/Users/uwuw/.appium/appium-flutter-driver/node_modules/appium-flutter-driver/lib/sessions/session.ts:22:47)
[debug] [W3C]     at AppiumDriver.createSession (/Users/uwuw/.nvm/versions/node/v17.6.0/lib/node_modules/appium/lib/appium.js:251:35)
[HTTP] <-- POST /wd/hub/session 500 7995 ms - 681
[HTTP] 
[debug] [Instrumentation] The process has exited with code 0

Tested on version:

aprilahijriyan commented 2 years ago

cc @KazuCocoa

KazuCocoa commented 2 years ago

Generally it means this driver could not find https://github.com/appium-userland/appium-flutter-driver/issues/248#issuecomment-1046078089 in the logcat. What's the logact?

aprilahijriyan commented 2 years ago

Logcat:

03-21 13:30:07.106  6113  6140 I appium  : Created the new session with id 246bb470-c3f6-441e-9e30-a3c9476650ed and capabilities {appPackage=com.pkg, noReset=true, ensureWebviewsHavePages=true, connectHardwareKeyboard=true, deviceName=emulator-5554, fullReset=false, platform=LINUX, deviceUDID=emulator-5554, desired={platformName=Android, deviceName=Android API 32, udid=emulator-5554, noReset=true, automationName=Flutter, appWaitDuration=70000.0, adbExecTimeout=40000.0, app=/Users/uwuw/Projects/headache/data/app/app-release.apk, appPackage=com.pkg, appActivity=.MainActivity, fullReset=false, ensureWebviewsHavePages=true, nativeWebScreenshot=true, newCommandTimeout=3600.0, connectHardwareKeyboard=true}, nativeWebScreenshot=true, newCommandTimeout=3600.0, webStorageEnabled=false, automationName=Flutter, takesScreenshot=true, javascriptEnabled=true, platformName=Android, udid=emulator-5554, app=/Users/uwuw/Projects/headache/data/app/app-release.apk, networkConnectionEnabled=true, warnings={}, databaseEnabled=false, appWaitDuration=70000.0, appActivity=.MainActivity, adbExecTimeout=40000.0, locationContextEnabled=false}
03-21 13:30:07.226   540  1556 I ActivityManager: Force stopping com.pkg appid=10229 user=0: from pid 6146
03-21 13:30:07.487   540  1556 I ActivityTaskManager: START u0 {flg=0x10000000 cmp=com.pkg/.MainActivity} from uid 2000
03-21 13:30:07.532   540   587 I ActivityManager: Start proc 6149:com.pkg/u0a229 for pre-top-activity {com.pkg/com.pkg.MainActivity}
03-21 13:30:07.584  6149  6149 V GraphicsEnvironment: ANGLE Developer option for 'com.pkg' set to: 'default'
03-21 13:30:07.585  6149  6149 V GraphicsEnvironment: ANGLE GameManagerService for com.pkg: false
03-21 13:30:07.659  6149  6149 W ime.skinmystery: type=1400 audit(0.0:1446): avc: denied { read } for name="max_map_count" dev="proc" ino=953817 scontext=u:r:untrusted_app:s0:c229,c256,c512,c768 tcontext=u:object_r:proc_max_map_count:s0 tclass=file permissive=0 app=com.pkg
03-21 13:30:07.703   540   604 E VerityUtils: Failed to measure fs-verity, errno 1: /data/app/~~xxx==/com.pkg-xxx==/base.apk
03-21 13:30:07.831   540   575 I ActivityTaskManager: Displayed com.pkg/.MainActivity: +343ms
03-21 13:30:07.887   540  1556 I ActivityManager: Force stopping com.pkg appid=10229 user=0: from pid 6229
03-21 13:30:07.888   540  1556 I ActivityManager: Killing 6149:com.pkg/u0a229 (adj 0): stop com.pkg due to from pid 6229
03-21 13:30:07.889   540  1556 W ActivityTaskManager: Force removing ActivityRecord{a3e7570 u0 com.pkg/.MainActivity t149 f}}: app died, no saved state
03-21 13:30:07.892   540  1556 W InputManager-JNI: Input channel object '3a67046 Splash Screen com.pkg (client)' was disposed without first being removed with the input manager!
03-21 13:30:07.892   540  1556 W InputManager-JNI: Input channel object '4d2152c com.pkg/com.pkg.MainActivity (client)' was disposed without first being removed with the input manager!
03-21 13:30:07.898   540   776 V ActivityManager: Got obituary of 6149:com.pkg
03-21 13:30:08.620   540   575 D CompanionDeviceManagerService: onPackageModified(packageName = com.pkg)
03-21 13:30:08.634   781   781 D MediaPlayerList: Name of package changed: com.pkg
03-21 13:30:08.657   999   999 D ImsResolver: maybeAddedImsService, packageName: com.pkg
03-21 13:30:08.657  4014  6074 I Fitness : OnPackageChangedOperation got intent: Intent { act=android.intent.action.PACKAGE_CHANGED dat=package:com.pkg flg=0x45000010 pkg=com.google.android.gms cmp=com.google.android.gms/.chimera.PersistentIntentOperationService (has extras) } [CONTEXT service_id=17 ]
KazuCocoa commented 2 years ago

This driver tries to find a line as https://github.com/appium-userland/appium-flutter-driver/issues/248#issuecomment-1046078089 to get websocket connection to the Dart VM. If no the line, this driver does not work. Afaik, such a case could happen if the app was not debuggable. https://github.com/appium-userland/appium-flutter-driver#usage

aprilahijriyan commented 2 years ago

I tried reviewing the app with the appium inspector, can't seem to open the app. This is the output of logcat, when I open the app with the inspector.

03-21 13:44:21.694  6511  6538 I appium  : Created the new session with id 2b90db58-72cc-4493-92e2-f6b05da4c15e and capabilities {appPackage=com.pkg, noReset=true, ensureWebviewsHavePages=true, connectHardwareKeyboard=true, deviceName=emulator-5554, fullReset=false, platform=LINUX, deviceUDID=emulator-5554, desired={platformName=Android, deviceName=Android API 32, udid=emulator-5554, noReset=true, automationName=Flutter, appWaitDuration=70000.0, adbExecTimeout=40000.0, app=/Users/uwuw/Projects/headache/data/app/app-release.apk, appPackage=com.pkg, appActivity=.MainActivity, fullReset=false, ensureWebviewsHavePages=true, nativeWebScreenshot=true, newCommandTimeout=3600.0, connectHardwareKeyboard=true}, nativeWebScreenshot=true, newCommandTimeout=3600.0, webStorageEnabled=false, automationName=Flutter, takesScreenshot=true, javascriptEnabled=true, platformName=Android, udid=emulator-5554, app=/Users/uwuw/Projects/headache/data/app/app-release.apk, networkConnectionEnabled=true, warnings={}, databaseEnabled=false, appWaitDuration=70000.0, appActivity=.MainActivity, adbExecTimeout=40000.0, locationContextEnabled=false}
03-21 13:44:21.796   540   886 I ActivityManager: Force stopping com.pkg appid=10229 user=0: from pid 6544
03-21 13:44:22.054   540   886 I ActivityTaskManager: START u0 {flg=0x10000000 cmp=com.pkg/.MainActivity} from uid 2000
03-21 13:44:22.074   540   587 I ActivityManager: Start proc 6547:com.pkg/u0a229 for pre-top-activity {com.pkg/com.pkg.MainActivity}
03-21 13:44:22.105  6547  6547 V GraphicsEnvironment: ANGLE Developer option for 'com.pkg' set to: 'default'
03-21 13:44:22.105  6547  6547 V GraphicsEnvironment: ANGLE GameManagerService for com.pkg: false
03-21 13:44:22.183  6547  6547 W ime.pkg: type=1400 audit(0.0:1455): avc: denied { read } for name="max_map_count" dev="proc" ino=959546 scontext=u:r:untrusted_app:s0:c229,c256,c512,c768 tcontext=u:object_r:proc_max_map_count:s0 tclass=file permissive=0 app=com.pkg
03-21 13:44:22.224   540   604 E VerityUtils: Failed to measure fs-verity, errno 1: /data/app/~~xxx==/com.pkg-xxx==/base.apk
03-21 13:44:22.355   540   575 I ActivityTaskManager: Displayed com.pkg/.MainActivity: +299ms
03-21 13:44:22.421   540  1686 I ActivityManager: Force stopping com.pkg appid=10229 user=0: from pid 6625
03-21 13:44:22.421   540  1686 I ActivityManager: Killing 6547:com.pkg/u0a229 (adj 0): stop com.pkg due to from pid 6625
03-21 13:44:22.425   540  1686 W ActivityTaskManager: Force removing ActivityRecord{c3c0e8a u0 com.pkg/.MainActivity t150 f}}: app died, no saved state
03-21 13:44:22.427   540  1686 W InputManager-JNI: Input channel object 'e1226c4 Splash Screen com.pkg (client)' was disposed without first being removed with the input manager!
03-21 13:44:22.428   540  1686 W InputManager-JNI: Input channel object '70dc190 com.pkg/com.pkg.MainActivity (client)' was disposed without first being removed with the input manager!
03-21 13:44:22.468   540  3302 V ActivityManager: Got obituary of 6547:com.pkg

The configuration I use:

{
     "platformName": "Android",
     "appium:devicename": "Android API 32",
     "appium:udid": "emulator-5554",
     "appium:noReset": true,
     "appium:automationName": "Flutter",
     "appium:appWaitDuration": 70000,
     "appium:adbExecTimeout": 40000
     "appium:app": "/Users/uwuw/Projects/headache/data/app/app-release.apk",
     "appium:appPackage": "com.pkg",
     "appium:appActivity": ".MainActivity",
     "appium:fullReset": false
}
image
aprilahijriyan commented 2 years ago

If I use appium:automationName = UiAutomator2 it works through the appium inspector.

image
KazuCocoa commented 2 years ago

Did you configure https://github.com/appium-userland/appium-flutter-driver#usage?

Your Flutter app-under-test (AUT) must be compiled in debug or profile mode, because Flutter Driver does not support running in release mode.. Also, ensure that your Flutter AUT has enableFlutterDriverExtension() before runApp. Then, please make sure your app imported flutter_driver package as well.

vbhvkthr1 commented 2 years ago

Hi - Any update on this issue - i am facing same, Flutter AUT has enableFlutterDriverExtension() and compiled in profile mode.

[RemoteTestNG] detected TestNG version 7.4.0 SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [Appium] Welcome to Appium v1.22.3 [Appium] Appium REST http interface listener started on 0.0.0.0:4723 [HTTP] --> GET /wd/hub/status [HTTP] {} [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: [] [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.22.3"}} [HTTP] <-- GET /wd/hub/status 200 8 ms - 68 [HTTP]  [HTTP] --> GET /wd/hub/status [HTTP] {} [debug] [GENERIC] Calling AppiumDriver.getStatus() with args: [] [debug] [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.22.3"}} [HTTP] <-- GET /wd/hub/status 200 5 ms - 68 [HTTP]  app file path - /Users//Documents//space/appiumFramework/resources/app-profile.apk [debug] [HTTP] Request idempotency key: 90e7e2ed-1bdd-4063-88bf-be87f1180aaf [HTTP] --> POST /wd/hub/session [HTTP] {"desiredCapabilities":{"app":"/Users//Documents//space/appiumFramework/resources/app-profile.apk","automationName":"Flutter","platformName":"Android","deviceName":"galaxynexus","platformVersion":"12.0"},"capabilities":{"firstMatch":[{"appium:app":"/Users//Documents//space/appiumFramework/resources/app-profile.apk","appium:automationName":"Flutter","appium:deviceName":"galaxynexus","platformName":"android","appium:platformVersion":"12.0"}]}} [debug] [W3C] Calling AppiumDriver.createSession() with args: [{"app":"/Users//Documents//space/appiumFramework/resources/app-profile.apk","automationName":"Flutter","platformName":"Android","deviceName":"galaxynexus","platformVersion":"12.0"},null,{"firstMatch":[{"appium:app":"/Users//Documents//space/appiumFramework/resources/app-profile.apk","appium:automationName":"Flutter","appium:deviceName":"galaxynexus","platformName":"android","appium:platformVersion":"12.0"}]}] [debug] [BaseDriver] Event 'newSessionRequested' logged at 1654201950795 (02:02:30 GMT+0530 (India Standard Time)) [Appium] Appium v1.22.3 creating new FlutterDriver (v0.0.32) session [debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided [debug] [BaseDriver] Creating session with W3C capabilities: { [debug] [BaseDriver] "alwaysMatch": { [debug] [BaseDriver] "platformName": "android", [debug] [BaseDriver] "appium:app": "/Users//Documents//space/appiumFramework/resources/app-profile.apk", [debug] [BaseDriver] "appium:automationName": "Flutter", [debug] [BaseDriver] "appium:deviceName": "galaxynexus", [debug] [BaseDriver] "appium:platformVersion": "12.0" [debug] [BaseDriver] }, [debug] [BaseDriver] "firstMatch": [ [debug] [BaseDriver] {} [debug] [BaseDriver] ] [debug] [BaseDriver] } [BaseDriver] The following capabilities were provided, but are not recognized by Appium: [BaseDriver] app [BaseDriver] Session created with session id: e4c8d2a0-61e6-4ed1-b369-20453d25bfa6 [FlutterDriver] Starting an Android proxy session [debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided [debug] [BaseDriver] Creating session with W3C capabilities: { [debug] [BaseDriver] "alwaysMatch": { [debug] [BaseDriver] "platformName": "android", [debug] [BaseDriver] "appium:app": "/Users//Documents//space/appiumFramework/resources/app-profile.apk", [debug] [BaseDriver] "appium:automationName": "Flutter", [debug] [BaseDriver] "appium:deviceName": "galaxynexus", [debug] [BaseDriver] "appium:platformVersion": "12.0" [debug] [BaseDriver] }, [debug] [BaseDriver] "firstMatch": [ [debug] [BaseDriver] {} [debug] [BaseDriver] ] [debug] [BaseDriver] } [BaseDriver] Session created with session id: 904bc0a7-698a-43a9-ac75-c2f805fbec50 [BaseDriver] Using local app '/Users//Documents//space/appiumFramework/resources/app-profile.apk' [debug] [UiAutomator2] Checking whether app is actually present [ADB] Found 3 'build-tools' folders under '/Users//Library/Android/sdk/' (newest first): [ADB] /Users//Library/Android/sdk/build-tools/32.1.0-rc1 [ADB] /Users//Library/Android/sdk/build-tools/32.0.0 [ADB] /Users//Library/Android/sdk/build-tools/30.0.3 [ADB] Using 'adb' from '/Users//Library/Android/sdk/platform-tools/adb' [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 start-server' [AndroidDriver] Retrieving device list [debug] [ADB] Trying to find a connected android device [debug] [ADB] Getting connected devices [debug] [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"},{"udid":"emulator-5556","state":"device"}] [AndroidDriver] Looking for a device with Android '12.0.0' [debug] [ADB] Setting device id to emulator-5554 [ADB] Getting device platform version [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release' [debug] [ADB] Current device property 'ro.build.version.release': 12 [AndroidDriver] Using device: emulator-5554 [ADB] Using 'adb' from '/Users//Library/Android/sdk/platform-tools/adb' [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 start-server' [debug] [ADB] Setting device id to emulator-5554 [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk' [debug] [ADB] Current device property 'ro.build.version.sdk': 32 [ADB] Getting device platform version [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release' [debug] [ADB] Current device property 'ro.build.version.release': 12 [debug] [ADB] Device API level: 32 [UiAutomator2] Relaxing hidden api policy [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1'' [debug] [AndroidDriver] Parsing package and activity from app manifest [ADB] Package name: 'com.example.fluuter_automation' [ADB] Main activity name: 'com.example.fluuter_automation.MainActivity' [debug] [AndroidDriver] Parsed package and activity are: com.example.fluuter_automation/com.example.fluuter_automation.MainActivity [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device' [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping' [debug] [AndroidDriver] Pushing settings apk to device... [debug] [ADB] Getting install status for io.appium.settings [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings' [debug] [ADB] 'io.appium.settings' is installed [debug] [ADB] Getting package info for 'io.appium.settings' [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings' [debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('3.4.0' >= '3.4.0') [debug] [ADB] There is no need to install/upgrade '/Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/io.appium.settings/apks/settings_apk-debug.apk' [debug] [ADB] Getting IDs of all 'io.appium.settings' processes [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?'' [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f ([[:blank:]]|\^)io.appium.settings([[:blank:]]|\$)' [debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions. [debug] [Logcat] Starting logs capture with command: /Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime [debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to local port 8200 [debug] [ADB] Forwarding system: 8200 to device: 6790 [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790' [debug] [ADB] Getting install status for io.appium.uiautomator2.server [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server' [debug] [ADB] 'io.appium.uiautomator2.server' is installed [debug] [ADB] Getting package info for 'io.appium.uiautomator2.server' [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server' [debug] [ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.27.0' >= '4.27.0') [debug] [UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled [debug] [ADB] Checking app cert for /Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.27.0.apk [ADB] Using 'apksigner.jar' from '/Users//Library/Android/sdk/build-tools/32.1.0-rc1/lib/apksigner.jar' [debug] [ADB] Starting apksigner: /usr/bin/java -Xmx1024M -Xss1m -jar /Users//Library/Android/sdk/build-tools/32.1.0-rc1/lib/apksigner.jar verify --print-certs /Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.27.0.apk [debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US [debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc [debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81 [debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87 [debug] [ADB] [debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-v4.27.0.apk' [ADB] '/Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.27.0.apk' is signed with the default certificate [debug] [ADB] Getting install status for io.appium.uiautomator2.server.test [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server.test' [debug] [ADB] 'io.appium.uiautomator2.server.test' is installed [debug] [ADB] Checking app cert for /Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk [debug] [ADB] Starting apksigner: /usr/bin/java -Xmx1024M -Xss1m -jar /Users//Library/Android/sdk/build-tools/32.1.0-rc1/lib/apksigner.jar verify --print-certs /Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk [debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US [debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc [debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81 [debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87 [debug] [ADB] [debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk' [ADB] '/Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate [UiAutomator2] Server packages are not going to be (re)installed [debug] [UiAutomator2] Waiting up to 30000ms for services to be available [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list instrumentation' [debug] [UiAutomator2] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available [ADB] Adding packages ["io.appium.settings","io.appium.uiautomator2.server","io.appium.uiautomator2.server.test"] to Doze whitelist [debug] [ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server.test",";"]] [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;' [debug] [ADB] Checking app cert for /Users//Documents//space/appiumFramework/resources/app-profile.apk [debug] [ADB] Starting apksigner: /usr/bin/java -Xmx1024M -Xss1m -jar /Users//Library/Android/sdk/build-tools/32.1.0-rc1/lib/apksigner.jar verify --print-certs /Users//Documents//space/appiumFramework/resources/app-profile.apk [debug] [ADB] apksigner stdout: Signer #1 certificate DN: C=US, O=Android, CN=Android Debug [debug] [ADB] Signer #1 certificate SHA-256 digest: e79d2b836e6b26893486c325253de61fde3a4e63fdd6aeb53cc2dd35af952905 [debug] [ADB] Signer #1 certificate SHA-1 digest: 3e50714ac6a52dbbe2ac2ae69e45997b93a78bae [debug] [ADB] Signer #1 certificate MD5 digest: af16b863a812006d810566ebf9490f60 [debug] [ADB] [ADB] '/Users//Documents//space/appiumFramework/resources/app-profile.apk' is signed with a non-default certificate [debug] [ADB] Getting install status for com.example.fluuter_automation [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package com.example.fluuter_automation' [debug] [ADB] 'com.example.fluuter_automation' is installed [debug] [ADB] Getting package info for 'com.example.fluuter_automation' [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package com.example.fluuter_automation' [debug] [ADB] The version name of the installed 'com.example.fluuter_automation' is greater or equal to the application version name ('1.0.0' >= '1.0.0') [debug] [ADB] There is no need to install/upgrade '/Users//Documents//space/appiumFramework/resources/app-profile.apk' [AndroidDriver] Performing fast reset on 'com.example.fluuter_automation' [debug] [ADB] Getting install status for com.example.fluuter_automation [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package com.example.fluuter_automation' [debug] [ADB] 'com.example.fluuter_automation' is installed [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.example.fluuter_automation' [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm clear com.example.fluuter_automation' [debug] [AndroidDriver] Performed fast reset on the installed 'com.example.fluuter_automation' application (stop and clear) [debug] [UiAutomator2] Performing shallow cleanup of automation leftovers [debug] [UiAutomator2] No obsolete sessions have been detected (socket hang up) [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test' [UiAutomator2] Starting UIAutomator2 server 4.27.0 [UiAutomator2] Using UIAutomator2 server from '/Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.27.0.apk' and test from '/Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' [UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online... [debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"] [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server: [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body [WD Proxy] socket hang up [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body [debug] [WD Proxy] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}} [debug] [UiAutomator2] The initialization of the instrumentation process took 10821ms [debug] [WD Proxy] Matched '/session' to command name 'createSession' [debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8200/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Documents//space/appiumFramework/resources/app-profile.apk","automationName":"Flutter","deviceName":"galaxynexus","platformVersion":"12.0"},"platformName":"android","app":"/Users//Documents//space/appiumFramework/resources/app-profile.apk","automationName":"Flutter","deviceName":"emulator-5554","platformVersion":"12.0","deviceUDID":"emulator-5554","appPackage":"com.example.fluuter_automation"}],"alwaysMatch":{}}} [debug] [WD Proxy] Got response with status 200: {"sessionId":"18e7427e-892e-4eae-9709-37f84a17d138","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Documents//space/appiumFramework/resources/app-profile.apk","automationName":"Flutter","deviceName":"galaxynexus","platformVersion":"12.0"},"platformName":"android","app":"/Users//Documents//space/appiumFramework/resources/app-profile.apk","automationName":"Flutter","deviceName":"emulator-5554","platformVersion":"12.0","deviceUDID":"emulator-5554","appPackage":"com.example.fluuter_automation"}],"alwaysMatch":{}},"sessionId":"18e7427e-892e-4eae-9709-37f84a17d138"}} [WD Proxy] Determined the downstream protocol as 'W3C' [debug] [WD Proxy] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/wd/hub/session/18e7427e-892e-4eae-9709-37f84a17d138/appium/device/info] with no body [debug] [WD Proxy] Got response with status 200: {"sessionId":"18e7427e-892e-4eae-9709-37f84a17d138","value":{"androidId":"e2b52bb000050552","apiVersion":"32","bluetooth":{"state":"ON"},"brand":"google","carrierName":"T-Mobile","displayDensity":560,"locale":"en_US","manufacturer":"Google","model":"sdk_gphone64_arm64","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":30000,"linkUpstreamBandwidthKbps":12000,"networkCapabilities":"NET_CAPABILITY_NOT_METERED,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_FOREGROUND,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","signalStrength":-50,"transportTypes":"TRANSPORT_WIFI"},"detailedState":"CONNECTED","extraInfo":"","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":-1,"subtypeName":"","type":1,"typeName":"WIFI"},{"capabilities":{"SSID":null,"linkDownBandwidthKbps":4300,"linkUpstreamBandwidthKbps":1800,"networkCapabili... [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window' [AndroidDriver] Screen already unlocked, doing nothing [UiAutomator2] Starting 'com.example.fluuter_automation/com.example.fluuter_automation.MainActivity and waiting for 'com.example.fluuter_automation/com.example.fluuter_automation.MainActivity' [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n com.example.fluuter_automation/com.example.fluuter_automation.MainActivity -S' [debug] [ADB] Waiting up to 20000ms for activity matching pkg: 'com.example.fluuter_automation' and activity: 'com.example.fluuter_automation.MainActivity' to be focused [debug] [ADB] Possible activities, to be checked: 'com.example.fluuter_automation.MainActivity', 'com.example.fluuter_automation.com.example.fluuter_automation.MainActivity' [debug] [ADB] Getting focused package and activity [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window displays' [debug] [ADB] Found package: 'com.example.fluuter_automation' and fully qualified activity name : 'com.example.fluuter_automation.MainActivity' [debug] [WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/wd/hub/session/18e7427e-892e-4eae-9709-37f84a17d138/appium/device/pixel_ratio] with no body [debug] [WD Proxy] Got response with status 200: {"sessionId":"18e7427e-892e-4eae-9709-37f84a17d138","value":3.5} [debug] [WD Proxy] Matched '/appium/device/system_bars' to command name 'getSystemBars' [debug] [WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/wd/hub/session/18e7427e-892e-4eae-9709-37f84a17d138/appium/device/system_bars] with no body [debug] [WD Proxy] Got response with status 200: {"sessionId":"18e7427e-892e-4eae-9709-37f84a17d138","value":{"statusBar":84}} [debug] [WD Proxy] Matched '/window/current/size' to command name 'getWindowSize' [debug] [WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/18e7427e-892e-4eae-9709-37f84a17d138/window/current/size] with no body [debug] [WD Proxy] Got response with status 200: {"sessionId":"18e7427e-892e-4eae-9709-37f84a17d138","value":{"height":2504,"width":1440}} [debug] [UiAutomator2] Deleting UiAutomator2 session [debug] [UiAutomator2] Deleting UiAutomator2 server session [debug] [WD Proxy] Matched '/' to command name 'deleteSession' [debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/wd/hub/session/18e7427e-892e-4eae-9709-37f84a17d138] with no body [debug] [WD Proxy] Got response with status 200: {"sessionId":"18e7427e-892e-4eae-9709-37f84a17d138","value":null} [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.example.fluuter_automation' [debug] [Logcat] Stopping logcat capture [debug] [ADB] Removing forwarded port socket connection: 8200 [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:8200' [UiAutomator2] Restoring hidden api policy to the device default configuration [debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy'' [debug] [FlutterDriver] Deleting Flutter Driver session [debug] [BaseDriver] Event 'newSessionStarted' logged at 1654201988305 (02:03:08 GMT+0530 (India Standard Time)) [debug] [W3C] Encountered internal error running command: TypeError: Cannot read properties of undefined (reading 'match') [debug] [W3C] at Object.exports.processLogToGetobservatory (/Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-flutter-driver/build/driver/lib/sessions/observatory.js:118:9) [debug] [W3C] at Object.exports.getObservatoryWsUri (/Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-flutter-driver/lib/sessions/android.ts:39:21) [debug] [W3C] at Object.exports.startAndroidSession (/Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-flutter-driver/lib/sessions/android.ts:26:30) [debug] [W3C] at processTicksAndRejections (node:internal/process/task_queues:96:5) [debug] [W3C] at FlutterDriver.exports.createSession (/Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/node_modules/appium-flutter-driver/lib/sessions/session.ts:21:47) [debug] [W3C] at AppiumDriver.createSession (/Users//.nvm/versions/node/v18.2.0/lib/node_modules/appium/lib/appium.js:387:35) [HTTP] <-- POST /wd/hub/session 500 38029 ms - 679 [HTTP]  [debug] [Instrumentation] . [debug] [Instrumentation] [debug] [Instrumentation] Time: 25.095 [debug] [Instrumentation] [debug] [Instrumentation] OK (1 test) [debug] [Instrumentation] The process has exited with code 0

===============================================

App Total tests run: 1, Passes: 0, Failures: 0, Skips: 1 Configuration Failures: 1, Skips: 0 =============================================== =============================================== Base Total tests run: 1, Passes: 0, Failures: 0, Skips: 1 Configuration Failures: 1, Skips: 0 ===============================================
mrqws commented 2 years ago

Has this problem been solved? I have the same problem

Alpaca00 commented 2 years ago

I also have the same problem if flutter version > 2.10.5

KazuCocoa commented 2 years ago

Please try out the latest appium flutter driver 1.2.0 with appium 2.0.

vbhvkthr1 commented 2 years ago

Hi - for me issue was resolved when i used the app from below url instead of debug profile app i created so was an issue with my app

https://github.com/appium-userland/appium-flutter-driver

Thanks, Vaibhav

On Jun 27, 2022, at 1:31 PM, Kazuaki Matsuo @.***> wrote:

 Please try out the latest appium flutter driver 1.2.0 with appium 2.0.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

Alpaca00 commented 2 years ago

Thanks KazuCocoa, solved this issue by adding a prefix to the capabilities, updating appium flutter driver 1.2.0 with appium 2.0 and installing plugin relaxed-caps to appium 2.0. Run CLI: appium --use-plugins=relaxed-caps -pa /wd/hub --session-override

KazuCocoa commented 2 years ago

close as current issue we may face this match issue is: