Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No observatory url was found in the device log For Android and IOS real device. #393

Closed
sandesh181199 opened this issue Jan 10, 2023 · 5 comments

Comments

@sandesh181199
Copy link

Error message: Encountered internal error running the command: Error: No observatory URL was found in the device log. Please make sure the application under test logs an observatory URL when the application starts.
Current Appium version: v2.0.0-beta.46
Flutter driver: flutter@1.10.0

I am able to see the observatory URL using "adb logcat | select-string Observatory" but I am not able to connect to the observatory URL while executing.

Sharing the logs below :
--> POST /session
[HTTP] {"desiredCapabilities":{"app":"C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk","noReset":"true","reportFormat":"html","maxRetryCount":20,"deviceName":"Galaxy S20 FE 5G","adbExecTimeout":90000,"retryBackoffTime":1000,"automationName":"Flutter","reportDirectory":"reports","skipUnlock":"true","platformName":"Android","udid":"RZCR9012A8X","testName":"Flutter Automation"},"capabilities":{"firstMatch":[{"adbExecTimeout":90000,"appium:app":"C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk","appium:automationName":"Flutter","appium:deviceName":"Galaxy S20 FE 5G","maxRetryCount":20,"appium:noReset":"true","platformName":"android","reportDirectory":"reports","reportFormat":"html","retryBackoffTime":1000,"skipUnlock":"true","testName":"Flutter Automation","appium:udid":"RZCR9012A8X"}]}}
[debug] [AppiumDriver@79b8] Calling AppiumDriver.createSession() with args: [{"app":"C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk","noReset":"true","reportFormat":"html","maxRetryCount":20,"deviceName":"Galaxy S20 FE 5G","adbExecTimeout":90000,"retryBackoffTime":1000,"automationName":"Flutter","reportDirectory":"reports","skipUnlock":"true","platformName":"Android","udid":"RZCR9012A8X","testName":"Flutter Automation"},null,{"firstMatch":[{"adbExecTimeout":90000,"appium:app":"C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk","appium:automationName":"Flutter","appium:deviceName":"Galaxy S20 FE 5G","maxRetryCount":20,"appium:noReset":"true","platformName":"android","reportDirectory":"reports","reportFormat":"html","retryBackoffTime":1000,"skipUnlock":"true","testName":"Flutter Automation","appium:udid":"RZCR9012A8X"}]}]
[AppiumDriver@79b8] Plugins which can handle cmd 'createSession': relaxed-caps
[AppiumDriver@79b8] Plugin relaxed-caps is now handling cmd 'createSession'
[Plugin [relaxed-caps]] Adjusted keys to conform to capability prefix requirements: ["adbExecTimeout","maxRetryCount","reportDirectory","reportFormat","retryBackoffTime","skipUnlock","testName"]
[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 C:\Users\Svanwadi\node_modules\appium-flutter-driver
[debug] [Appium] Requiring driver at C:\Users\Svanwadi\node_modules\appium-flutter-driver
[AppiumDriver@79b8] Appium v2.0.0-beta.46 creating new FlutterDriver (v1.10.0) session
[AppiumDriver@79b8] Checking BaseDriver versions for Appium and FlutterDriver
[AppiumDriver@79b8] Appium's BaseDriver version is 8.7.3
[AppiumDriver@79b8] FlutterDriver's BaseDriver version is 8.7.3
[debug] [FlutterDriver@19dd] Creating session with W3C capabilities: {
[debug] [FlutterDriver@19dd] "alwaysMatch": {
[debug] [FlutterDriver@19dd] "platformName": "android",
[debug] [FlutterDriver@19dd] "appium:adbExecTimeout": 90000,
[debug] [FlutterDriver@19dd] "appium:app": "C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk",
[debug] [FlutterDriver@19dd] "appium:automationName": "Flutter",
[debug] [FlutterDriver@19dd] "appium:deviceName": "Galaxy S20 FE 5G",
[debug] [FlutterDriver@19dd] "appium:maxRetryCount": 20,
[debug] [FlutterDriver@19dd] "appium:noReset": "true",
[debug] [FlutterDriver@19dd] "appium:reportDirectory": "reports",
[debug] [FlutterDriver@19dd] "appium:reportFormat": "html",
[debug] [FlutterDriver@19dd] "appium:retryBackoffTime": 1000,
[debug] [FlutterDriver@19dd] "appium:skipUnlock": "true",
[debug] [FlutterDriver@19dd] "appium:testName": "Flutter Automation",
[debug] [FlutterDriver@19dd] "appium:udid": "RZCR9012A8X"
[debug] [FlutterDriver@19dd] },
[debug] [FlutterDriver@19dd] "firstMatch": [
[debug] [FlutterDriver@19dd] {}
[debug] [FlutterDriver@19dd] ]
[debug] [FlutterDriver@19dd] }
[FlutterDriver@19dd] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[FlutterDriver@19dd] The following capabilities were provided, but are not recognized by Appium:
[FlutterDriver@19dd] adbExecTimeout
[FlutterDriver@19dd] maxRetryCount
[FlutterDriver@19dd] reportDirectory
[FlutterDriver@19dd] reportFormat
[FlutterDriver@19dd] retryBackoffTime
[FlutterDriver@19dd] skipUnlock
[FlutterDriver@19dd] testName
[FlutterDriver@19dd (368f2cb3)] Session created with session id: 368f2cb3-4719-4b2e-93a6-b83d4cc8b5a1
[FlutterDriver] Starting an Android proxy session
[debug] [AndroidUiautomator2Driver@7883] Creating session with W3C capabilities: {
[debug] [AndroidUiautomator2Driver@7883] "alwaysMatch": {
[debug] [AndroidUiautomator2Driver@7883] "platformName": "android",
[debug] [AndroidUiautomator2Driver@7883] "appium:adbExecTimeout": 90000,
[debug] [AndroidUiautomator2Driver@7883] "appium:app": "C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk",
[debug] [AndroidUiautomator2Driver@7883] "appium:automationName": "Flutter",
[debug] [AndroidUiautomator2Driver@7883] "appium:deviceName": "Galaxy S20 FE 5G",
[debug] [AndroidUiautomator2Driver@7883] "appium:maxRetryCount": 20,
[debug] [AndroidUiautomator2Driver@7883] "appium:noReset": "true",
[debug] [AndroidUiautomator2Driver@7883] "appium:reportDirectory": "reports",
[debug] [AndroidUiautomator2Driver@7883] "appium:reportFormat": "html",
[debug] [AndroidUiautomator2Driver@7883] "appium:retryBackoffTime": 1000,
[debug] [AndroidUiautomator2Driver@7883] "appium:skipUnlock": "true",
[debug] [AndroidUiautomator2Driver@7883] "appium:testName": "Flutter Automation",
[debug] [AndroidUiautomator2Driver@7883] "appium:udid": "RZCR9012A8X"
[debug] [AndroidUiautomator2Driver@7883] },
[debug] [AndroidUiautomator2Driver@7883] "firstMatch": [
[debug] [AndroidUiautomator2Driver@7883] {}
[debug] [AndroidUiautomator2Driver@7883] ]
[debug] [AndroidUiautomator2Driver@7883] }
[AndroidUiautomator2Driver@7883] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[AndroidUiautomator2Driver@7883] Capability 'skipUnlock' changed from string to boolean. This may cause unexpected behavior
[AndroidUiautomator2Driver@7883] The following capabilities were provided, but are not recognized by Appium:
[AndroidUiautomator2Driver@7883] maxRetryCount
[AndroidUiautomator2Driver@7883] reportDirectory
[AndroidUiautomator2Driver@7883] reportFormat
[AndroidUiautomator2Driver@7883] retryBackoffTime
[AndroidUiautomator2Driver@7883] testName
[AndroidUiautomator2Driver@7883 (7bf97df8)] Session created with session id: 7bf97df8-ff2e-4046-8491-ad1ee6b71d00
[BaseDriver] Using local app 'C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk'
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Checking whether app is actually present
[ADB] Using 'adb.exe' from 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -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":"RZCR9012A8X","state":"device"}]
[AndroidDriver] Using device: RZCR9012A8X
[ADB] Using 'adb.exe' from 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server'
[debug] [ADB] Setting device id to RZCR9012A8X
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 33
[ADB] Getting device platform version
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 13
[debug] [ADB] Device API level: 33
[AndroidUiautomator2Driver@7883 (7bf97df8)] Relaxing hidden api policy
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X 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.flutter_android_1'
[ADB] Main activity name: 'com.example.flutter_android_1.MainActivity'
[debug] [AndroidDriver] Parsed package and activity are: com.example.flutter_android_1/com.example.flutter_android_1.MainActivity
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X wait-for-device'
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X 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 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X 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.2.3' >= '4.2.3')
[debug] [ADB] There is no need to install/upgrade 'C:\Users\Svanwadi\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell 'pgrep --help; echo $?''
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X 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] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell appops set io.appium.settings android:mock_location allow'
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell "[ -e '/data/local/tmp/mock_apps.json' ] && echo PASS"'
[AndroidDriver] Unable to persist mock location app id 'io.appium.settings': adb.pushFile is not a function
[debug] [Logcat] Starting logs capture with command: C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X logcat -v threadtime
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Forwarding UiAutomator2 Server port 6790 to local port 8208
[debug] [ADB] Forwarding system: 8208 to device: 6790
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X forward tcp:8208 tcp:6790'
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X 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 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X 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.7.4' >= '5.7.4')
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] io.appium.uiautomator2.server installation state: sameVersionInstalled
[debug] [ADB] Checking app cert for C:\Users\Svanwadi\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v5.7.4.apk
[debug] [ADB] Using the previously cached signature entry for 'appium-uiautomator2-server-v5.7.4.apk'
[debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-v5.7.4.apk'
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell dumpsys package io.appium.uiautomator2.server.test'
[debug] [ADB] 'io.appium.uiautomator2.server.test' is installed
[debug] [ADB] Checking app cert for C:\Users\Svanwadi\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Using the previously cached signature entry for 'appium-uiautomator2-server-debug-androidTest.apk'
[debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk'
[AndroidUiautomator2Driver@7883 (7bf97df8)] Server packages are not going to be (re)installed
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Waiting up to 30000ms for services to be available
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell pm list instrumentation'
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] 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 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[debug] [ADB] Getting install status for com.example.flutter_android_1
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell dumpsys package com.example.flutter_android_1'
[debug] [ADB] 'com.example.flutter_android_1' is installed
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] noReset has been requested and the app is already installed. Doing nothing
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Performing shallow cleanup of automation leftovers
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] The following obsolete sessions are still running: ["3b11c535-8f0a-4c84-b0ab-f49045c52e65"]
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Cleaning up 1 obsolete session
[debug] [Instrumentation] .
[debug] [Instrumentation] Time: 160.095
[debug] [Instrumentation]
[debug] [Instrumentation] OK (1 test)
[debug] [Instrumentation] The process has exited with code 0
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell am force-stop io.appium.uiautomator2.server.test'
[AndroidUiautomator2Driver@7883 (7bf97df8)] Starting UIAutomator2 server 5.7.4
[AndroidUiautomator2Driver@7883 (7bf97df8)] Using UIAutomator2 server from 'C:\Users\Svanwadi\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v5.7.4.apk' and test from 'C:\Users\Svanwadi\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[AndroidUiautomator2Driver@7883 (7bf97df8)] Waiting up to 30000ms for UiAutomator2 to be online...
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","RZCR9012A8X","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Matched '/status' to command name 'getStatus'
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Proxying [GET /status] to [GET http://127.0.0.1:8208/status] with no body
[AndroidUiautomator2Driver@7883 (7bf97df8)] socket hang up
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Matched '/status' to command name 'getStatus'
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Proxying [GET /status] to [GET http://127.0.0.1:8208/status] with no body
[AndroidUiautomator2Driver@7883 (7bf97df8)] socket hang up
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Matched '/status' to command name 'getStatus'
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Proxying [GET /status] to [GET http://127.0.0.1:8208/status] with no body
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] The initialization of the instrumentation process took 2109ms
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Matched '/session' to command name 'createSession'
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Proxying [POST /session] to [POST http://127.0.0.1:8208/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","adbExecTimeout":90000,"app":"C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk","automationName":"Flutter","deviceName":"Galaxy S20 FE 5G","maxRetryCount":20,"noReset":true,"reportDirectory":"reports","reportFormat":"html","retryBackoffTime":1000,"skipUnlock":true,"testName":"Flutter Automation","udid":"RZCR9012A8X"},"platformName":"android","adbExecTimeout":90000,"app":"C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk","automationName":"Flutter","deviceName":"RZCR9012A8X","maxRetryCount":20,"noReset":true,"reportDirectory":"reports","reportFormat":"html","retryBackoffTime":1000,"skipUnlock":true,"testName":"Flutter Automation","udid":...
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Got response with status 200: {"sessionId":"2972b94d-98e9-41d5-bfd6-1a50df06bff3","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","adbExecTimeout":90000,"app":"C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk","automationName":"Flutter","deviceName":"Galaxy S20 FE 5G","maxRetryCount":20,"noReset":true,"reportDirectory":"reports","reportFormat":"html","retryBackoffTime":1000,"skipUnlock":true,"testName":"Flutter Automation","udid":"RZCR9012A8X"},"platformName":"android","adbExecTimeout":90000,"app":"C:\Users\Svanwadi\Downloads\AppiumFlutterDriver-main\AppiumFlutterDriver-main\flutterlogin-debug.apk","automationName":"Flutter","deviceName":"RZCR9012A8X","maxRetryCount":20,"noReset":true,"reportDirectory":"reports","reportFormat":"html","retryBackoffTime":10...
[AndroidUiautomator2Driver@7883 (7bf97df8)] Determined the downstream protocol as 'W3C'
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8208/session/2972b94d-98e9-41d5-bfd6-1a50df06bff3/appium/device/info] with no body
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Got response with status 200: {"sessionId":"2972b94d-98e9-41d5-bfd6-1a50df06bff3","value":{"androidId":"7d2eeb299ca4ac78","apiVersion":"33","bluetooth":{"state":"OFF"},"brand":"samsung","carrierName":"Vi India","displayDensity":480,"locale":"en_GB","manufacturer":"samsung","model":"SM-G781B","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":18233,"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":-58,"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":5818,"linkUpstreamBandwidthKbps":25035,"networkCapabilities":...
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] 'skipUnlock' capability set, so skipping device unlock
[AndroidUiautomator2Driver@7883 (7bf97df8)] Starting 'com.example.flutter_android_1/com.example.flutter_android_1.MainActivity and waiting for 'com.example.flutter_android_1/com.example.flutter_android_1.MainActivity'
[debug] [ADB] Getting IDs of all 'com.example.flutter_android_1' processes
[debug] [ADB] Running 'C:\Users\Svanwadi\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s RZCR9012A8X shell pgrep -f ([[:blank:]]|^)com.example.flutter_android_1([[:blank:]]|$)'
[AndroidUiautomator2Driver@7883 (7bf97df8)] 'com.example.flutter_android_1' is already running
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8208/session/2972b94d-98e9-41d5-bfd6-1a50df06bff3/appium/device/pixel_ratio] with no body
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Got response with status 200: {"sessionId":"2972b94d-98e9-41d5-bfd6-1a50df06bff3","value":3}
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8208/session/2972b94d-98e9-41d5-bfd6-1a50df06bff3/appium/device/system_bars] with no body
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Got response with status 200: {"sessionId":"2972b94d-98e9-41d5-bfd6-1a50df06bff3","value":{"statusBar":88}}
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Matched '/window/current/size' to command name 'getWindowSize'
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8208/session/2972b94d-98e9-41d5-bfd6-1a50df06bff3/window/current/size] with no body
[debug] [AndroidUiautomator2Driver@7883 (7bf97df8)] Got response with status 200: {"sessionId":"2972b94d-98e9-41d5-bfd6-1a50df06bff3","value":{"height":2168,"width":1080}}
[FlutterDriver] Attempt #1
[debug] [FlutterDriver] Deleting Flutter Driver session
[AppiumDriver@79b8] 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: ["relaxed-caps"].
[debug] [AppiumDriver@79b8] Encountered internal error running command: Error: No observatory url was found in the device log. Please make sure the application under test logs an observatory url when the application starts.
[debug] [AppiumDriver@79b8] at processLogToGetobservatory (C:\Users\Svanwadi\node_modules\appium-flutter-driver\lib\sessions\observatory.ts:191:11)
[debug] [AppiumDriver@79b8] at getObservatoryWsUri (C:\Users\Svanwadi\node_modules\appium-flutter-driver\lib\sessions\android.ts:44:43)
[debug] [AppiumDriver@79b8] at connectSocket (C:\Users\Svanwadi\node_modules\appium-flutter-driver\lib\sessions\observatory.ts:31:38)
[debug] [AppiumDriver@79b8] at startAndroidSession (C:\Users\Svanwadi\node_modules\appium-flutter-driver\lib\sessions\android.ts:27:18)
[debug] [AppiumDriver@79b8] at runMicrotasks ()
[debug] [AppiumDriver@79b8] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[debug] [AppiumDriver@79b8] at FlutterDriver.createSession (C:\Users\Svanwadi\node_modules\appium-flutter-driver\lib\sessions\session.ts:22:47)
[debug] [AppiumDriver@79b8] at AppiumDriver.createSession (C:\Users\Svanwadi\AppData\Roaming\npm\node_modules\appium\lib\appium.js:336:35)
[debug] [AppiumDriver@79b8] at RelaxedCapsPlugin.createSession (C:\Users\Svanwadi\node_modules@appium\relaxed-caps-plugin\lib\plugin.js:58:12)
[debug] [AppiumDriver@79b8] at C:\Users\Svanwadi\AppData\Roaming\npm\node_modules\appium\lib\appium.js:722:18
[debug] [AppiumDriver@79b8] at AppiumDriver.executeWrappedCommand (C:\Users\Svanwadi\AppData\Roaming\npm\node_modules\appium\lib\appium.js:762:16)
[debug] [AppiumDriver@79b8] at AppiumDriver.executeCommand (C:\Users\Svanwadi\AppData\Roaming\npm\node_modules\appium\lib\appium.js:684:17)
[debug] [AppiumDriver@79b8] at asyncHandler (C:\Users\Svanwadi\AppData\Roaming\npm\node_modules\appium\node_modules@appium\base-driver\lib\protocol\protocol.js:346:19)
[HTTP] <-- POST /session 500 31177 ms - 970

@bq-wrongway
Copy link

You should check the instructions again:
Your app must do 3 things:
Be in debug/profile mode
Has flutter_driver enabled as dev dependency
And has enableFlutterDriverExtension() set before running

Thats why you get your error

@sandesh181199
Copy link
Author

Hi, thanks for the reply.
My application is built in debug mode and has flutter driver enabled as well and enableFlutterDriverExtension() is set as well in the codebase.
The automation is getting executed with my Emulator and Simulators but it is giving issue with real Android and iOS devices.

@KazuCocoa
Copy link
Member

For iOS, it may need to build as profile mode. Afaik iOS 14+ requires the profile mode for real devices.
Maybe the original page was removed... but ordinally https://flutter.dev/docs/development/ios-14 had a page to explain that iOS 14+ requires profile build for real devices

@mayank2193
Copy link

Hi @sandesh181199 , I'm also facing the same issue, Can you please guide if this was resolved for you?

@KazuCocoa
Copy link
Member

in ios, it needs to run as "debug" process. it is currently available via ios-deploy flutter/flutter#120789 (comment)
For now, this driver provides the possibility to manage to launch app processes outside this driver's lifecycle so that you can use such 3rd party tools as https://github.com/appium/appium-flutter-driver?tab=readme-ov-file#several-ways-to-start-an-application.

Maybe Android does not have such cases, but potentially newer flutter's log message change also affected,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants