Flutter &引用;外部颤振驱动器“;在“中找不到”;扩展RPC";-问题是什么?

Flutter &引用;外部颤振驱动器“;在“中找不到”;扩展RPC";-问题是什么?,flutter,appium,flutter-test,Flutter,Appium,Flutter Test,当我开始运行appium flatter脚本时,我收到这个错误并等待5分钟。然后继续执行 [FlutterDriver] Attempt #1 [FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:39420/uVLSKORHloI=/ws [FlutterDriver] Connected to ws://127.0.0.1:39420/uVLSKORHloI=/ws [FlutterDriver] "ext.flutte

当我开始运行appium flatter脚本时,我收到这个错误并等待5分钟。然后继续执行

[FlutterDriver] Attempt #1
[FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:39420/uVLSKORHloI=/ws
[FlutterDriver] Connected to ws://127.0.0.1:39420/uVLSKORHloI=/ws
[FlutterDriver] "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame"]
[FlutterDriver] Cannot get Dart Isolate
[FlutterDriver] Error: "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame"]
[FlutterDriver]     at Object.wrappedLogger.errorAndThrow (/usr/local/lib/node_modules/appium-flutter-driver/node_modules/appium-support/lib/logging.js:74:35)
[FlutterDriver]     at Client.onOpenListener (/usr/local/lib/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:91:17)
[FlutterDriver]     at runMicrotasks (<anonymous>)
[FlutterDriver]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
[FlutterDriver] Waiting 300 seconds before trying...
(node:71547) UnhandledPromiseRejectionWarning: Error: "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame"]
    at Object.wrappedLogger.errorAndThrow (/usr/local/lib/node_modules/appium-flutter-driver/node_modules/appium-support/lib/logging.js:74:35)
    at Client.onOpenListener (/usr/local/lib/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:91:17)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:71547) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
[flatterdriver]尝试#1
[Driver]连接到Dart天文台:ws://127.0.0.1:39420/uVLSKORHloI=/ws
[Driver]已连接到ws://127.0.0.1:39420/uVLSKORHloI=/ws
[flatterdriver]“extensionRPCs”[“ext.ui.window.scheduleFrame”]中找不到“ext.flatter.driver”
[Driver]无法获得省道隔离
[flatterdriver]错误:“extensionRPCs”[“ext.ui.window.scheduleFrame”]中找不到ext.flatter.driver”
[flatterdriver]位于Object.wrappedLogger.errorAndRow(/usr/local/lib/node_modules/appium flatter driver/node_modules/appium support/lib/logging.js:74:35)
[flatterdriver]位于Client.onOpenListener(/usr/local/lib/node_modules/appium flatter driver/lib/sessions/observation.ts:91:17)
运行微任务时的[Driver]()
[flatterdriver]at processtick和rejections(internal/process/task_queues.js:93:5)
[Driver]在尝试之前等待300秒。。。
(节点:71547)未经处理的PromisejectionWarning:错误:“extensionRPCs”[“ext.ui.window.scheduleFrame”]中找不到“extensionRPCs”[“ext.ui.window.scheduleFrame”]
在Object.wrappedLogger.erronanthrow(/usr/local/lib/node_modules/appium flatter driver/node_modules/appium support/lib/logging.js:74:35)
在Client.onOpenListener(/usr/local/lib/node_modules/appium flatter driver/lib/sessions/observation.ts:91:17)
在运行微任务时()
在处理和拒绝时(内部/process/task_queues.js:93:5)
(节点:71547)未处理的PromisejectionWarning:未处理的承诺拒绝。此错误源于在没有catch块的异步函数中抛出,或者拒绝未使用.catch()处理的承诺。(拒绝id:3)

问题是什么?

因此基本上,颤振应用程序需要启用仪器,以使测试自动化生效。 因此,您需要添加EnableFlatterDriverExtension();在main.dart中创建调试应用程序

只需在runApp()之前添加