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
470 stars 183 forks source link

iOS: Flutter driver not recognised in Appium #660

Open asma203 opened 9 months ago

asma203 commented 9 months ago

we have a hybrid app switching from native to flutter screen

KazuCocoa commented 9 months ago

flutter to flutter screen

What does this mean? NATIVE_APP context vs FLUTTER context? Attaching the appium server full log may help to understand the situation.

asma203 commented 9 months ago

our app is hybrid when we switch from the native screen to Flutter it works fine when Flutter to Flutter in the same app it didn't work , no element clicked, check driver.switchContext() >> show as native app not flutter [Appium] Welcome to Appium v2.4.1 (REV 9600617c52d0d2e48493424c529ac6c945d2775b) [Appium] The autodetected Appium home path: /Users/asma.hamdi/.appium [Appium] Attempting to load driver uiautomator2... [Appium] Attempting to load driver xcuitest... [Appium] Attempting to load driver flutter... [Appium] Requiring driver at /Users/asma.hamdi/.appium/node_modules/appium-uiautomator2-driver/build/index.js [Appium] Requiring driver at /Users/asma.hamdi/.appium/node_modules/appium-flutter-driver/build/lib/driver.js [Appium] Requiring driver at /Users/asma.hamdi/.appium/node_modules/appium-xcuitest-driver/build/index.js [Appium] AndroidUiautomator2Driver has been successfully loaded in 2.013s [Appium] FlutterDriver has been successfully loaded in 2.013s [Appium] XCUITestDriver has been successfully loaded in 2.013s [Appium] Attempting to load driver mac2... [Appium] Requiring driver at /Users/asma.hamdi/.appium/node_modules/appium-mac2-driver/build/index.js [Appium] Mac2Driver has been successfully loaded in 0.053s (node:75903) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit (Usenode --trace-warnings ...to show where the warning was created) [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: [Appium] http://127.0.0.1:4723/ (only accessible from the same host) [Appium] http://10.10.2.65:4723/ [Appium] Available drivers: [Appium] - uiautomator2@2.45.1 (automationName 'UiAutomator2') [Appium] - xcuitest@5.16.1 (automationName 'XCUITest') [Appium] - flutter@2.4.2 (automationName 'Flutter') [Appium] - mac2@1.10.2 (automationName 'Mac2') [Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use. [HTTP] Request idempotency key: 05067f66-da32-4bf9-804b-81902dac63b9 [HTTP] --> POST /session [HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:logLevel":"debug","appium:automationName":"XCUITest","appium:platformName":"iOS","appium:deviceName":"iPhone 15 Pro","platformName":"IOS","appium:showXcodeLog":true,"appium:locationServicesAuthorized":false,"appium:autoAcceptAlerts":false,"appium:xcodeSigningId":"iPhone Developer","appium:platformVersion":"17.0","appium:appPackage":"com.6alabat.cuisineApp","appium:locationServicesEnabled":false,"appium:xcodeOrgId":"3MT967VXY3","appium:udid":"1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB","appium:autoDismissAlerts":true}}} [AppiumDriver@a72d] Calling AppiumDriver.createSession() with args: [null,null,{"firstMatch":[{}],"alwaysMatch":{"appium:logLevel":"debug","appium:automationName":"XCUITest","appium:platformName":"iOS","appium:deviceName":"iPhone 15 Pro","platformName":"IOS","appium:showXcodeLog":true,"appium:locationServicesAuthorized":false,"appium:autoAcceptAlerts":false,"appium:xcodeSigningId":"iPhone Developer","appium:platformVersion":"17.0","appium:appPackage":"com.6alabat.cuisineApp","appium:locationServicesEnabled":false,"appium:xcodeOrgId":"3MT967VXY3","appium:udid":"1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB","appium:autoDismissAlerts":true}}] [AppiumDriver@a72d] Event 'newSessionRequested' logged at 1707901828921 (11:10:28 GMT+0200 (Eastern European Standard Time)) [BaseDriver] Ignoring capability 'appium:platformName=iOS' and using capability 'platformName=IOS' [BaseDriver] The capabilities ["platformName"] are standard capabilities and do not require "appium:" prefix [Appium] Attempting to find matching driver for automationName 'XCUITest' and platformName 'IOS' [Appium] The 'xcuitest' driver was installed and matched caps. [Appium] Will require it at /Users/asma.hamdi/.appium/node_modules/appium-xcuitest-driver [Appium] Requiring driver at /Users/asma.hamdi/.appium/node_modules/appium-xcuitest-driver/build/index.js [AppiumDriver@a72d] Appium v2.4.1 creating new XCUITestDriver (v5.16.1) session [AppiumDriver@a72d] Checking BaseDriver versions for Appium and XCUITestDriver [AppiumDriver@a72d] Appium's BaseDriver version is 9.5.0 [AppiumDriver@a72d] XCUITestDriver's BaseDriver version is 9.5.1 [XCUITestDriver@5a9d] Creating session with W3C capabilities: { [XCUITestDriver@5a9d] "alwaysMatch": { [XCUITestDriver@5a9d] "platformName": "IOS", [XCUITestDriver@5a9d] "appium:logLevel": "debug", [XCUITestDriver@5a9d] "appium:automationName": "XCUITest", [XCUITestDriver@5a9d] "appium:deviceName": "iPhone 15 Pro", [XCUITestDriver@5a9d] "appium:showXcodeLog": true, [XCUITestDriver@5a9d] "appium:locationServicesAuthorized": false, [XCUITestDriver@5a9d] "appium:autoAcceptAlerts": false, [XCUITestDriver@5a9d] "appium:xcodeSigningId": "iPhone Developer", [XCUITestDriver@5a9d] "appium:platformVersion": "17.0", [XCUITestDriver@5a9d] "appium:appPackage": "com.6alabat.cuisineApp", [XCUITestDriver@5a9d] "appium:locationServicesEnabled": false, [XCUITestDriver@5a9d] "appium:xcodeOrgId": "3MT967VXY3", [XCUITestDriver@5a9d] "appium:udid": "1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB", [XCUITestDriver@5a9d] "appium:autoDismissAlerts": true [XCUITestDriver@5a9d] }, [XCUITestDriver@5a9d] "firstMatch": [ [XCUITestDriver@5a9d] {} [XCUITestDriver@5a9d] ] [XCUITestDriver@5a9d] } [XCUITestDriver@5a9d] The following provided capabilities were not recognized by this driver: [XCUITestDriver@5a9d] logLevel [XCUITestDriver@5a9d] locationServicesAuthorized [XCUITestDriver@5a9d] appPackage [XCUITestDriver@5a9d] locationServicesEnabled [XCUITestDriver@5a9d] The desired capabilities include neither an app nor a bundleId. WebDriverAgent will be started without the default app [XCUITestDriver@5a9d (4a11fc1e)] Session created with session id: 4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a [XCUITest] Current user: 'asma.hamdi' [XCUITestDriver@5a9d (4a11fc1e)] Available devices: [XCUITestDriver@5a9d (4a11fc1e)] No real device with udid '1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB'. Looking for a simulator [iOSSim] Constructing iOS simulator for Xcode version 15.0.1 with udid '1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB' [XCUITestDriver@5a9d (4a11fc1e)] Determining device to run tests on: udid: '1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB', real device: false [XCUITestDriver@5a9d (4a11fc1e)] Event 'xcodeDetailsRetrieved' logged at 1707901829242 (11:10:29 GMT+0200 (Eastern European Standard Time)) [XCUITestDriver@5a9d (4a11fc1e)] Event 'appConfigured' logged at 1707901829242 (11:10:29 GMT+0200 (Eastern European Standard Time)) [XCUITestDriver@5a9d (4a11fc1e)] Event 'resetStarted' logged at 1707901829242 (11:10:29 GMT+0200 (Eastern European Standard Time)) [XCUITestDriver@5a9d (4a11fc1e)] Event 'resetComplete' logged at 1707901829242 (11:10:29 GMT+0200 (Eastern European Standard Time)) [XCUITestDriver@5a9d (4a11fc1e)] Using WDA path: '/Users/asma.hamdi/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent' [XCUITestDriver@5a9d (4a11fc1e)] Using WDA agent: '/Users/asma.hamdi/.appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj' [IOSSimulatorLog] Starting log capture for iOS Simulator with udid '1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB' using simctl [XCUITestDriver@5a9d (4a11fc1e)] Event 'logCaptureStarted' logged at 1707901829623 (11:10:29 GMT+0200 (Eastern European Standard Time)) [XCUITestDriver@5a9d (4a11fc1e)] Setting up simulator [iOSSim] Setting preferences of 1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB Simulator to {"ConnectHardwareKeyboard":false} [iOSSim] Setting common Simulator preferences to {"RotateWindowWhenSignaledByGuest":true,"StartLastDeviceOnLaunch":false,"DetachOnWindowClose":false,"AttachBootedOnStart":true,"ConnectHardwareKeyboard":false,"PasteboardAutomaticSync":false} [iOSSim] Updated 1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB Simulator preferences at '/Users/asma.hamdi/Library/Preferences/com.apple.iphonesimulator.plist' with {"RotateWindowWhenSignaledByGuest":true,"StartLastDeviceOnLaunch":false,"DetachOnWindowClose":false,"AttachBootedOnStart":true,"ConnectHardwareKeyboard":false,"PasteboardAutomaticSync":false,"DevicePreferences":{"1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB":{"SimulatorExternalDisplay":2114,"ConnectHardwareKeyboard":false,"ChromeTint":"","SimulatorWindowOrientation":"Portrait","SimulatorWindowGeometry":{"BF8B9FAB-A997-4682-AA32-340A26950AC8":{"WindowCenter":"{1263.5, 517.5}","WindowScale":0.8288288288288288},"3A213F91-7489-4574-8557-712E483B2A4C":{"WindowCenter":"{1263.5, 517.5}","WindowScale":0.8288288288288288}},"SimulatorWindowRotationAngle":0}}} [iOSSim] Got Simulator UI client PID: 74918 [iOSSim] Both Simulator with UDID '1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB' and the UI client are currently running [XCUITestDriver@5a9d (4a11fc1e)] Event 'simStarted' logged at 1707901829775 (11:10:29 GMT+0200 (Eastern European Standard Time)) [XCUITestDriver@5a9d (4a11fc1e)] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found [DevCon Factory] Requesting connection for device 1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB on local port 8100 [DevCon Factory] Cached connections count: 0 [DevCon Factory] Successfully requested the connection for 1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB:8100 [XCUITestDriver@5a9d (4a11fc1e)] Starting WebDriverAgent initialization with the synchronization key 'XCUITestDriver' [WD Proxy] Matched '/status' to command name 'getStatus' [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body [WD Proxy] Got response with status 200: {"value":{"build":{"upgradedAt":"1707820706804","time":"Feb 13 2024 13:04:41","productBundleIdentifier":"com.facebook.WebDriverAgentRunner"},"os":{"testmanagerdVersion":65535,"name":"iOS","sdkVersion":"17.0","version":"17.0.1"},"device":"iphone","ios":{"simulatorVersion":"17.0.1","ip":"10.10.2.65"},"message":"WebDriverAgent is ready to accept commands","state":"success","ready":true},"sessionId":null} [XCUITestDriver@5a9d (4a11fc1e)] Upgrade timestamp of the currently bundled WDA: 1707820706804 [XCUITestDriver@5a9d (4a11fc1e)] Upgrade timestamp of the WDA on the device: 1707820706804 [XCUITestDriver@5a9d (4a11fc1e)] Will reuse previously cached WDA instance at 'http://127.0.0.1:8100/' with 'com.facebook.WebDriverAgentRunner'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior. [XCUITestDriver@5a9d (4a11fc1e)] Trying to start WebDriverAgent 2 times with 10000ms interval [XCUITestDriver@5a9d (4a11fc1e)] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities [XCUITestDriver@5a9d (4a11fc1e)] Event 'wdaStartAttempted' logged at 1707901829929 (11:10:29 GMT+0200 (Eastern European Standard Time)) [XCUITestDriver@5a9d (4a11fc1e)] Using provided WebdriverAgent at 'http://127.0.0.1:8100/' [WD Proxy] Matched '/status' to command name 'getStatus' [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body [WD Proxy] Got response with status 200: {"value":{"build":{"upgradedAt":"1707820706804","time":"Feb 13 2024 13:04:41","productBundleIdentifier":"com.facebook.WebDriverAgentRunner"},"os":{"testmanagerdVersion":65535,"name":"iOS","sdkVersion":"17.0","version":"17.0.1"},"device":"iphone","ios":{"simulatorVersion":"17.0.1","ip":"10.10.2.65"},"message":"WebDriverAgent is ready to accept commands","state":"success","ready":true},"sessionId":null} [XCUITestDriver@5a9d (4a11fc1e)] Event 'wdaSessionAttempted' logged at 1707901829935 (11:10:29 GMT+0200 (Eastern European Standard Time)) [XCUITestDriver@5a9d (4a11fc1e)] Sending createSession command to WDA [XCUITestDriver@5a9d (4a11fc1e)] Matched '/session' to command name 'createSession' [XCUITestDriver@5a9d (4a11fc1e)] Proxying [POST /session] to [POST http://127.0.0.1:8100/session] with body: {"capabilities":{"firstMatch":[{"arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true,"shouldTerminateApp":true,"forceAppLaunch":true,"useNativeCachingStrategy":true,"forceSimulatorSoftwareKeyboardPresence":true,"defaultAlertAction":"dismiss"}],"alwaysMatch":{}}} [XCUITestDriver@5a9d (4a11fc1e)] Got response with status 200: {"value":{"sessionId":"18586BEC-7A27-49E8-B281-EDA9BA04727C","capabilities":{"sdkVersion":"17.0.1","device":"iphone"}},"sessionId":"18586BEC-7A27-49E8-B281-EDA9BA04727C"} [XCUITestDriver@5a9d (4a11fc1e)] Determined the downstream protocol as 'W3C' [XCUITestDriver@5a9d (4a11fc1e)] Event 'wdaSessionStarted' logged at 1707901829976 (11:10:29 GMT+0200 (Eastern European Standard Time)) [XCUITestDriver@5a9d (4a11fc1e)] Event 'wdaStarted' logged at 1707901829976 (11:10:29 GMT+0200 (Eastern European Standard Time)) [BaseDriver] The value of 'elementResponseAttributes' setting did not change. Skipping the update for it [BaseDriver] The value of 'shouldUseCompactResponses' setting did not change. Skipping the update for it [AppiumDriver@a72d] New XCUITestDriver session created successfully, session 4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a added to master session list [AppiumDriver@a72d] Event 'newSessionStarted' logged at 1707901829977 (11:10:29 GMT+0200 (Eastern European Standard Time)) [XCUITestDriver@5a9d (4a11fc1e)] Cached the protocol value 'W3C' for the new session 4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a [XCUITestDriver@5a9d (4a11fc1e)] Responding to client with driver.createSession() result: {"capabilities":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"platformName":"IOS","logLevel":"debug","automationName":"XCUITest","deviceName":"iPhone 15 Pro","showXcodeLog":true,"locationServicesAuthorized":false,"autoAcceptAlerts":false,"xcodeSigningId":"iPhone Developer","platformVersion":"17.0","appPackage":"com.6alabat.cuisineApp","locationServicesEnabled":false,"xcodeOrgId":"3MT967VXY3","udid":"1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB","autoDismissAlerts":true}} [HTTP] <-- POST /session 200 1060 ms - 680 [HTTP] [HTTP] --> POST /session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a/execute/sync [HTTP] {"script":"mobile: activateApp","args":[{"bundleId":"com.6alabat.cuisineApp","appId":"com.6alabat.cuisineApp"}]} [XCUITestDriver@5a9d (4a11fc1e)] Calling AppiumDriver.execute() with args: ["mobile: activateApp",[{"bundleId":"com.6alabat.cuisineApp","appId":"com.6alabat.cuisineApp"}],"4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a"] [XCUITestDriver@5a9d (4a11fc1e)] Executing command 'execute' [BaseDriver] The following script arguments are not known and will be ignored: appId [XCUITestDriver@5a9d (4a11fc1e)] Proxying [POST /wda/apps/activate] to [POST http://127.0.0.1:8100/session/18586BEC-7A27-49E8-B281-EDA9BA04727C/wda/apps/activate] with body: {"bundleId":"com.6alabat.cuisineApp"} [XCUITestDriver@5a9d (4a11fc1e)] Got response with status 200: {"value":null,"sessionId":"18586BEC-7A27-49E8-B281-EDA9BA04727C"} [XCUITestDriver@5a9d (4a11fc1e)] Responding to client with driver.execute() result: null [HTTP] <-- POST /session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a/execute/sync 200 1062 ms - 14 [HTTP] [HTTP] --> POST /session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a/element [HTTP] {"value":"Food\nFood\nUp to 50%","using":"accessibility id"} [XCUITestDriver@5a9d (4a11fc1e)] Calling AppiumDriver.findElement() with args: ["accessibility id","Food\nFood\nUp to 50%","4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a"] [XCUITestDriver@5a9d (4a11fc1e)] Executing command 'findElement' [XCUITestDriver@5a9d (4a11fc1e)] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id, css selector [XCUITestDriver@5a9d (4a11fc1e)] Waiting up to 0 ms for condition [XCUITestDriver@5a9d (4a11fc1e)] Matched '/element' to command name 'findElement' [XCUITestDriver@5a9d (4a11fc1e)] Proxying [POST /element] to [POST http://127.0.0.1:8100/session/18586BEC-7A27-49E8-B281-EDA9BA04727C/element] with body: {"using":"accessibility id","value":"Food\nFood\nUp to 50%"} [XCUITestDriver@5a9d (4a11fc1e)] Got response with status 200: {"value":{"ELEMENT":"9E000000-0000-0000-DF27-010000000000","element-6066-11e4-a52e-4f735466cecf":"9E000000-0000-0000-DF27-010000000000"},"sessionId":"18586BEC-7A27-49E8-B281-EDA9BA04727C"} [XCUITestDriver@5a9d (4a11fc1e)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"9E000000-0000-0000-DF27-010000000000","ELEMENT":"9E000000-0000-0000-DF27-010000000000"} [HTTP] <-- POST /session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a/element 200 121 ms - 137 [HTTP] [HTTP] --> POST /session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a/element/9E000000-0000-0000-DF27-010000000000/click [HTTP] {"id":"9E000000-0000-0000-DF27-010000000000"} [XCUITestDriver@5a9d (4a11fc1e)] Driver proxy active, passing request on via HTTP proxy [XCUITestDriver@5a9d (4a11fc1e)] Executing command 'proxyReqRes' [XCUITestDriver@5a9d (4a11fc1e)] Matched '/session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a/element/9E000000-0000-0000-DF27-010000000000/click' to command name 'click' [XCUITestDriver@5a9d (4a11fc1e)] Proxying [POST /session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a/element/9E000000-0000-0000-DF27-010000000000/click] to [POST http://127.0.0.1:8100/session/18586BEC-7A27-49E8-B281-EDA9BA04727C/element/9E000000-0000-0000-DF27-010000000000/click] with body: {"id":"9E000000-0000-0000-DF27-010000000000"} [XCUITestDriver@5a9d (4a11fc1e)] Parsed BUILD_DIR configuration value: '/Users/asma.hamdi/Library/Developer/Xcode/DerivedData/WebDriverAgent-gpfymuqrsptbyjeapztyivoqdhzn/Build/Products' [XCUITestDriver@5a9d (4a11fc1e)] Got derived data root: '/Users/asma.hamdi/Library/Developer/Xcode/DerivedData/WebDriverAgent-gpfymuqrsptbyjeapztyivoqdhzn' [XCUITestDriver@5a9d (4a11fc1e)] Got response with status 200: {"value":null,"sessionId":"18586BEC-7A27-49E8-B281-EDA9BA04727C"} [XCUITestDriver@5a9d (4a11fc1e)] Replacing sessionId 18586BEC-7A27-49E8-B281-EDA9BA04727C with 4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a [HTTP] <-- POST /session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a/element/9E000000-0000-0000-DF27-010000000000/click 200 2793 ms - 65 [HTTP] [HTTP] --> DELETE /session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a [HTTP] {} [XCUITestDriver@5a9d (4a11fc1e)] Calling AppiumDriver.deleteSession() with args: ["4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a"] [AppiumDriver@a72d] Event 'quitSessionRequested' logged at 1707901834151 (11:10:34 GMT+0200 (Eastern European Standard Time)) [AppiumDriver@a72d] Removing session 4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a from our master session list [XCUITestDriver@5a9d (4a11fc1e)] Matched '/session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a' to command name 'deleteSession' [XCUITestDriver@5a9d (4a11fc1e)] Proxying [DELETE /session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a] to [DELETE http://127.0.0.1:8100/session/18586BEC-7A27-49E8-B281-EDA9BA04727C] with no body [XCUITestDriver@5a9d (4a11fc1e)] Got response with status 200: {"value":null,"sessionId":null} [DevCon Factory] Releasing connections for 1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB device on any port number [DevCon Factory] Found cached connections to release: ["1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB:8100"] [DevCon Factory] Cached connections count: 0 [XCUITestDriver@5a9d (4a11fc1e)] Not clearing log files. UseclearSystemFiles` capability to turn on. [IOSSimulatorLog] Stopping iOS log capture [AppiumDriver@a72d] Event 'quitSessionFinished' logged at 1707901834190 (11:10:34 GMT+0200 (Eastern European Standard Time)) [AppiumDriver@a72d] Received response: null [AppiumDriver@a72d] But deleting session, so not returning [AppiumDriver@a72d] Responding to client with driver.deleteSession() result: null [HTTP] <-- DELETE /session/4a11fc1e-8b3e-4f3a-ac30-3b0ef1a37d6a 200 45 ms - 14 [HTTP] [HTTP] --> GET /session/1baf41cb-fc46-49b0-8e17-d78209af1254/timeouts [HTTP] {} [AppiumDriver@a72d] Encountered internal error running command: NoSuchDriverError: A session is either terminated or not started [AppiumDriver@a72d] at asyncHandler (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:315:15) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:518:15 [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:95:5) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/route.js:144:13) [AppiumDriver@a72d] at Route.dispatch (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/route.js:114:3) [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:95:5) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:284:15 [AppiumDriver@a72d] at param (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:365:14) [AppiumDriver@a72d] at param (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:376:14) [AppiumDriver@a72d] at Function.process_params (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:421:3) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:280:10) [AppiumDriver@a72d] at logger (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/morgan/index.js:144:5) [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:95:5) [AppiumDriver@a72d] at trim_prefix (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:328:13) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:286:9 [AppiumDriver@a72d] at Function.process_params (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:346:12) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:280:10) [AppiumDriver@a72d] at jsonParser (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/body-parser/lib/types/json.js:113:7) [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:95:5) [AppiumDriver@a72d] at trim_prefix (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:328:13) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:286:9 [AppiumDriver@a72d] at Function.process_params (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:346:12) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:280:10) [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:91:12) [AppiumDriver@a72d] at trim_prefix (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:328:13) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:286:9 [AppiumDriver@a72d] at Function.process_params (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:346:12) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:280:10) [AppiumDriver@a72d] at methodOverride (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/method-override/index.js:65:14) [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:95:5) [AppiumDriver@a72d] at trim_prefix (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:328:13) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:286:9 [AppiumDriver@a72d] at Function.process_params (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:346:12) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:280:10) [AppiumDriver@a72d] at urlencodedParser (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/body-parser/lib/types/urlencoded.js:91:7) [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:95:5) [AppiumDriver@a72d] at trim_prefix (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:328:13) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:286:9 [AppiumDriver@a72d] at Function.process_params (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:346:12) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:280:10) [AppiumDriver@a72d] at defaultToJSONContentType (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/@appium/base-driver/lib/express/middleware.js:58:3) [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:95:5) [AppiumDriver@a72d] at trim_prefix (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:328:13) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:286:9 [AppiumDriver@a72d] at Function.process_params (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:346:12) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:280:10) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/@appium/base-driver/lib/express/middleware.js:50:5 [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:95:5) [AppiumDriver@a72d] at trim_prefix (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:328:13) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:286:9 [AppiumDriver@a72d] at Function.process_params (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:346:12) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:280:10) [AppiumDriver@a72d] at handleIdempotency (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/@appium/base-driver/lib/express/idempotency.js:143:12) [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:95:5) [AppiumDriver@a72d] at trim_prefix (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:328:13) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:286:9 [AppiumDriver@a72d] at Function.process_params (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:346:12) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:280:10) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/@appium/base-driver/lib/express/middleware.js:33:14 [AppiumDriver@a72d] at Layer.handle [as handle_request] (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/layer.js:95:5) [AppiumDriver@a72d] at trim_prefix (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:328:13) [AppiumDriver@a72d] at /Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:286:9 [AppiumDriver@a72d] at Function.process_params (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:346:12) [AppiumDriver@a72d] at next (/Users/asma.hamdi/.nvm/versions/node/v20.10.0/lib/node_modules/appium/node_modules/express/lib/router/index.js:280:10) [HTTP] <-- GET /session/1baf41cb-fc46-49b0-8e17-d78209af1254/timeouts 404 61 ms - 9303 [HTTP]

`

asma203 commented 9 months ago

also switch to appium inspector it shows as native although ut should be 'FLUTTER"

Screenshot 2024-02-14 at 11 13 55 AM
asma203 commented 9 months ago

any response about that?

asma203 commented 9 months ago

@KazuCocoa

KazuCocoa commented 9 months ago

https://github.com/appium/appium-flutter-driver/issues/660#issuecomment-1943350903 gave "xcuitest" for the automation name, so it should not work with FLUTTER context.

XCUITestDriver@5a9d] Creating session with W3C capabilities: {
[XCUITestDriver@5a9d]   "alwaysMatch": {
[XCUITestDriver@5a9d]     "platformName": "IOS",
[XCUITestDriver@5a9d]     "appium:logLevel": "debug",
[XCUITestDriver@5a9d]     "appium:automationName": "XCUITest",
[XCUITestDriver@5a9d]     "appium:deviceName": "iPhone 15 Pro",
[XCUITestDriver@5a9d]     "appium:showXcodeLog": true,
[XCUITestDriver@5a9d]     "appium:locationServicesAuthorized": false,
[XCUITestDriver@5a9d]     "appium:autoAcceptAlerts": false,
[XCUITestDriver@5a9d]     "appium:xcodeSigningId": "iPhone Developer",
[XCUITestDriver@5a9d]     "appium:platformVersion": "17.0",
[XCUITestDriver@5a9d]     "appium:appPackage": "com.6alabat.cuisineApp",
[XCUITestDriver@5a9d]     "appium:locationServicesEnabled": false,
[XCUITestDriver@5a9d]     "appium:xcodeOrgId": "3MT967VXY3",
[XCUITestDriver@5a9d]     "appium:udid": "1E6B2E1F-9CAB-4C0B-86D6-764B1D1B17FB",
[XCUITestDriver@5a9d]     "appium:autoDismissAlerts": true
[XCUITestDriver@5a9d]   },
[XCUITestDriver@5a9d]   "firstMatch": [
[XCUITestDriver@5a9d]     {}
[XCUITestDriver@5a9d]   ]
[XCUITestDriver@5a9d] }

As https://github.com/appium/appium-flutter-driver?tab=readme-ov-file#example , the automationName should be flutter to use this driver.

asma203 commented 9 months ago

Switch ""appium:automationName": "FLUTTER", didn't work at all

KazuCocoa commented 9 months ago

Please attach the full appium server log for the "didn't work" case. Afaik, at least https://github.com/appium/appium-flutter-driver?tab=readme-ov-file#usage-and-requirement is not satisfied, it should not work. https://github.com/appium/appium-flutter-driver/issues/658 could be another reason but I don't know the reason well.

asma203 commented 9 months ago

@KazuCocoa run flutter with debug enabled in app

Screenshot 2024-02-27 at 11 59 45 AM
asma203 commented 8 months ago

@KazuCocoa any idea??

KazuCocoa commented 8 months ago

No, the error just indicates the expected observatory URL to communicate with the DartVM (for Flutter) did not appear in the system log. Usually, profile built app that satisfies with the Usage and requirement shows the url, but it looks like something did not work.

asma203 commented 8 months ago

@KazuCocoa any tips we can do to slove this issue?

KazuCocoa commented 8 months ago

No, what I know of and figured out in the past was missing https://github.com/appium/appium-flutter-driver?tab=readme-ov-file#usage-and-requirement and https://github.com/appium/appium-flutter-driver?tab=readme-ov-file#note, but I don't have any ideas except for that.