appium-flutter-driver: "ext.flutter.driver" is not found in "extensionRPCs"

[FlutterDriver] /Users/xxxx/Library/Android/sdk/platform-tools/adb forward tcp:42559 tcp:42559
[FlutterDriver] Attempt #1
[FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:42559/TZyCumpgCHs=/ws
[FlutterDriver] Connected to ws://127.0.0.1:42559/TZyCumpgCHs=/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:35764) 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:35764) 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: 21)
[FlutterDriver] Attempt #2
[FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:42559/TZyCumpgCHs=/ws
[FlutterDriver] Connected to ws://127.0.0.1:42559/TZyCumpgCHs=/ws
[FlutterDriver] "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame","ext.flutter.reassemble","ext.flutter.exit","ext.flutter.saveCompilationTrace","ext.flutter.platformOverride","ext.flutter.evict","ext.flutter.timeDilation","ext.flutter.debugPaint","ext.flutter.debugPaintBaselinesEnabled","ext.flutter.repaintRainbow","ext.flutter.debugCheckElevationsEnabled","ext.flutter.debugDumpLayerTree","ext.flutter.debugDumpRenderTree","ext.flutter.debugDumpSemanticsTreeInTraversalOrder","ext.flutter.debugDumpSemanticsTreeInInverseHitTestOrder","ext.flutter.debugDumpApp","ext.flutter.showPerformanceOverlay","ext.flutter.didSendFirstFrameEvent","ext.flutter.didSendFirstFrameRasterizedEvent","ext.flutter.profileWidgetBuilds","ext.flutter.debugAllowBanner","ext.flutter.debugWidgetInspector","ext.flutter.inspector.structuredErrors","ext.flutter.inspector.show","ext.flutter.inspector.trackRebuildDirtyWidgets","ext.flutter.inspector.trackRepaintWidgets","ext.flutter.inspector.disposeAllGroups","ext.flutter.inspector.disposeGroup","ext.flutter.inspector.isWidgetTreeReady","ext.flutter.inspector.disposeId","ext.flutter.inspector.setPubRootDirectories","ext.flutter.inspector.setSelectionById","ext.flutter.inspector.getParentChain","ext.flutter.inspector.getProperties","ext.flutter.inspector.getChildren","ext.flutter.inspector.getChildrenSummaryTree","ext.flutter.inspector.getChildrenDetailsSubtree","ext.flutter.inspector.getRootWidget","ext.flutter.inspector.getRootRenderObject","ext.flutter.inspector.getRootWidgetSummaryTree","ext.flutter.inspector.getDetailsSubtree","ext.flutter.inspector.getSelectedRenderObject","ext.flutter.inspector.getSelectedWidget","ext.flutter.inspector.getSelectedSummaryWidget","ext.flutter.inspector.isWidgetCreationTracked","ext.flutter.inspector.screenshot","ext.dart.io.getOpenFiles","ext.dart.io.getFileByID","ext.dart.io.getOpenSockets","ext.dart.io.getSocketByID"]
[FlutterDriver] Cannot get Dart Isolate
[FlutterDriver] Error: "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame","ext.flutter.reassemble","ext.flutter.exit","ext.flutter.saveCompilationTrace","ext.flutter.platformOverride","ext.flutter.evict","ext.flutter.timeDilation","ext.flutter.debugPaint","ext.flutter.debugPaintBaselinesEnabled","ext.flutter.repaintRainbow","ext.flutter.debugCheckElevationsEnabled","ext.flutter.debugDumpLayerTree","ext.flutter.debugDumpRenderTree","ext.flutter.debugDumpSemanticsTreeInTraversalOrder","ext.flutter.debugDumpSemanticsTreeInInverseHitTestOrder","ext.flutter.debugDumpApp","ext.flutter.showPerformanceOverlay","ext.flutter.didSendFirstFrameEvent","ext.flutter.didSendFirstFrameRasterizedEvent","ext.flutter.profileWidgetBuilds","ext.flutter.debugAllowBanner","ext.flutter.debugWidgetInspector","ext.flutter.inspector.structuredErrors","ext.flutter.inspector.show","ext.flutter.inspector.trackRebuildDirtyWidgets","ext.flutter.inspector.trackRepaintWidgets","ext.flutter.inspector.disposeAllGroups","ext.flutter.inspector.disposeGroup","ext.flutter.inspector.isWidgetTreeReady","ext.flutter.inspector.disposeId","ext.flutter.inspector.setPubRootDirectories","ext.flutter.inspector.setSelectionById","ext.flutter.inspector.getParentChain","ext.flutter.inspector.getProperties","ext.flutter.inspector.getChildren","ext.flutter.inspector.getChildrenSummaryTree","ext.flutter.inspector.getChildrenDetailsSubtree","ext.flutter.inspector.getRootWidget","ext.flutter.inspector.getRootRenderObject","ext.flutter.inspector.getRootWidgetSummaryTree","ext.flutter.inspector.getDetailsSubtree","ext.flutter.inspector.getSelectedRenderObject","ext.flutter.inspector.getSelectedWidget","ext.flutter.inspector.getSelectedSummaryWidget","ext.flutter.inspector.isWidgetCreationTracked","ext.flutter.inspector.screenshot","ext.dart.io.getOpenFiles","ext.dart.io.getFileByID","ext.dart.io.getOpenSockets","ext.dart.io.getSocketByID"]
[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)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 65 (3 by maintainers)

Commits related to this issue

Most upvoted comments

TL;DR: Use capability 'fullReset': true to clear out artefacts from builds without enableFlutterDriverExtension();.

I had the same problem in Appium 2.0.0-beta.46, and first it worked and then it didn’t. It wasn’t intermittently failing, but rather it worked at first, and then stubbornly it didn’t.

I can reproduce the problem (and fix it) this way: Regular build = app without enableFlutterDriverExtension(); Test build = app with enableFlutterDriverExtension();

  1. Deploy Regular build to device.
  2. Run appium with Test build without capability 'fullReset': true -> “ext.flutter.driver” is not found in “extensionRPCs”
  3. Run appium with Test build with capability 'fullReset': true -> Works as expected
  4. Deploy Regular build to device.
  5. Run appium with Test build without capability 'fullReset': true -> “ext.flutter.driver” is not found in “extensionRPCs”
  6. Run appium with Test build with capability 'fullReset': true -> Works as expected

From this, I’d say there is a problem with cleaning out artefacts from previous deploys. I’m not sure this is the problem everyone is having, but there seems to be a pattern here worth investigating.

Note that flutter_driver package is needed for this driver instead of integration_test

Kind of a tangent but I discovered https://patrol.leancode.co/ and they said they support hybrid apps too. Worth a shot?

On Tue, Jan 3, 2023, 7:49 AM ehabibov @.***> wrote:

Okay, I spent 5+ hours for my case. Having production app with a lot of code I also faced this error on my Samsung. Interesting that sample apk https://github.com/appium-userland/appium-flutter-driver/tree/main/example/sample2 worked fine, but mine - not (seen similar cases here).

If someone get into this thread again or first time - try placing your enableFlutterDriverExtension(); the very first line in main() https://github.com/appium-userland/appium-flutter-driver/blob/main/example/flutter_app_under_test/lib/main.dart#L9 method, i.e. as earlier as possible.

[image: 2023-01-03_17-31-05] https://user-images.githubusercontent.com/20490584/210389944-b4234f1d-6767-48df-bd56-96ce4c7035f0.jpeg

appium --version

2.0.0-beta.48

appium driver list

@.*** [installed (NPM)]

flutter --version

Flutter 3.3.10 • channel stable • https://github.com/flutter/flutter.git

Framework • revision 135454af32 (3 weeks ago) • 2022-12-15 07:36:55 -0800

Engine • revision 3316dd8728

Tools • Dart 2.18.6 • DevTools 2.15.0

Inspector caps:

{

“platformName”: “Android”,

“appium:deviceName”: “<my device udid>”,

“appium:app”: “<my apk path>”,

“appium:noReset”: false,

“appium:automationName”: “Flutter”,

“appium:fullReset”: true,

“appium:maxRetryCount”: “10”

}

P.S.: assumption - seems only works with “reset” cap as using app package/activity loses observatory URL, i.e. url might be printed only once at first interaction with application.

If that helped - kudos to this post to see how much of us were suffering.

— Reply to this email directly, view it on GitHub https://github.com/appium-userland/appium-flutter-driver/issues/28#issuecomment-1369926001, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABENOEJKWKR4VIYW2WWIVDWQRDAJANCNFSM4JX5FIHA . You are receiving this because you commented.Message ID: @.***>

@Trongk58d I am still running appium@1.19.0-beta.0 and the related appium-flutter-driver as seen below:

npm list -g appium-flutter-driver
/usr/local/lib
└─┬ appium@1.19.0-beta.0
  └── appium-flutter-driver@0.0.25 

I have since shortened the retry time in my configuration to: retry_backoff_time: 2000 #2 seconds For me, it almost always works on Attempt 2.

I still get the failed attempt quite often, too.

it works with me, thank you!

Hi @Reppinger It worked using the appium and driver version you informed. Now the issue is more tolerable.

Thank you very much for your support.

@shibupanda I have tried the proposed solution and havent been able to get it working sadly. It hasnt worked even once sadly. Is there anything else I am missing. Can you tell me your configuration if this is working for you (android sdk version, appium version, driver version etc). I am on macos.

i have same problem…any update for this issue? @truongsinh thanks 😃

Hi! Im got some logs to share. I hope it’ll be helpfull

Most often log looks like: [FlutterDriver] Attempt #1 [FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:41330/fEEPmkSE-eE=/ws [FlutterDriver] Connected to ws://127.0.0.1:41330/fEEPmkSE-eE=/ws [FlutterDriver] Listing all isolates: [{"type":"@Isolate","id":"isolates/873273334157827","name":"main","number":"873273334157827"}] [FlutterDriver] "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame"] [FlutterDriver] Waiting 300 seconds before trying...

Once or twice i got: [FlutterDriver] Attempt #1 [FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:37181/fc3C_glNKD4=/ws [FlutterDriver] Connected to ws://127.0.0.1:37181/fc3C_glNKD4=/ws [FlutterDriver] Listing all isolates: [{"type":"@Isolate","id":"isolates/1173056420837443","name":"main","number":"1173056420837443"}] [FlutterDriver] "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame","ext.flutter.reassemble","ext.flutter.exit","ext.flutter.saveCompilationTrace","ext.flutter.platformOverride","ext.flutter.evict","ext.flutter.timeDilation","ext.flutter.debugPaint","ext.flutter.debugPaintBaselinesEnabled","ext.flutter.repaintRainbow","ext.flutter.debugCheckElevationsEnabled","ext.flutter.debugDumpLayerTree","ext.flutter.debugDumpRenderTree","ext.flutter.debugDumpSemanticsTreeInTraversalOrder","ext.flutter.debugDumpSemanticsTreeInInverseHitTestOrder","ext.flutter.debugDumpApp","ext.flutter.showPerformanceOverlay","ext.flutter.didSendFirstFrameEvent","ext.flutter.didSendFirstFrameRasterizedEvent","ext.flutter.profileWidgetBuilds","ext.flutter.debugAllowBanner","ext.flutter.debugWidgetInspector","ext.flutter.inspector.structuredErrors","ext.flutter.inspector.show","ext.flutter.inspector.trackRebuildDirtyWidgets","ext.flutter.inspector.trackRepaintWidgets","ext.flutter.inspector.disposeAllGroups","ext.flutter.inspector.disposeGroup","ext.flutter.inspector.isWidgetTreeReady","ext.flutter.inspector.disposeId","ext.flutter.inspector.setPubRootDirectories","ext.flutter.inspector.setSelectionById","ext.flutter.inspector.getParentChain","ext.flutter.inspector.getProperties","ext.flutter.inspector.getChildren","ext.flutter.inspector.getChildrenSummaryTree","ext.flutter.inspector.getChildrenDetailsSubtree","ext.flutter.inspector.getRootWidget","ext.flutter.inspector.getRootRenderObject","ext.flutter.inspector.getRootWidgetSummaryTree","ext.flutter.inspector.getDetailsSubtree","ext.flutter.inspector.getSelectedRenderObject","ext.flutter.inspector.getSelectedWidget","ext.flutter.inspector.getSelectedSummaryWidget","ext.flutter.inspector.isWidgetCreationTracked","ext.flutter.inspector.screenshot"] [FlutterDriver] Waiting 300 seconds before trying...

@fabdotnet there is no fixes for this with the latest build only we put some logs to debug the issue closely. Could you please share entire Appium logs using gist.

hi. I have the same problem all the time.

@hattersharath please make sure you have enableFlutterDriverExtension(); before running your main app, ref https://github.com/truongsinh/appium-flutter-driver/blob/master/example/flutter_app_under_test/lib/main.dart#L9

I still get most of the sometimes while running script

 Attempt #1
[FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:36023/QWYhtNSA7Ak=/ws
[FlutterDriver] Connected to ws://127.0.0.1:36023/QWYhtNSA7Ak=/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 processTicksAndRejections (internal/process/task_queues.js:93:5)
[FlutterDriver] Waiting 300 seconds before trying...
(node:4524) 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 processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:4524) 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: 1)
(node:4524) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.