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

Failed to create session. An unknown server-side error occurred while processing the command. Original error: No observatory URL matching to '/(Observatory listening on |An Observatory debugger and profiler on\s.+\sis available at: |The Dart VM service is listening on )((http|\/\/)[a-zA-Z0-9:/=_\-.\[\]]+)/' was found in the device log. Please make sure the application under test is configured properly according to https://github.com/appium/appium-flutter-driver#usage and that it does not crash on startup. #731

Open
DianPermana opened this issue Sep 10, 2024 · 5 comments
Labels

Comments

@DianPermana
Copy link

Hi @KazuCocoa I found this issue : please help, maybe I miss something

=============
Video

2024-09-10_15-39-21.mp4

Failed to create session. An unknown server-side error occurred while processing the command. Original error: No observatory URL matching to '/(Observatory listening on |An Observatory debugger and profiler on\s.+\sis available at: |The Dart VM service is listening on )((http|//)[a-zA-Z0-9:/=_-.[]]+)/' was found in the device log. Please make sure the application under test is configured properly according to https://github.com/appium/appium-flutter-driver#usage and that it does not crash on startup.

=============
Initialization :

Windows 11

C:\Users\User>appium-doctor
info AppiumDoctor Appium Doctor v.1.16.0
info AppiumDoctor ### Diagnostic for necessary dependencies starting ###
info AppiumDoctor ✔ The Node.js binary was found at: C:\Program Files\nodejs\node.EXE
info AppiumDoctor ✔ Node version is 18.3.0
info AppiumDoctor ✔ ANDROID_HOME is set to: C:\Users\User\AppData\Local\Android\Sdk
info AppiumDoctor ✔ JAVA_HOME is set to: C:\Program Files\Java\jdk-17.0.5
info AppiumDoctor Checking adb, android, emulator
info AppiumDoctor 'adb' is in C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe
info AppiumDoctor 'android' is in C:\Users\User\AppData\Local\Android\Sdk\tools\android.bat
info AppiumDoctor 'emulator' is in C:\Users\User\AppData\Local\Android\Sdk\emulator\emulator.exe
info AppiumDoctor ✔ adb, android, emulator exist: C:\Users\User\AppData\Local\Android\Sdk
info AppiumDoctor ✔ 'bin' subfolder exists under 'C:\Program Files\Java\jdk-17.0.5'
info AppiumDoctor ### Diagnostic for necessary dependencies completed, no fix needed. ###
info AppiumDoctor
info AppiumDoctor ### Diagnostic for optional dependencies starting ###
WARN AppiumDoctor ✖ opencv4nodejs cannot be found.
WARN AppiumDoctor ✖ ffmpeg cannot be found
WARN AppiumDoctor ✖ mjpeg-consumer cannot be found.
WARN AppiumDoctor ✖ bundletool.jar cannot be found
WARN AppiumDoctor ✖ gst-launch-1.0.exe and/or gst-inspect-1.0.exe cannot be found
info AppiumDoctor ### Diagnostic for optional dependencies completed, 5 fixes possible. ###
info AppiumDoctor
info AppiumDoctor ### Optional Manual Fixes ###
info AppiumDoctor The configuration can install optionally. Please do the following manually:
WARN AppiumDoctor ➜ Why opencv4nodejs is needed and how to install it: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/image-comparison.md
WARN AppiumDoctor ➜ ffmpeg is needed to record screen features. Please read https://www.ffmpeg.org/ to install it
WARN AppiumDoctor ➜ mjpeg-consumer module is required to use MJPEG-over-HTTP features. Please install it with 'npm i -g mjpeg-consumer'.
WARN AppiumDoctor ➜ bundletool.jar is used to handle Android App Bundle. Please read http://appium.io/docs/en/writing-running-appium/android/android-appbundle/ to install it. Also consider adding the ".jar" extension into your PATHEXT environment variable in order to fix the problem for Windows
WARN AppiumDoctor ➜ gst-launch-1.0.exe and gst-inspect-1.0.exe are used to stream the screen of the device under test. Please read https://appium.io/docs/en/writing-running-appium/android/android-screen-streaming/ to install them and for more details
info AppiumDoctor
info AppiumDoctor ###
info AppiumDoctor
info AppiumDoctor Bye! Run appium-doctor again when all manual fixes have been applied!
info AppiumDoctor

=============
detail :

PS C:\Users\User> appium
[Appium] Welcome to Appium v2.11.3
[Appium] The autodetected Appium home path: C:\Users\User.appium
[Appium] Attempting to load driver flutter...
[Appium] Attempting to load driver uiautomator2...
[Appium] Attempting to load driver windows...
[Appium] Requiring driver at C:\Users\User.appium\node_modules\appium-flutter-driver\build\lib\driver.js
[Appium] Requiring driver at C:\Users\User.appium\node_modules\appium-windows-driver\build\index.js
[Appium] Requiring driver at C:\Users\User.appium\node_modules\appium-uiautomator2-driver\build\index.js
[Appium] FlutterDriver has been successfully loaded in 2.023s
[Appium] WindowsDriver has been successfully loaded in 2.023s
[Appium] AndroidUiautomator2Driver has been successfully loaded in 2.023s
[Appium] Attempting to load driver chromium...
[Appium] Requiring driver at C:\Users\User.appium\node_modules\appium-chromium-driver\index.js
[Appium] ChromiumDriver has been successfully loaded in 0.419s
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723
[Appium] You can provide the following URLs in your client code to connect to this server:
http://192.XXX.XX.1:4723/
http://192.XXX.XX.2:4723/
http://192.XXX.XX.16:4723/
http://127.0.0.1:4723/ (only accessible from the same host)
[Appium] Available drivers:
[Appium] - [email protected] (automationName 'Flutter')
[Appium] - [email protected] (automationName 'UiAutomator2')
[Appium] - [email protected] (automationName 'Windows')
[Appium] - [email protected] (automationName 'Chromium')
[Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use.
[HTTP] --> POST /session {"capabilities":{"alwaysMatch":{"platformName":"Android","appium:platformVersion":"14","appium:deviceName":"Emulator_test_123","appium:noReset":"true","appium:appActivity":".MainActivity","appium:appPackage":"com.example.github_actions_example","appium:automationName":"flutter","appium:ignoreHiddenApiPolicyError":true,"appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"Android","appium:platformVersion":"14","appium:deviceName":"Emulator_test_123","appium:noReset":"true","appium:appActivity":".MainActivity","appium:appPackage":"com.example.github_actions_example","appium:automationName":"flutter","appium:ignoreHiddenApiPolicyError":true,"appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true}}
[AppiumDriver@be97] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","appium:platformVersion":"14","appium:deviceName":"Emulator_test_123","appium:noReset":"true","appium:appActivity":".MainActivity","appium:appPackage":"com.example.github_actions_example","appium:automationName":"flutter","appium:ignoreHiddenApiPolicyError":true,"appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},null,{"alwaysMatch":{"platformName":"Android","appium:platformVersion":"14","appium:deviceName":"Emulator_test_123","appium:noReset":"true","appium:appActivity":".MainActivity","appium:appPackage":"com.example.github_actions_example","appium:automationName":"flutter","appium:ignoreHiddenApiPolicyError":true,"appium:ensureWebviewsHavePages":true,"appium:nativeWebScreenshot":true,"appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},"firstMatch":[{}]}]
[AppiumDriver@be97] Event 'newSessionRequested' logged at 1725957565108 (15:39:25 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 C:\Users\User.appium\node_modules\appium-flutter-driver
[Appium] Requiring driver at C:\Users\User.appium\node_modules\appium-flutter-driver\build\lib\driver.js
[AppiumDriver@be97] Appium v2.11.3 creating new FlutterDriver (v2.9.2) session
[AppiumDriver@be97] Checking BaseDriver versions for Appium and FlutterDriver
[AppiumDriver@be97] Appium's BaseDriver version is 9.11.3
[AppiumDriver@be97] FlutterDriver's BaseDriver version is 9.11.3
[FlutterDriver@8431]
[FlutterDriver@8431] Creating session with W3C capabilities: {
"alwaysMatch": {
"platformName": "Android",
"appium:platformVersion": "14",
"appium:deviceName": "Emulator_test_123",
"appium:noReset": "true",
"appium:appActivity": ".MainActivity",
"appium:appPackage": "com.example.github_actions_example",
"appium:automationName": "flutter",
"appium:ignoreHiddenApiPolicyError": true,
"appium:ensureWebviewsHavePages": true,
"appium:nativeWebScreenshot": true,
"appium:newCommandTimeout": 3600,
"appium:connectHardwareKeyboard": true
},
"firstMatch": [
{}
]
}
[FlutterDriver@8431] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[FlutterDriver@8431] The following provided capabilities were not recognized by this driver:
[FlutterDriver@8431] deviceName
[FlutterDriver@8431] appActivity
[FlutterDriver@8431] appPackage
[FlutterDriver@8431] ignoreHiddenApiPolicyError
[FlutterDriver@8431] ensureWebviewsHavePages
[FlutterDriver@8431] nativeWebScreenshot
[FlutterDriver@8431] connectHardwareKeyboard
[505401b8][FlutterDriver@8431] Session created with session id: 505401b8-da19-459c-92ce-3506d5546be0
[505401b8][FlutterDriver@8431] Starting an Android proxy session
[505401b8][AndroidUiautomator2Driver@c92b]
[505401b8][AndroidUiautomator2Driver@c92b] Creating session with W3C capabilities: {
"alwaysMatch": {
"platformName": "Android",
"appium:platformVersion": "14",
"appium:deviceName": "Emulator_test_123",
"appium:noReset": "true",
"appium:appActivity": ".MainActivity",
"appium:appPackage": "com.example.github_actions_example",
"appium:automationName": "flutter",
"appium:ignoreHiddenApiPolicyError": true,
"appium:ensureWebviewsHavePages": true,
"appium:nativeWebScreenshot": true,
"appium:newCommandTimeout": 3600,
"appium:connectHardwareKeyboard": true
},
"firstMatch": [
{}
]
}
[505401b8][AndroidUiautomator2Driver@c92b] Capability 'noReset' changed from string to boolean. This may cause unexpected behavior
[505401b8][AndroidUiautomator2Driver@c92b] The following provided capabilities were not recognized by this driver:
[505401b8][AndroidUiautomator2Driver@c92b] connectHardwareKeyboard
[b7d99cd8][AndroidUiautomator2Driver@c92b] Session created with session id: b7d99cd8-1517-4fcd-bfed-9ef1ecbb5916
[b7d99cd8][ADB] Found 2 'build-tools' folders under 'C:\Users\User\AppData\Local\Android\Sdk' (newest first):
[b7d99cd8][ADB] C:\Users\User\AppData\Local\Android\Sdk\build-tools\33.0.0
[b7d99cd8][ADB] C:\Users\User\AppData\Local\Android\Sdk\build-tools\30.0.3
[b7d99cd8][ADB] Using 'adb.exe' from 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Retrieving device list
[b7d99cd8][ADB] Trying to find connected Android devices
[b7d99cd8][ADB] Getting connected devices
[b7d99cd8][ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[b7d99cd8][AndroidUiautomator2Driver@c92b] Looking for a device with Android '14.0.0'
[b7d99cd8][ADB] Setting device id to emulator-5554
[b7d99cd8][ADB] Getting device platform version
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[b7d99cd8][ADB] Current device property 'ro.build.version.release': 14
[b7d99cd8][AndroidUiautomator2Driver@c92b] Using device: emulator-5554
[b7d99cd8][ADB] Using 'adb.exe' from 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe'
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server'
[b7d99cd8][ADB] Setting device id to emulator-5554
[b7d99cd8][AndroidUiautomator2Driver@c92b] Starting 'com.example.github_actions_example' directly on the device
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[b7d99cd8][ADB] Current device property 'ro.build.version.sdk': 34
[b7d99cd8][ADB] Getting device platform version
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[b7d99cd8][ADB] Current device property 'ro.build.version.release': 14
[b7d99cd8][ADB] Device API level: 34
[b7d99cd8][AndroidUiautomator2Driver@c92b] Relaxing hidden api policy
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -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''
[b7d99cd8][AndroidUiautomator2Driver@c92b] No app sent in, not parsing package/activity
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 wait-for-device'
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell echo ping'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Pushing settings apk to the device...
[b7d99cd8][ADB] Getting package info for 'io.appium.settings'
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[b7d99cd8][ADB] Using 'aapt2.exe' from 'C:\Users\User\AppData\Local\Android\Sdk\build-tools\33.0.0\aapt2.exe'
[b7d99cd8][ADB] Reading package manifest: 'C:\Users\User\AppData\Local\Android\Sdk\build-tools\33.0.0\aapt2.exe dump badging C:\Users\User\.appium\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
[b7d99cd8][ADB] The version code of the installed 'io.appium.settings' is greater than the application version code (103 > 98)
[b7d99cd8][ADB] There is no need to downgrade 'io.appium.settings'
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys activity services io.appium.settings'
[b7d99cd8][AndroidUiautomator2Driver@c92b] io.appium.settings is already running. There is no need to reset its permissions.
[b7d99cd8][Logcat] Starting logs capture with command: C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 logcat -v threadtime
[b7d99cd8][AndroidUiautomator2Driver@c92b] Forwarding UiAutomator2 Server port 6790 to local port 8229
[b7d99cd8][ADB] Forwarding system: 8229 to device: 6790
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 forward tcp:8229 tcp:6790'
[b7d99cd8][ADB] Getting package info for 'io.appium.uiautomator2.server'
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[b7d99cd8][ADB] Getting install status for io.appium.uiautomator2.server.test
[b7d99cd8][AndroidUiautomator2Driver@c92b] No app capability. Assuming it is already on the device
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell cmd package list packages'
[b7d99cd8][ADB] Reading package manifest: 'C:\Users\User\AppData\Local\Android\Sdk\build-tools\33.0.0\aapt2.exe dump badging C:\Users\User\.appium\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v7.0.21.apk'
[b7d99cd8][ADB] 'io.appium.uiautomator2.server.test' is installed
[b7d99cd8][ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('7.0.21' >= '7.0.21')
[b7d99cd8][AndroidUiautomator2Driver@c92b] Server packages status: [{"installState":"sameVersionInstalled","appPath":"C:\Users\User\.appium\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v7.0.21.apk","appId":"io.appium.uiautomator2.server"},{"installState":"sameVersionInstalled","appPath":"C:\Users\User\.appium\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk","appId":"io.appium.uiautomator2.server.test"}]
[b7d99cd8][AndroidUiautomator2Driver@c92b] Server packages are not going to be (re)installed
[b7d99cd8][AndroidUiautomator2Driver@c92b] Waiting up to 30000ms for services to be available
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm list instrumentation'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[b7d99cd8][ADB] Adding packages ["io.appium.settings","io.appium.uiautomator2.server","io.appium.uiautomator2.server.test"] to Doze whitelist
[b7d99cd8][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",";"]]
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -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 ;'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Performing shallow cleanup of automation leftovers
[b7d99cd8][AndroidUiautomator2Driver@c92b] The following obsolete sessions are still running: ["eb1bc555-5e10-4592-adc2-d207c0e6c13e"]
[b7d99cd8][AndroidUiautomator2Driver@c92b] Cleaning up 1 obsolete session
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server'
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Starting UIAutomator2 server 7.0.21
[b7d99cd8][AndroidUiautomator2Driver@c92b] Using UIAutomator2 server from 'C:\Users\User.appium\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v7.0.21.apk' and test from 'C:\Users\User.appium\node_modules\appium-flutter-driver\node_modules\appium-uiautomator2-driver\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Waiting up to 30000ms for UiAutomator2 to be online...
[b7d99cd8][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"]
[b7d99cd8][AndroidUiautomator2Driver@c92b] Matched '/status' to command name 'getStatus'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Proxying [GET /status] to [GET http://127.0.0.1:8229/status] with no body
[b7d99cd8][AndroidUiautomator2Driver@c92b] socket hang up
[b7d99cd8][AndroidUiautomator2Driver@c92b] [Instrumentation]
[b7d99cd8][AndroidUiautomator2Driver@c92b] Matched '/status' to command name 'getStatus'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Proxying [GET /status] to [GET http://127.0.0.1:8229/status] with no body
[b7d99cd8][AndroidUiautomator2Driver@c92b] socket hang up
[b7d99cd8][AndroidUiautomator2Driver@c92b] Matched '/status' to command name 'getStatus'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Proxying [GET /status] to [GET http://127.0.0.1:8229/status] with no body
[b7d99cd8][AndroidUiautomator2Driver@c92b] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[b7d99cd8][AndroidUiautomator2Driver@c92b] The initialization of the instrumentation process took 2136ms
[b7d99cd8][AndroidUiautomator2Driver@c92b] Matched '/session' to command name 'createSession'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Proxying [POST /session] to [POST http://127.0.0.1:8229/session] with body: {"capabilities":{"firstMatch":[{"platformName":"Android","platformVersion":"14","deviceName":"emulator-5554","noReset":true,"appActivity":".MainActivity","appPackage":"com.example.github_actions_example","automationName":"flutter","ignoreHiddenApiPolicyError":true,"ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true,"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","platformVersion":"14","deviceName":"Emulator_test_123","noReset":true,"appActivity":".MainActivity","appPackage":"com.example.github_actions_example","automationName":"flutter","ignoreHiddenApiPolicyError":true,"ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true},"deviceUDID":"emulator-5554"}],"alwaysMatch":{}}}
[b7d99cd8][AndroidUiautomator2Driver@c92b] Got response with status 200: {"sessionId":"593d02ee-4f74-4f4a-9754-0855b9e2ea0e","value":{"capabilities":{"firstMatch":[{"platformName":"Android","platformVersion":"14","deviceName":"emulator-5554","noReset":true,"appActivity":".MainActivity","appPackage":"com.example.github_actions_example","automationName":"flutter","ignoreHiddenApiPolicyError":true,"ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true,"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","platformVersion":"14","deviceName":"Emulator_test_123","noReset":true,"appActivity":".MainActivity","appPackage":"com.example.github_actions_example","automationName":"flutter","ignoreHiddenApiPolicyError":true,"ensureWebviewsHavePages":true,"nativeWebScreenshot":true,"newCommandTimeout":3600,"connectHardwareKeyboard":true},"deviceUDID":"emulator-55...
[b7d99cd8][AndroidUiautomator2Driver@c92b] Determined the downstream protocol as 'W3C'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8229/session/593d02ee-4f74-4f4a-9754-0855b9e2ea0e/appium/device/pixel_ratio] with no body
[b7d99cd8][AndroidUiautomator2Driver@c92b] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8229/session/593d02ee-4f74-4f4a-9754-0855b9e2ea0e/appium/device/system_bars] with no body
[b7d99cd8][AndroidUiautomator2Driver@c92b] Matched '/window/current/size' to command name 'getWindowSize'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8229/session/593d02ee-4f74-4f4a-9754-0855b9e2ea0e/window/current/size] with no body
[b7d99cd8][AndroidUiautomator2Driver@c92b] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8229/session/593d02ee-4f74-4f4a-9754-0855b9e2ea0e/appium/device/info] with no body
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys window'
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys power'
[b7d99cd8][AndroidUiautomator2Driver@c92b] Got response with status 200: {"sessionId":"593d02ee-4f74-4f4a-9754-0855b9e2ea0e","value":2.75}
[b7d99cd8][AndroidUiautomator2Driver@c92b] Got response with status 200: {"sessionId":"593d02ee-4f74-4f4a-9754-0855b9e2ea0e","value":{"height":2280,"width":1080}}
[b7d99cd8][AndroidUiautomator2Driver@c92b] Got response with status 200: {"sessionId":"593d02ee-4f74-4f4a-9754-0855b9e2ea0e","value":{"statusBar":83}}
[b7d99cd8][AndroidUiautomator2Driver@c92b] Got response with status 200: {"sessionId":"593d02ee-4f74-4f4a-9754-0855b9e2ea0e","value":{"androidId":"0c4366abb8f3e683","apiVersion":"34","bluetooth":{"state":"ON"},"brand":"google","carrierName":"","displayDensity":440,"locale":"en_US","manufacturer":"Google","model":"sdk_gphone64_x86_64","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"}],"platformVersion":"14","realDisplaySize":"1080x2280","timeZone":"Asia/Bangkok"}}
[b7d99cd8][AndroidUiautomator2Driver@c92b] Screen already unlocked, doing nothing
[b7d99cd8][AndroidUiautomator2Driver@c92b] Starting 'com.example.github_actions_example/.MainActivity and waiting for 'com.example.github_actions_example/.MainActivity'
[b7d99cd8][ADB] Getting IDs of all 'com.example.github_actions_example' processes
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f ([[:blank:]]|^)com.example.github_actions_example([[:blank:]]|$)'
[b7d99cd8][ADB] Running 'C:\Users\User\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am start -W -n com.example.github_actions_example/.MainActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[b7d99cd8][FlutterDriver@8431] Deleting Flutter Driver session
[b7d99cd8][FlutterDriver@8431] Cleanup the port forward
[b7d99cd8][AppiumDriver@be97] Event 'newSessionStarted' logged at 1725957569912 (15:39:29 GMT+0700 (Western Indonesia Time))
[b7d99cd8][AppiumDriver@be97] Encountered internal error running command: Error: No observatory URL matching to '/(Observatory listening on |An Observatory debugger and profiler on\s.+\sis available at: |The Dart VM service is listening on )((http|//)[a-zA-Z0-9:/=_-.[]]+)/' was found in the device log. Please make sure the application under test is configured properly according to https://github.com/appium/appium-flutter-driver#usage and that it does not crash on startup.
at FlutterDriver.getObservatoryWsUri (C:\Users\User.appium\node_modules\appium-flutter-driver\lib\sessions\android.ts:85:13)
at FlutterDriver.connectAndroidSession (C:\Users\User.appium\node_modules\appium-flutter-driver\lib\sessions\android.ts:48:28)
at FlutterDriver.startAndroidSession (C:\Users\User.appium\node_modules\appium-flutter-driver\lib\sessions\android.ts:38:5)
at FlutterDriver.createSession (C:\Users\User.appium\node_modules\appium-flutter-driver\lib\sessions\session.ts:45:43)
at AppiumDriver.createSession (C:\Users\User\AppData\Roaming\npm\node_modules\appium\lib\appium.js:731:35)
[b7d99cd8][HTTP] <-- POST /session 500 4815 ms - 1378

@KazuCocoa
Copy link
Member

KazuCocoa commented Sep 10, 2024

Could you share the adb logcat as well as a gist?
Removing "appium:noReset": "true" and adding "appium:forceAppLaunch": true would also help to ensure the app process restart.

Please make sure the target app process stops before starting the target app with the above.

https://github.com/appium/appium-flutter-driver?tab=readme-ov-file#several-ways-to-start-an-application

@DianPermana
Copy link
Author

DianPermana commented Sep 11, 2024

still issue :

#video :

2024-09-11_06-51-32.mp4

#detail ADB Logcat :

https://gist.github.com/DianPermana/032b3f1114b4e1cd672ec440d8e1485c

@KazuCocoa
Copy link
Member

Thanks, but the attached link was not adb logcat. You would need to get it via https://github.com/appium/appium-uiautomator2-driver?tab=readme-ov-file#mobile-startlogsbroadcast or https://developer.android.com/studio/debug/logcat

@DianPermana
Copy link
Author

DianPermana commented Sep 18, 2024

ups, sorry @KazuCocoa . here's the update :

video

2024-09-18_07-16-09.mp4

adb logcat :

https://gist.github.com/DianPermana/29f6b9031f0859e3a0a5091dd8126eeb

appium Log :

https://gist.github.com/DianPermana/60b012f6ce1b02ace9c397e708e99f3c

@KazuCocoa
Copy link
Member

The shared logcat didn't have any observatory URL, which started with http:// and matched with the given error message, so the error itself was expected.

Have you started the installed app before the automation? Maybe Flutter doesn't log observatory URL for apps which are already running in the background. The app also needs to be debuggable app.

https://github.com/appium/appium-flutter-driver?tab=readme-ov-file#several-ways-to-start-an-application

Please make sure the target app process stops before starting the target app with the above.

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

No branches or pull requests

2 participants