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
461 stars 184 forks source link

/wd/hub/session/xxxx/source 501 #149

Closed llpan-github closed 3 years ago

llpan-github commented 3 years ago

appium :v1.20.2 device : iphone se 13.7 Desired Capabilities: { "automationName": "flutter", "platformName": "iOS", "udid": "00008030-000644A80285802E", "platformVersion": "13.7", "deviceName": "Ly的iPhone", "bundleId": "com.yunzhanghu.ytt4mobile" } when i start session happen error log: [info] [Appium] Welcome to Appium v1.20.2 [info] [Appium] Non-default server args: [info] [Appium] relaxedSecurityEnabled: true [info] [Appium] allowInsecure: { [info] [Appium] } [info] [Appium] denyInsecure: { [info] [Appium] } [info] [Appium] Appium REST http interface listener started on 0.0.0.0:4723[info] [HTTP] --> GET /wd/hub/sessions [info] [HTTP] {} [debug] [GENERIC] Calling AppiumDriver.getSessions() with args: [] [debug] [GENERIC] Responding to client with driver.getSessions() result: [] [info] [HTTP] <-- GET /wd/hub/sessions 200 5 ms - 40 [info] [HTTP] [info] [HTTP] --> POST /wd/hub/session [info] [HTTP] {"desiredCapabilities":{"automationName":"flutter","bundleId":"com.yunzhanghu.ytt4mobile","deviceName":"Ly的iPhone","platformName":"iOS","platformVersion":"13.7","udid":"00008030-000644A80285802E","newCommandTimeout":0,"connectHardwareKeyboard":true}} [debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"automationName":"flutter","bundleId":"com.yunzhanghu.ytt4mobile","deviceName":"Ly的iPhone","platformName":"iOS","platformVersion":"13.7","udid":"00008030-000644A80285802E","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null] [debug] [BaseDriver] Event 'newSessionRequested' logged at 1617183791893 (17:43:11 GMT+0800 (中国标准时间)) [info] [Appium] Appium v1.20.2 creating new FlutterDriver (v0.0.25) session [info] [Appium] Applying relaxed security to 'FlutterDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure [debug] [BaseDriver] Creating session with MJSONWP desired capabilities: { [debug] [BaseDriver] "automationName": "flutter", [debug] [BaseDriver] "bundleId": "com.yunzhanghu.ytt4mobile", [debug] [BaseDriver] "deviceName": "Ly的iPhone", [debug] [BaseDriver] "platformName": "iOS", [debug] [BaseDriver] "platformVersion": "13.7", [debug] [BaseDriver] "udid": "00008030-000644A80285802E", [debug] [BaseDriver] "newCommandTimeout": 0, [debug] [BaseDriver] "connectHardwareKeyboard": true [debug] [BaseDriver] } [warn] [BaseDriver] The following capabilities were provided, but are not recognized by Appium: [warn] [BaseDriver] bundleId [warn] [BaseDriver] connectHardwareKeyboard [info] [BaseDriver] Session created with session id: 00fa79f6-e9e5-4c09-95fd-69e0ad7ce772 [info] [FlutterDriver] Starting an IOS proxy session [debug] [BaseDriver] Creating session with MJSONWP desired capabilities: { [debug] [BaseDriver] "automationName": "flutter", [debug] [BaseDriver] "bundleId": "com.yunzhanghu.ytt4mobile", [debug] [BaseDriver] "deviceName": "Ly的iPhone", [debug] [BaseDriver] "platformName": "iOS", [debug] [BaseDriver] "platformVersion": "13.7", [debug] [BaseDriver] "udid": "00008030-000644A80285802E", [debug] [BaseDriver] "newCommandTimeout": 0, [debug] [BaseDriver] "connectHardwareKeyboard": true [debug] [BaseDriver] } [info] [BaseDriver] Session created with session id: e0a5647f-53cf-4b81-a356-be2e1adc1785[debug] [XCUITest] Current user: 'llpan' [debug] [XCUITest] Available devices: 00008030-000644A80285802E [debug] [XCUITest] Creating iDevice object with udid '00008030-000644A80285802E' [info] [XCUITest] Determining device to run tests on: udid: '00008030-000644A80285802E', real device: true [debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1617183792882 (17:43:12 GMT+0800 (中国标准时间)) [debug] [BaseDriver] Event 'appConfigured' logged at 1617183792883 (17:43:12 GMT+0800 (中国标准时间)) [debug] [BaseDriver] Event 'resetStarted' logged at 1617183792883 (17:43:12 GMT+0800 (中国标准时间)) [debug] [XCUITest] Reset: running ios real device reset flow [debug] [BaseDriver] Event 'resetComplete' logged at 1617183792883 (17:43:12 GMT+0800 (中国标准时间)) [info] [WebDriverAgent] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent' [info] [WebDriverAgent] Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'[debug] [XCUITest] Crash reports root '/Users/llpan/Library/Logs/CrashReporter/MobileDevice/Ly的iPhone' does not exist. Got nothing to gather. [debug] [BaseDriver] Event 'logCaptureStarted' logged at 1617183793090 (17:43:13 GMT+0800 (中国标准时间)) [info] [XCUITest] Setting up real device[debug] [WebDriverAgent] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found [info] [DevCon Factory] Requesting connection for device 00008030-000644A80285802E on local port 8100, device port 8100 [debug] [DevCon Factory] Cached connections count: 0 [info] [DevCon Factory] Successfully requested the connection for 00008030-000644A80285802E:8100[debug] [WebDriverAgent] Parsed BUILD_DIR configuration value: '/Users/llpan/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Build/Products' [debug] [WebDriverAgent] Got derived data root: '/Users/llpan/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp' [debug] [XCUITest] Starting WebDriverAgent initialization with the synchronization key '/Users/llpan/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp' [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body [debug] [WD Proxy] Got response with status 200: {"value":{"message":"WebDriverAgent is ready to accept commands","state":"success","os":{"testmanagerdVersion":28,"name":"iOS","sdkVersion":"13.4","version":"13.7"},"ios":{"ip":"192.168.110.136"},"ready":true,"build":{"time":"Mar 31 2021 17:31:08","productBundleIdentifier":"com.facebook.WebDriverAgentRunner"}},"sessionId":"597BAFE5-28C1-4E47-9D2B-1DE069C2EDD3"} [debug] [WebDriverAgent] Upgrade timestamp of the currently bundled WDA: 1612946545000 [debug] [WebDriverAgent] Upgrade timestamp of the WDA on the device: undefined [info] [WebDriverAgent] 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. [debug] [XCUITest] Trying to start WebDriverAgent 1 times with 10000ms interval [debug] [XCUITest] These values can be customized by changing wdaStartupRetries/wdaStartupRetryInterval capabilities [debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1617183794701 (17:43:14 GMT+0800 (中国标准时间)) [info] [WebDriverAgent] Using provided WebdriverAgent at 'http://127.0.0.1:8100/' [debug] [WD Proxy] Matched '/status' to command name 'getStatus' [debug] [WD Proxy] Proxying [GET /status] to [GET http://127.0.0.1:8100/status] with no body [debug] [WD Proxy] Got response with status 200: {"value":{"message":"WebDriverAgent is ready to accept commands","state":"success","os":{"testmanagerdVersion":28,"name":"iOS","sdkVersion":"13.4","version":"13.7"},"ios":{"ip":"192.168.110.136"},"ready":true,"build":{"time":"Mar 31 2021 17:31:08","productBundleIdentifier":"com.facebook.WebDriverAgentRunner"}},"sessionId":"597BAFE5-28C1-4E47-9D2B-1DE069C2EDD3"} [debug] [BaseDriver] Event 'wdaSessionAttempted' logged at 1617183794712 (17:43:14 GMT+0800 (中国标准时间)) [debug] [XCUITest] Sending createSession command to WDA [debug] [WD Proxy] Matched '/session' to command name 'createSession' [debug] [WD Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8100/session] with body: {"capabilities":{"firstMatch":[{"bundleId":"com.yunzhanghu.ytt4mobile","arguments":[],"environment":{},"eventloopIdleDelaySec":0,"shouldWaitForQuiescence":true,"shouldUseTestManagerForVisibilityDetection":false,"maxTypingFrequency":60,"shouldUseSingletonTestManager":true}],"alwaysMatch":{}}}[debug] [WD Proxy] Got response with status 200: {"value":{"sessionId":"31F94B32-1386-488F-A1F1-60C536E64237","capabilities":{"device":"iphone","browserName":"ytt_4_mobile","sdkVersion":"13.7","CFBundleIdentifier":"com.yunzhanghu.ytt4mobile"}},"sessionId":"31F94B32-1386-488F-A1F1-60C536E64237"} [info] [WD Proxy] Determined the downstream protocol as 'W3C' [debug] [BaseDriver] Event 'wdaSessionStarted' logged at 1617183797030 (17:43:17 GMT+0800 (中国标准时间)) [debug] [BaseDriver] Event 'wdaStarted' logged at 1617183797030 (17:43:17 GMT+0800 (中国标准时间)) [info] [XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior. [debug] [BaseDriver] Event 'orientationSet' logged at 1617183797030 (17:43:17 GMT+0800 (中国标准时间)) [debug] [BaseDriver] The value of 'elementResponseAttributes' setting did not change. Skipping the update for it [debug] [BaseDriver] The value of 'shouldUseCompactResponses' setting did not change. Skipping the update for it [info] [FlutterDriver] Running on iOS real device, doing "iproxy" now [debug] [FlutterDriver] iproxy 57534 57534 -u 00008030-000644A80285802E [info] [FlutterDriver] "iproxy" successfully [info] [FlutterDriver] Attempt #1 [info] [FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:57534/lRUxRnUgz28=/ws [error] [FlutterDriver] [object Object] [error] [FlutterDriver] Check Dart Observatory URI ws://127.0.0.1:57534/lRUxRnUgz28=/ws [info] [FlutterDriver] Waiting 5 seconds before trying...[info] [FlutterDriver] Attempt #2 [info] [FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:57534/lRUxRnUgz28=/ws [info] [FlutterDriver] Connected to ws://127.0.0.1:57534/lRUxRnUgz28=/ws [info] [FlutterDriver] Listing all isolates: [{"type":"@Isolate","id":"isolates/1147050411640079","name":"main","number":"1147050411640079","isSystemIsolate":false}] [info] [Appium] New FlutterDriver session created successfully, session 00fa79f6-e9e5-4c09-95fd-69e0ad7ce772 added to master session list [debug] [BaseDriver] Event 'newSessionStarted' logged at 1617183802108 (17:43:22 GMT+0800 (中国标准时间)) [debug] [MJSONWP (00fa79f6)] Cached the protocol value 'MJSONWP' for the new session 00fa79f6-e9e5-4c09-95fd-69e0ad7ce772 [debug] [MJSONWP (00fa79f6)] Responding to client with driver.createSession() result: {"shell":false,"allowCors":false,"reboot":false,"ipa":null,"address":"0.0.0.0","port":4723,"basePath":"/wd/hub","keepAliveTimeout":null,"callbackAddress":null,"callbackPort":null,"bootstrapPort":4724,"backendRetries":3,"sessionOverride":false,"launch":false,"logFile":null,"loglevel":"debug","logTimestamp":false,"localTimezone":false,"logNoColors":false,"webhook":null,"safari":false,"defaultDevice":false,"forceIphone":false,"forceIpad":false,"automationTraceTemplatePath":null,"instrumentsPath":null,"nodeconfig":null,"robotAddress":"0.0.0.0","robotPort":-1,"chromedriverExecutable":null,"showConfig":false,"noPermsCheck":false,"enforceStrictCaps":false,"isolateSimDevice":false,"tmpDir":"/var/folders/bg/kb3x38y92r1gv4f2zbd1nhq80000gn/T","traceDir":null,"debugLogSpacing":false,"suppressKillServer":false,"longStacktrace":false,"webkitDebugProxyPort":27753,"wdaLocalPort":8100,"defaultCapabilities":{},"relaxedSecurityEnabled":true,"allowInsecure":[],"denyInsecure":[],"defaultCommandTimeout":60,"keepArtifacts":false... [info] [HTTP] <-- POST /wd/hub/session 200 10217 ms - 2157 [info] [HTTP] [info] [HTTP] --> GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/contexts [info] [HTTP] {} [debug] [MJSONWP (00fa79f6)] Calling AppiumDriver.getContexts() with args: ["00fa79f6-e9e5-4c09-95fd-69e0ad7ce772"] [debug] [FlutterDriver] Executing Flutter driver command 'getContexts' [debug] [XCUITest] Getting list of available contexts [debug] [iOS] Retrieving contexts and views [debug] [XCUITest] Selecting by url: false [info] [RemoteDebugger] Remote Debugger version 8.13.2 [debug] [RemoteDebugger] useNewSafari --> false [debug] [RemoteDebugger] Checking which communication style to use (non-Safari on platform version '13.7') [debug] [RemoteDebugger] Platform version equal or higher than '12.2': true [warn] [RemoteDebugger] Setting communication protocol: using Target-based communication [debug] [RemoteDebugger] Sending connection key request [debug] [RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 0): 'setConnectionKey' [debug] [RemoteDebugger] Sending to Web Inspector took 3ms [debug] [RemoteDebugger] Sending connection key request [debug] [RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 2): 'setConnectionKey'[info] [HTTP] --> GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/context [info] [HTTP] {} [debug] [MJSONWP (00fa79f6)] Calling AppiumDriver.getCurrentContext() with args: ["00fa79f6-e9e5-4c09-95fd-69e0ad7ce772"] [debug] [FlutterDriver] Executing Flutter driver command 'getCurrentContext' [debug] [MJSONWP (00fa79f6)] Responding to client with driver.getCurrentContext() result: "FLUTTER" [info] [HTTP] <-- GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/context 200 1 ms - 81 [info] [HTTP]  [info] [HTTP] --> POST /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/context [info] [HTTP] {"name":"NATIVE_APP"} [debug] [MJSONWP (00fa79f6)] Calling AppiumDriver.setContext() with args: ["NATIVE_APP","00fa79f6-e9e5-4c09-95fd-69e0ad7ce772"] [debug] [FlutterDriver] Executing Flutter driver command 'setContext' [debug] [MJSONWP (00fa79f6)] Responding to client with driver.setContext() result: "NATIVE_APP" [info] [HTTP] <-- POST /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/context 200 1 ms - 84 [info] [HTTP]  [info] [HTTP] --> GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772 [info] [HTTP] {} [debug] [MJSONWP (00fa79f6)] Calling AppiumDriver.getSession() with args: ["00fa79f6-e9e5-4c09-95fd-69e0ad7ce772"] [debug] [FlutterDriver] Executing proxied driver command 'getSession' [debug] [XCUITest] Executing command 'getSession' [debug] [WD Proxy] Matched '/' to command name 'getSession' [debug] [WD Proxy] Proxying [GET /] to [GET http://127.0.0.1:8100/session/31F94B32-1386-488F-A1F1-60C536E64237] with no body [debug] [WD Proxy] Got response with status 200: {"value":{"sessionId":"31F94B32-1386-488F-A1F1-60C536E64237","capabilities":{"device":"iphone","browserName":"ytt_4_mobile","sdkVersion":"13.7","CFBundleIdentifier":"com.yunzhanghu.ytt4mobile"}},"sessionId":"31F94B32-1386-488F-A1F1-60C536E64237"} [debug] [WD Proxy] Proxying [GET /wda/screen] to [GET http://127.0.0.1:8100/session/31F94B32-1386-488F-A1F1-60C536E64237/wda/screen] with no body[debug] [WD Proxy] Got response with status 200: {"value":{"statusBarSize":{"width":375,"height":20},"scale":2},"sessionId":"31F94B32-1386-488F-A1F1-60C536E64237"} [debug] [WD Proxy] Proxying [GET /window/size] to [GET http://127.0.0.1:8100/session/31F94B32-1386-488F-A1F1-60C536E64237/window/size] with no body [debug] [WD Proxy] Got response with status 200: {"value":{"width":375,"height":667},"sessionId":"31F94B32-1386-488F-A1F1-60C536E64237"} [info] [XCUITest] Merging WDA caps over Appium caps for session detail response [debug] [MJSONWP (00fa79f6)] Responding to client with driver.getSession() result: {"udid":"00008030-000644A80285802E","automationName":"flutter","bundleId":"com.yunzhanghu.ytt4mobile","deviceName":"Ly的iPhone","platformName":"iOS","platformVersion":"13.7","newCommandTimeout":0,"connectHardwareKeyboard":true,"device":"iphone","browserName":"ytt_4_mobile","sdkVersion":"13.7","CFBundleIdentifier":"com.yunzhanghu.ytt4mobile","pixelRatio":2,"statBarHeight":20,"viewportRect":{"left":0,"top":40,"width":750,"height":1294}} [info] [HTTP] <-- GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772 200 281 ms - 511 [info] [HTTP]  [info] [HTTP] --> GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/window/current/size [info] [HTTP] {} [debug] [MJSONWP (00fa79f6)] Calling AppiumDriver.getWindowSize() with args: ["current","00fa79f6-e9e5-4c09-95fd-69e0ad7ce772"] [debug] [FlutterDriver] Executing proxied driver command 'getWindowSize' [debug] [XCUITest] Executing command 'getWindowSize' [debug] [WD Proxy] Proxying [GET /window/size] to [GET http://127.0.0.1:8100/session/31F94B32-1386-488F-A1F1-60C536E64237/window/size] with no body [debug] [WD Proxy] Got response with status 200: {"value":{"width":375,"height":667},"sessionId":"31F94B32-1386-488F-A1F1-60C536E64237"} [debug] [MJSONWP (00fa79f6)] Responding to client with driver.getWindowSize() result: {"width":375,"height":667} [info] [HTTP] <-- GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/window/current/size 200 54 ms - 98 [info] [HTTP]  [info] [HTTP] --> POST /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/execute [info] [HTTP] {"script":"mobile:getContexts","args":[]} [debug] [MJSONWP (00fa79f6)] Calling AppiumDriver.execute() with args: ["mobile:getContexts",[],"00fa79f6-e9e5-4c09-95fd-69e0ad7ce772"] [debug] [FlutterDriver] Executing proxied driver command 'execute' [debug] [XCUITest] Executing command 'execute' [debug] [XCUITest] Getting list of available contexts [debug] [iOS] Retrieving contexts and views [debug] [XCUITest] Selecting by url: false [debug] [RemoteDebugger] Sending connection key request [debug] [RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 4): 'setConnectionKey' [debug] [RemoteDebugger] Sending to Web Inspector took 3ms [debug] [RemoteDebugger] Selecting application [debug] [RemoteDebugger] No applications currently connected. [debug] [XCUITest] No web frames found. [debug] [XCUITest] No webviews found in 4ms [debug] [MJSONWP (00fa79f6)] Responding to client with driver.execute() result: [{"id":"NATIVE_APP"}] [info] [HTTP] <-- POST /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/execute 200 5 ms - 93 [info] [HTTP]  [info] [HTTP] --> POST /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/context [info] [HTTP] {"name":"FLUTTER"} [debug] [MJSONWP (00fa79f6)] Calling AppiumDriver.setContext() with args: ["FLUTTER","00fa79f6-e9e5-4c09-95fd-69e0ad7ce772"] [debug] [FlutterDriver] Executing Flutter driver command 'setContext' [debug] [MJSONWP (00fa79f6)] Responding to client with driver.setContext() result: "FLUTTER" [info] [HTTP] <-- POST /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/context 200 1 ms - 81 [info] [HTTP]  [info] [HTTP] --> POST /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/execute [info] [HTTP] {"script":"return (function e(t){const{platformName:e,statBarHeight:r}=t,o=\"android\"===e.toLowerCase(),i=o?window.devicePixelRatio:1,a=o?56:50,d=window.screen.height-window.innerHeight-r;return r+(d>=0&&d-a<0?d:a)i}).apply(null, arguments);","args":[{"platformName":"iOS","statBarHeight":20}]} [debug] [MJSONWP (00fa79f6)] Calling AppiumDriver.execute() with args: ["return (function e(t){const{platformName:e,statBarHeight:r}=t,o=\"android\"===e.toLowerCase(),i=o?window.devicePixelRatio:1,a=o?56:50,d=window.screen.height-window.innerHeight-r;return r+(d>=0&&d-a<0?d:a)i}).apply(null, arguments);",[{"platformName":"iOS","statBarHeight":20}],"00fa79f6-e9e5-4c09-95fd-69e0ad7ce772"] [debug] [FlutterDriver] Executing Flutter driver command 'execute' [debug] [MJSONWP (00fa79f6)] Encountered internal error running command: Error: Command not support: "return (function e(t){const{platformName:e,statBarHeight:r}=t,o="android"===e.toLowerCase(),i=o?window.devicePixelRatio:1,a=o?56:50,d=window.screen.height-window.innerHeight-r;return r+(d>=0&&d-a<0?d:a)*i}).apply(null, arguments);" [debug] [MJSONWP (00fa79f6)] at FlutterDriver.exports.execute (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-flutter-driver/lib/commands/execute.ts:15:11) [debug] [MJSONWP (00fa79f6)] at commandExecutor (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-flutter-driver/node_modules/appium-base-driver/lib/basedriver/driver.js:330:9) [debug] [MJSONWP (00fa79f6)] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/async-lock/lib/index.js:129:12 [debug] [MJSONWP (00fa79f6)] at AsyncLock._promiseTry (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/async-lock/lib/index.js:253:31) [debug] [MJSONWP (00fa79f6)] at exec (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/async-lock/lib/index.js:128:9) [debug] [MJSONWP (00fa79f6)] at AsyncLock.acquire (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/async-lock/lib/index.js:144:3) [debug] [MJSONWP (00fa79f6)] at FlutterDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-flutter-driver/node_modules/appium-base-driver/lib/basedriver/driver.js:343:39) [debug] [MJSONWP (00fa79f6)] at FlutterDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-flutter-driver/lib/driver.ts:123:22) [debug] [MJSONWP (00fa79f6)] at AppiumDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:547:36) [debug] [MJSONWP (00fa79f6)] at runMicrotasks () [debug] [MJSONWP (00fa79f6)] at processTicksAndRejections (internal/process/task_queues.js:85:5) [debug] [MJSONWP (00fa79f6)] at asyncHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:297:21) [info] [HTTP] <-- POST /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/execute 500 22 ms - 428 [info] [HTTP]  [info] [HTTP] --> GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/source [info] [HTTP] {} [debug] [MJSONWP (00fa79f6)] Calling AppiumDriver.getPageSource() with args: ["00fa79f6-e9e5-4c09-95fd-69e0ad7ce772"] [debug] [FlutterDriver] Executing Flutter driver command 'getPageSource' [debug] [MJSONWP (00fa79f6)] Encountered internal error running command: NotYetImplementedError: Method has not yet been implemented [debug] [MJSONWP (00fa79f6)] at FlutterDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-flutter-driver/node_modules/appium-base-driver/lib/basedriver/driver.js:323:13) [debug] [MJSONWP (00fa79f6)] at FlutterDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-flutter-driver/lib/driver.ts:123:22) [debug] [MJSONWP (00fa79f6)] at AppiumDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:547:36) [debug] [MJSONWP (00fa79f6)] at runMicrotasks () [debug] [MJSONWP (00fa79f6)] at processTicksAndRejections (internal/process/task_queues.js:85:5) [debug] [MJSONWP (00fa79f6)] at asyncHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:297:21) [info] [HTTP] <-- GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/source 501 2 ms - 123 [info] [HTTP]  [info] [HTTP] --> GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/screenshot [info] [HTTP] {} [debug] [MJSONWP (00fa79f6)] Calling AppiumDriver.getScreenshot() with args: ["00fa79f6-e9e5-4c09-95fd-69e0ad7ce772"] [debug] [FlutterDriver] Executing Flutter driver command 'getScreenshot'[debug] [MJSONWP (00fa79f6)] Responding to client with driver.getScreenshot() result: "iVBORw0KGgoAAAANSUhEUgAAAu4AAAU2CAYAAADK1zMGAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAACAASURBVHic7N13nF1Vuf/xz1p779NmMiWTMpNCekIIJIReIoIgiooFUfSCgNiwcFUs8BO8ysWGIuK9Kih4aeoVUC6ChaYovfdAQnrvmUxm5pRd1vr9sc85c86UNIbMJHner9e8Zs4+u6xzSML3rHnWs1XHiUdYhBBCCCHEoGW7/2zBYrHFx9aCwWKK3yMLkbVE1hJaCK1la0eeXD4o72MAY+Pv3Y+3lvK5jbVVY6gci+r+XYFCoQBdfKxRXd8BnfFwEy6eUrjlL3CVwik+dhQ4xcca0MVtCoVWxXMXz6t6jCPeXqnbwz2WO9ADEEIIIYQQb55SsM3UJIks5PNB1XZFzzDefVa3e2i3fexX/lShFAbQFoyyaKvi7yhMNiAESFTG0G2MQqn4kwUKR1mMjdO6xkLx58ojFBZrq8N7abx7OgnuQgghhBB7kF4Dcy/7dA+qCkjXJDBYCvmgeI7qs+3IuXubee9xrJXw/maQ4C6EEEIIsQfrCqs9A7tSCoWNt9v4uVQmQWQtfiEsH9995r37z9DX7Hrxx27BOd4o4b2/SXAXQgghhNgD9RqoFWCLYV11hXUFVY9TmQQGCPJhfLwCZRVKWZRV2GLY721Wvcc1ixskvL/5JLgLIYQQQuzh4jxbMbteCuLFx+WFoeWFnZBMJzAWbCGMA27pXMXjKYZ8lMLa3oN8lYrwXr1dwnt/keAuhBBCCDHI9QjNxZn1bdWnd820xwFeEwdnTfFLQSLjYa3F+mHc+aUYqJVVWGVRxRNqpcrdZcqz7n2sYrWVO5W3S3jvDxLchRBCCCH2MH3VoHefbS8F7njWPQ7gGnAAAzgWvGLZjPVLNe9dJTOlq9hergO95vb4ud5m3yW8v2ES3IUQQggh9gB91ZyXA3xlfTtdNe0asChsMdQ6gLHF8K7i717GAyyRH5Xr4HXx... [info] [HTTP] <-- GET /wd/hub/session/00fa79f6-e9e5-4c09-95fd-69e0ad7ce772/screenshot 200 140 ms - 291118 [info] [HTTP] 

KazuCocoa commented 3 years ago

It seems Flutter driver does not support getPageSource yet. driver.execute('flutter: getRenderTree') returns string, but this does not have a feature to convert the string into XML. So I guess the 501 returned.

KazuCocoa commented 3 years ago

Added a note in readme https://github.com/appium-flutter-driver/appium-flutter-driver/pull/176 as current limitation. (Feel free to create a pr to support it)