Coder Social home page Coder Social logo

Comments (65)

brolund avatar brolund commented on June 9, 2024 6

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.

from appium-flutter-driver.

KazuCocoa avatar KazuCocoa commented on June 9, 2024 2

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

from appium-flutter-driver.

hattersharath avatar hattersharath commented on June 9, 2024 1

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.

from appium-flutter-driver.

truongsinh avatar truongsinh commented on June 9, 2024 1

@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

from appium-flutter-driver.

kirill09 avatar kirill09 commented on June 9, 2024 1

hi.
I have the same problem all the time.

from appium-flutter-driver.

shibupanda avatar shibupanda commented on June 9, 2024 1

@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.

from appium-flutter-driver.

davidyukav avatar davidyukav commented on June 9, 2024 1

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...

from appium-flutter-driver.

gofur avatar gofur commented on June 9, 2024 1

i have same problem..any update for this issue? @truongsinh thanks :)

from appium-flutter-driver.

dannysood avatar dannysood commented on June 9, 2024 1

@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.

from appium-flutter-driver.

pablo-gonzalez avatar pablo-gonzalez commented on June 9, 2024 1

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.

from appium-flutter-driver.

Trongk58d avatar Trongk58d commented on June 9, 2024 1

@Trongk58d I am still running [email protected] and the related appium-flutter-driver as seen below:

npm list -g appium-flutter-driver
/usr/local/lib
└─┬ [email protected]
  └── [email protected] 

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!

from appium-flutter-driver.

prolificcoder avatar prolificcoder commented on June 9, 2024 1

from appium-flutter-driver.

shibupanda avatar shibupanda commented on June 9, 2024

@hattersharath The issue has already been created.
Please refer the below link.
#27

from appium-flutter-driver.

shibupanda avatar shibupanda commented on June 9, 2024

@hattersharath could you please close this if the issue has been resolved for you.

from appium-flutter-driver.

hattersharath avatar hattersharath commented on June 9, 2024

@shibupanda working on that will be closing soon.

from appium-flutter-driver.

hattersharath avatar hattersharath commented on June 9, 2024

Hi @truongsinh, I have added it in my code before runapp.
But still most of the time it comes for android but works smooth for iOS.

from appium-flutter-driver.

truongsinh avatar truongsinh commented on June 9, 2024

@hattersharath does it happen intermittently to the same build? Is it possible that you can provide us that build, or a trimmed down version which can help us to debug?

from appium-flutter-driver.

hattersharath avatar hattersharath commented on June 9, 2024

@truongsinh Yes, It happens intermittently.
Sorry, I can't share the build due to some reasons.

from appium-flutter-driver.

truongsinh avatar truongsinh commented on June 9, 2024

How frequent is that? Like 1 every 5 times, and then after several re-run (with the same build) then it works?

from appium-flutter-driver.

hattersharath avatar hattersharath commented on June 9, 2024

@truongsinh, it is just random. 1-2 times for every 5 times.

from appium-flutter-driver.

ahashmi24 avatar ahashmi24 commented on June 9, 2024

@hattersharath @kirill09
Can you please confirm if you guys are using --flavor in your command when building your apk?

I have seen a similar issue in flutter community.
flutter/flutter#26968

from appium-flutter-driver.

kirill09 avatar kirill09 commented on June 9, 2024

@ahashmi24 yes we use --flavor. but issues 26968 started flutter driver. I usage appium test.
We have test "flutter driver" and they start without any problems.

from appium-flutter-driver.

hattersharath avatar hattersharath commented on June 9, 2024

@ahashmi24
I have tried using both dev and prod flavor but the result is still same.

Got response with status 200: {"sessionId":"1a1c7574-3d1a-4231-9e77-985e27b0be22","value":{"height":1794,"width":1080}}
[debug] [FlutterDriver] /Users/sharathrudramuniyappa/Library/Android/sdk/platform-tools/adb forward tcp:40283 tcp:40283
[FlutterDriver] Attempt #1
[FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:40283/yuHoLut99EI=/ws
[FlutterDriver] Connected to ws://127.0.0.1:40283/yuHoLut99EI=/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:87: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:83228) 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:87: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:83228) 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:83228) [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.

Once 300 seconds is done, it starts executing script.

from appium-flutter-driver.

truongsinh avatar truongsinh commented on June 9, 2024

Having ext.ui.window.scheduleFrame is quite unexpected. Do you have more than one device (including virtual one) connected, and one of which is ready for Flutter hot reload?

After reading the source code, even when I'm not able to reproduce this, I guest that the root cause is because the app has more than 1 isolates, and so far the driver assumes app has 1 isolate only. Thus I created a fix to check for the isolate with the exact name main.

from appium-flutter-driver.

truongsinh avatar truongsinh commented on June 9, 2024

Published, can you try https://www.npmjs.com/package/appium-flutter-driver/v/0.0.23

from appium-flutter-driver.

phabreeze avatar phabreeze commented on June 9, 2024

Published, can you try https://www.npmjs.com/package/appium-flutter-driver/v/0.0.23

It still working intermittently for me on both Android and iOS.

App built with Flutter v1.9.1+hotfix.6
Emulator Pixel 3 XL API 26

dependencies": {
"appium": "^1.16.0",
"appium-doctor": "^1.13.1",
"appium-flutter-driver": "0.0.24-1",
"webdriver": "^5.18.7"
}

from appium-flutter-driver.

kirill09 avatar kirill09 commented on June 9, 2024

Hey, I'm still experimenting.
Got the test project https://github.com/kirill09/flutter-appium-example.
Tried running tests on a real Google pixel android 10 device.
It's working fine.

I create Virtual Device via android SDK:
Name: Pixel_2_API_27
CPU/ABI: Google Play Intel Atom (x86)
Path: /Users/kirillbelyshev/.android/avd/Pixel_2_API_27.avd
Target: google_apis_playstore [Google Play] (API level 27)
Skin: pixel_2
SD Card: 512M
fastboot.chosenSnapshotFile:
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: pixel_2
hw.lcd.width: 1080
hw.initialOrientation: Portrait
image.androidVersion.api: 27
tag.id: google_apis_playstore
hw.mainKeys: no
hw.camera.front: emulated
avd.ini.displayname: Pixel 2 API 27
hw.gpu.mode: auto
hw.ramSize: 1536
PlayStore.enabled: true
fastboot.forceColdBoot: yes
hw.cpu.ncore: 2
hw.keyboard: yes
hw.sensors.proximity: yes
hw.dPad: no
hw.lcd.height: 1920
vm.heapSize: 256
skin.dynamic: yes
hw.device.manufacturer: Google
hw.gps: yes
hw.audioInput: yes
image.sysdir.1: system-images/android-27/google_apis_playstore/x86/
showDeviceFrame: yes
hw.camera.back: virtualscene
AvdId: Pixel_2_API_27
hw.lcd.density: 420
hw.arc: false
hw.device.hash2: MD5:55acbc835978f326788ed66a5cd4c9a7
fastboot.forceChosenSnapshotBoot: no
fastboot.forceFastBoot: no
hw.trackBall: no
hw.battery: yes
hw.sdCard: yes
tag.display: Google Play
runtime.network.latency: none
disk.dataPartition.size: 6442450944
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes

Launching. On Virtual Device I see applications in appium console:

[FlutterDriver] Attempt #1 [FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:55517/NefCftHGZDs=/ws [FlutterDriver] Connected to ws://127.0.0.1:55517/NefCftHGZDs=/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/node_modules/appium-support/lib/logging.js:74:35) [FlutterDriver] at Client.onOpenListener (/usr/local/lib/node_modules/appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:91:17) [FlutterDriver] at process._tickCallback (internal/process/next_tick.js:68:7) [FlutterDriver] Waiting 300 seconds before trying... (node:82725) UnhandledPromiseRejectionWarning: Error: "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame"] at Object.wrappedLogger.errorAndThrow (/usr/local/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:74:35) at Client.onOpenListener (/usr/local/lib/node_modules/appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:91:17) at process._tickCallback (internal/process/next_tick.js:68:7) (node:82725) 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:82725) [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.

from appium-flutter-driver.

kirill09 avatar kirill09 commented on June 9, 2024

I ran two more tests:

  1. Virtual Device android 10. The result is successful completion of tests
  2. Virtual Device android 9. Got the result an error.

Configuration 1:
Name: Pixel_2_API_29
CPU/ABI: Google Play Intel Atom (x86)
Path: /Users/kirillbelyshev/.android/avd/Pixel_2_API_29.avd
Target: google_apis_playstore [Google Play] (API level 29)
Skin: pixel_2
SD Card: 512M
fastboot.chosenSnapshotFile:
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: pixel_2
hw.lcd.width: 1080
hw.initialOrientation: Portrait
image.androidVersion.api: 29
tag.id: google_apis_playstore
hw.mainKeys: no
hw.camera.front: emulated
avd.ini.displayname: Pixel 2 API 29
hw.gpu.mode: auto
hw.ramSize: 1536
PlayStore.enabled: true
fastboot.forceColdBoot: no
hw.cpu.ncore: 2
hw.keyboard: yes
hw.sensors.proximity: yes
hw.dPad: no
hw.lcd.height: 1920
vm.heapSize: 256
skin.dynamic: yes
hw.device.manufacturer: Google
hw.gps: yes
hw.audioInput: yes
image.sysdir.1: system-images/android-29/google_apis_playstore/x86/
showDeviceFrame: yes
hw.camera.back: virtualscene
AvdId: Pixel_2_API_29
hw.lcd.density: 420
hw.arc: false
hw.device.hash2: MD5:55acbc835978f326788ed66a5cd4c9a7
fastboot.forceChosenSnapshotBoot: no
fastboot.forceFastBoot: yes
hw.trackBall: no
hw.battery: yes
hw.sdCard: yes
tag.display: Google Play
runtime.network.latency: none
disk.dataPartition.size: 6442450944
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes

Configuration 2:
Name: Pixel_2_API_28
CPU/ABI: Google Play Intel Atom (x86)
Path: /Users/kirillbelyshev/.android/avd/Pixel_2_API_28.avd
Target: google_apis_playstore [Google Play] (API level 28)
Skin: pixel_2
SD Card: 512M
fastboot.chosenSnapshotFile:
runtime.network.speed: full
hw.accelerometer: yes
hw.device.name: pixel_2
hw.lcd.width: 1080
hw.initialOrientation: Portrait
image.androidVersion.api: 28
tag.id: google_apis_playstore
hw.mainKeys: no
hw.camera.front: emulated
avd.ini.displayname: Pixel 2 API 28
hw.gpu.mode: auto
hw.ramSize: 1536
PlayStore.enabled: true
fastboot.forceColdBoot: no
hw.cpu.ncore: 2
hw.keyboard: yes
hw.sensors.proximity: yes
hw.dPad: no
hw.lcd.height: 1920
vm.heapSize: 256
skin.dynamic: yes
hw.device.manufacturer: Google
hw.gps: yes
hw.audioInput: yes
image.sysdir.1: system-images/android-28/google_apis_playstore/x86/
showDeviceFrame: yes
hw.camera.back: virtualscene
AvdId: Pixel_2_API_28
hw.lcd.density: 420
hw.arc: false
hw.device.hash2: MD5:55acbc835978f326788ed66a5cd4c9a7
fastboot.forceChosenSnapshotBoot: no
fastboot.forceFastBoot: yes
hw.trackBall: no
hw.battery: yes
hw.sdCard: yes
tag.display: Google Play
runtime.network.latency: none
disk.dataPartition.size: 6442450944
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes

[FlutterDriver] Attempt #1 [FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:44347/XYZuUtL1r3g=/ws [FlutterDriver] Connected to ws://127.0.0.1:44347/XYZuUtL1r3g=/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/node_modules/appium-support/lib/logging.js:74:35) [FlutterDriver] at Client.onOpenListener (/usr/local/lib/node_modules/appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:91:17) [FlutterDriver] at process._tickCallback (internal/process/next_tick.js:68:7) [FlutterDriver] Waiting 300 seconds before trying... (node:4173) UnhandledPromiseRejectionWarning: Error: "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame"] at Object.wrappedLogger.errorAndThrow (/usr/local/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:74:35) at Client.onOpenListener (/usr/local/lib/node_modules/appium/node_modules/appium-flutter-driver/lib/sessions/observatory.ts:91:17) at process._tickCallback (internal/process/next_tick.js:68:7) (node:4173) 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:4173) [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.

from appium-flutter-driver.

kirill09 avatar kirill09 commented on June 9, 2024

Maybe the appium-flutter-driver works correctly with android API level 29?

from appium-flutter-driver.

truongsinh avatar truongsinh commented on June 9, 2024

Maybe the appium-flutter-driver works correctly with android API level 29?

Possible but improbable. Btw, did you check out the latest branch, which include the commit 395177e ? It's supposed to have much more log

from appium-flutter-driver.

shibupanda avatar shibupanda commented on June 9, 2024

We have updated lastest version.
Could you please try with the latest version of appium-flutter-driver.

from appium-flutter-driver.

dannysood avatar dannysood commented on June 9, 2024

@shibupanda Sadly even with the latest update the issue is not going away.

from appium-flutter-driver.

dannysood avatar dannysood commented on June 9, 2024

I have tried a few different things. I have tried switching to various different versions of appium, appium-flutter-driver and flutter. However there's been very little success. Randomly after reinstalling the package it works or after waiting a while it may. But sadly its totally unpredictable and probably works once every 30 tries. I havent been able to identify any pattern. However I would appreciate the help in resolving this quickly as this is the only tool that integrates with nodejs and helps us run e2e tests where rest of our application is outside flutter (web and api).

from appium-flutter-driver.

shibupanda avatar shibupanda commented on June 9, 2024

@dannysood
Could you please have a look on this.
Please let us know if this can fix your issue.

#91

from appium-flutter-driver.

shibupanda avatar shibupanda commented on June 9, 2024

@dannysood
Strange! Did you include enableFlutteDriverrExtension() in the debug app?
Please refer https://github.com/truongsinh/appium-flutter-driver/blob/326967b44ed6b86cda65c48bf8840f62643c827b/example/flutter_app_under_test/lib/main.dart#L9

from appium-flutter-driver.

dannysood avatar dannysood commented on June 9, 2024

First really appreciate you being so prompt and helping out with the solution. When this issue is resolved I would love to contribute some functionality from the TODOs. I have added this but still isnt working. Maybe reviewing the different dependencies like dart, flutter, sdk used, avm configuration, appium version and driver version etc) can be of some help. I am on the latest version of macos if that helps in any way. But I can try replicating and testing this on windows/ubuntu VM.

from appium-flutter-driver.

shibupanda avatar shibupanda commented on June 9, 2024

@dannysood
Please run flutter doctor.
And please the complete Appium server logs which can help me to debug the issue. If possible please try once with our sample application as well.
Please share reproducible apk if you have need to identify where the issue is.

from appium-flutter-driver.

dannysood avatar dannysood commented on June 9, 2024

@shibupanda when I build flutter_app_under_test on my macos machine and test it via nodejs example it shows the same error (ext.flutter.driver not found) (after updating the apk path) however when I use your pre built version of apk (downloaded from releases) as mentioned in nodejs example it works as expected. For some reason my builds (i have tried both --debug and --profile) dont integrate instrumentation as they are supposed to. Can i do something more iwith my flutter setup. I have the latest flutter version (channel stable, 1.20.1) and have followed the standard getting started setup. Ill try to dig deeper a later today/tomorrow because I finally feel I am making some progress on it and come back with logs and more details. APpreciate all the help :)

from appium-flutter-driver.

shibupanda avatar shibupanda commented on June 9, 2024

@dannysood
Below is my machine configuration.
$ dart --version
Dart SDK version: 2.10.0-11.0.dev (dev) (Tue Aug 11 02:21:48 2020 -0700) on "linux_x64"
$ flutter --version
Flutter 1.21.0-10.0.pre.55 • channel master • https://github.com/flutter/flutter.git
Framework • revision 54f21ec7aa (8 hours ago) • 2020-08-12 08:01:03 -0400
Engine • revision ccfc7e5179
Tools • Dart 2.10.0 (build 2.10.0-11.0.dev)

NOTE: Please use debug application. It's not reproducible for me.
Could you please create a sample app which can have the same issue I may help you.

I do flutter run command to create app.

from appium-flutter-driver.

rtiedt1051 avatar rtiedt1051 commented on June 9, 2024

I also have this issue, on Windows OS with an Android emulator, if happens 75% the time and then connects after 300 seconds.. On Mac OS with an Android Emulator it happens 100% of the time and then connects after 300 seconds. On Mac OS with iOS simulator it works correctly every time.

�[35m[FlutterDriver]�[39m Attempt #1
�[35m[FlutterDriver]�[39m Connecting to Dart Observatory: ws://127.0.0.1:39061/PpOxMsRlfok=/ws
�[35m[FlutterDriver]�[39m Connected to ws://127.0.0.1:39061/PpOxMsRlfok=/ws
�[35m[FlutterDriver]�[39m Listing all isolates: [{"type":"@isolate","id":"isolates/3323795019074815","name":"main","number":"3323795019074815"}]
�[35m[FlutterDriver]�[39m Waiting 300 seconds before trying...
�[35m[FlutterDriver]�[39m "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame","ext.dart.io.getHttpEnableTimelineLogging","ext.dart.io.setHttpEnableTimelineLogging","ext.dart.io.getSocketProfile","ext.dart.io.startSocketProfiling","ext.dart.io.pauseSocketProfiling","ext.dart.io.clearSocketProfile","ext.dart.io.getVersion"]

from appium-flutter-driver.

shibupanda avatar shibupanda commented on June 9, 2024

@dannysood
Are you still facing the issue.
Have you tried the above configuration and use flutter run command to build an app?

from appium-flutter-driver.

Reppinger avatar Reppinger commented on June 9, 2024

I am having the same issue:

Flutter 1.22.0-12.0.pre • channel dev • https://github.com/flutter/flutter.git
Framework • revision a27c242b0e (2 weeks ago) • 2020-09-11 17:46:57 -0400
Engine • revision fee6f9e533
Tools • Dart 2.10.0 (build 2.10.0-110.0.dev)
% npm list -g appium-flutter-driver
/usr/local/lib
└─┬ [email protected]
  └── [email protected] 

AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.verasana">
    <!-- Flutter needs it to communicate with the running application
         to allow setting breakpoints, to provide hot reload, etc.
    -->
    <uses-permission android:name="android.permission.INTERNET"/>
</manifest>

I get the ext.flutter.driver" is not found in "extensionRPCs" EVERY TIME if I simply do a flutter build apk --debug. Instead, run flutter drive to build the app (even though I have no flutter driver tests):
flutter drive --target=test_driver/app.dart

Start emulator with:
emulator -wipe-data -no-snapshot-save @Pixel_3_API_29

desired_caps = {
    caps: {
        platformName:  'Android',
        platformVersion: '10.0',
        deviceName:    'Android',
        app:           '../app/build/app/outputs/flutter-apk/app-debug.apk',
        avd: 'Pixel_3_API_29',
        automationName: 'flutter',
        # appActivity: '.app.SearchInvoke'
    },
    appium_lib: {
        wait: 30
    }
}

Call to core.start_driver loads and displays app on simulator, then Appium log:

...
[debug] [WD Proxy] Got response with status 200: {"sessionId":"628019cd-f243-4044-8e2d-a112ae295878","value":{"androidId":"2215fdf84783bd62","apiVersion":"29","bluetooth":null,"brand":"google","carrierName":"Android","displayDensity":440,"locale":"en_US","manufacturer":"Google","model":"Android SDK built for x86","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":102400,"linkUpstreamBandwidthKbps":51200,"networkCapabilities":"NET_CAPABILITY_MMS,NET_CAPABILITY_SUPL,NET_CAPABILITY_DUN,NET_CAPABILITY_FOTA,NET_CAPABILITY_IMS,NET_CAPABILITY_CBS,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","signalStrength":-2147483648,"transportTypes":"TRANSPORT_CELLULAR"},"detailedState":"CONNECTED","extraInfo":"epc.tmobile.com","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":13,"subtypeName":"LTE","type":0,"typeName":"MOBILE"},{"capabilities"...
[debug] [ADB] Running '/Users/randyeppinger/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'com.example.verasana/com.example.verasana.MainActivity and waiting for 'com.example.verasana/com.example.verasana.MainActivity'
[debug] [ADB] Running '/Users/randyeppinger/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n com.example.verasana/com.example.verasana.MainActivity -S'
[debug] [ADB] Waiting up to 20000ms for activity matching pkg: 'com.example.verasana' and activity: 'com.example.verasana.MainActivity' to be focused
[debug] [ADB] Possible activities, to be checked: 'com.example.verasana.MainActivity', 'com.example.verasana.com.example.verasana.MainActivity'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running '/Users/randyeppinger/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window displays'
[debug] [ADB] Found package: 'com.example.verasana' and fully qualified activity name : 'com.example.verasana.MainActivity'
[debug] [WD Proxy] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/wd/hub/session/628019cd-f243-4044-8e2d-a112ae295878/appium/device/pixel_ratio] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"628019cd-f243-4044-8e2d-a112ae295878","value":2.75}
[debug] [WD Proxy] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [WD Proxy] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/wd/hub/session/628019cd-f243-4044-8e2d-a112ae295878/appium/device/system_bars] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"628019cd-f243-4044-8e2d-a112ae295878","value":{"statusBar":66}}
[debug] [WD Proxy] Matched '/window/current/size' to command name 'getWindowSize'
[debug] [WD Proxy] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/628019cd-f243-4044-8e2d-a112ae295878/window/current/size] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"628019cd-f243-4044-8e2d-a112ae295878","value":{"height":2028,"width":1080}}
[debug] [FlutterDriver] /Users/randyeppinger/Library/Android/sdk/platform-tools/adb forward tcp:38453 tcp:38453
[FlutterDriver] Attempt #1
[FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:38453/hQ5RAV-K23g=/ws
[FlutterDriver] Connected to ws://127.0.0.1:38453/hQ5RAV-K23g=/ws
[FlutterDriver] Listing all isolates: [{"type":"@Isolate","id":"isolates/751656550747915","name":"main","number":"751656550747915","isSystemIsolate":false}]
[FlutterDriver] "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame","ext.dart.io.getHttpEnableTimelineLogging","ext.dart.io.setHttpEnableTimelineLogging","ext.dart.io.getSocketProfile","ext.dart.io.startSocketProfiling","ext.dart.io.pauseSocketProfiling","ext.dart.io.clearSocketProfile","ext.dart.io.getVersion","ext.flutter.reassemble","ext.flutter.exit","ext.flutter.platformOverride","ext.flutter.brightnessOverride","ext.flutter.timeDilation","ext.flutter.evict","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.fastReassemble","ext.flutter.profileWidgetBuilds","ext.flutter.invertOversizedImages","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...

from appium-flutter-driver.

Reppinger avatar Reppinger commented on June 9, 2024

Now I have to take that back. I ran it several times without issue. Now it is doing it again. So, put me on the list of people getting the error intermittently. :) Will keep investigating....

from appium-flutter-driver.

Reppinger avatar Reppinger commented on June 9, 2024

Just adding another update that was contributing to my confusion. I get the ext.flutter.driver" is not found in "extensionRPCs" EVERY TIME if I simply do a flutter build apk --debug.
Instead, I MUST run flutter drive to build the app (even though I have no flutter driver tests):
flutter drive --target=test_driver/app.dart

I still receive the error intermittently but it is much more tolerable.

from appium-flutter-driver.

pablo-gonzalez avatar pablo-gonzalez commented on June 9, 2024

Hi. I am facing the same issue running on Android emulator using Ruby.

[FlutterDriver] "ext.flutter.driver" is not found in "extensionRPCs" 
[FlutterDriver] Waiting 300 seconds before trying...

After second try it works fine.

A possible workaround until fix the issue could be to reduce time for next try. 300 seconds (5 minutes) is too much in my opinion). Is it possible to reduce that time using some parameter?
Do you need more details to help to fix the issue?
Thanks

sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.7
BuildVersion:	19H2

node -v
v12.18.4

ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]

gem list  
*** LOCAL GEMS ***

appium_console (2.12.0)
appium_flutter_finder (0.1.1)
appium_lib (10.6.0)
appium_lib_core (3.11.0)
benchmark (default: 0.1.0)
bigdecimal (default: 2.0.0)
bond (0.5.1)
bundle (0.0.1)
bundler (default: 2.1.4)
bundler-unload (1.0.2)
cgi (default: 0.1.0)
childprocess (3.0.0)
chronic_duration (0.10.6)
coderay (1.1.3)
csv (default: 3.1.2)
date (default: 3.0.0)
dbm (default: 1.1.0)
delegate (default: 0.1.0)
did_you_mean (default: 1.4.0)
diff-lcs (1.4.4)
etc (default: 1.1.0)
eventmachine (1.2.7)
executable-hooks (1.6.0)
faye-websocket (0.11.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.4.1)
forwardable (default: 1.3.1)
gem-wrappers (1.4.0)
getoptlong (default: 0.1.0)
io-console (default: 0.5.6)
ipaddr (default: 1.2.2)
irb (default: 1.2.3)
json (default: 2.3.0)
logger (default: 1.4.2)
matrix (default: 0.2.0)
method_source (0.9.2)
mini_portile2 (2.4.0)
minitest (5.14.2, 5.13.0)
mutex_m (default: 0.1.0)
net-pop (default: 0.1.0)
net-smtp (default: 0.1.0)
net-telnet (0.2.0)
nokogiri (1.10.10)
numerizer (0.1.1)
observer (default: 0.1.0)
open3 (default: 0.1.0)
openssl (default: 2.1.2)
ostruct (default: 0.2.0)
power_assert (1.1.7)
prime (default: 0.1.1)
pry (0.12.2)
pstore (default: 0.1.0)
psych (default: 3.1.0)
racc (default: 1.4.16)
rake (13.0.1)
rdoc (default: 6.2.1)
readline (default: 0.0.2)
readline-ext (default: 0.1.0)
reline (default: 0.1.3)
rexml (default: 3.2.3)
rspec (3.9.0)
rspec-core (3.9.2)
rspec-expectations (3.9.2)
rspec-mocks (3.9.1)
rspec-support (3.9.3)
rss (default: 0.2.8)
rubygems-bundler (1.4.5)
rubyzip (2.3.0)
rvm (1.11.3.9)
sdbm (default: 1.0.0)
selenium-webdriver (3.142.7)
singleton (default: 0.1.0)
spec (5.3.4)
stringio (default: 0.1.0)
strscan (default: 1.0.3)
test-unit (3.3.4)
thor (0.20.3)
timeout (default: 0.1.0)
tomlrb (1.3.0)
tracer (default: 0.1.0)
uri (default: 0.10.0)
webrick (default: 1.6.0)
websocket-driver (0.7.3)
websocket-extensions (0.1.5)
xmlrpc (0.3.0)
yaml (default: 0.1.0)
zlib (default: 1.1.0)
[simctl] FlutterDriver Attempt #1
[simctl] FlutterDriver Connecting to Dart Observatory: ws://127.0.0.1:41651/TNOgU2xxEdk=/ws
[simctl] FlutterDriver Connected to ws://127.0.0.1:41651/TNOgU2xxEdk=/ws
[simctl] FlutterDriver Listing all isolates: [{"type":"@Isolate","id":"isolates/1455650481450547","name":"main","number":"1455650481450547"}]
[simctl] FlutterDriver "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame","ext.dart.io.getHttpEnableTimelineLogging","ext.dart.io.setHttpEnableTimelineLogging","ext.dart.io.getSocketProfile","ext.dart.io.startSocketProfiling","ext.dart.io.pauseSocketProfiling","ext.dart.io.clearSocketProfile","ext.dart.io.getVersion"]
[simctl] FlutterDriver Waiting 300 seconds before trying...
[simctl] FlutterDriver Attempt #2
[simctl] FlutterDriver Connecting to Dart Observatory: ws://127.0.0.1:41651/TNOgU2xxEdk=/ws
[simctl] FlutterDriver Connected to ws://127.0.0.1:41651/TNOgU2xxEdk=/ws
[simctl] FlutterDriver Listing all isolates: [{"type":"@Isolate","id":"isolates/1455650481450547","name":"main","number":"1455650481450547"}]
[simctl] Appium New FlutterDriver session created successfully, session e9ac007d-d2e8-42b1-a763-f9adccef7d92 added to master session list
[debug] [simctl] BaseDriver Event 'newSessionStarted' logged at 1601579773461 (16:16:13 GMT-0300 (GMT-03:00))
[debug] [simctl] MJSONWP (e9ac007d) Cached the protocol value 'MJSONWP' for the new session e9ac007d-d2e8-42b1-a763-f9adccef7d92
[debug] [simctl] MJSONWP (e9ac007d) Responding to client with driver.createSession() result: {"shell":null,"allowCors":false,"reboot":false,"ipa":null,"address":"0.0.0.0","port":4723,"basePath":"/wd/hub","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/1q/0kgd4z1x23z13kl_jmlytwcr0000gp/T","traceDir":null,"debugLogSpacing":false,"suppressKillServer":false,"longStacktrace":false,"webkitDebugProxyPort":27753,"wdaLocalPort":8100,"defaultCapabilities":{},"relaxedSecurityEnabled":false,"allowInsecure":[],"denyInsecure":[],"defaultCommandTimeout":60,"keepArtifacts":false,"platformName":"Android...
  ANDROID_CAPS = {
    caps: {
      platformName: 'Android',
      automationName: 'Flutter',
      deviceName: 'emulator-5554',
      app: "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
      retryBackoffTime: 100
    },
    appium_lib: {
      export_session: true,
      wait_timeout: 20,
      wait_interval: 1
    }
  }.freeze

from appium-flutter-driver.

Reppinger avatar Reppinger commented on June 9, 2024

I too wondered if the 300 seconds is configurable. It would certainly make the intermittent issue a little more tolerable.

from appium-flutter-driver.

Reppinger avatar Reppinger commented on June 9, 2024

@pablo-gonzalez For some reason, I had to "ruby-fy" that setting.
retry_backoff_time: 30000 #milliseconds
worked instead of retryBackoffTime.

from appium-flutter-driver.

pablo-gonzalez avatar pablo-gonzalez commented on June 9, 2024

@pablo-gonzalez For some reason, I had to "ruby-fy" that setting.
retry_backoff_time: 30000 #milliseconds
worked instead of retryBackoffTime.

@Reppinger Thank you for your comments. You are right, retryBackoffTime is not recognized by Appium in Ruby.

I am not sure but that capability seems to be related to this in the log:

[simctl] UiAutomator2 Waiting up to 30000ms for UiAutomator2 to be online...

retryBackoffTime | the time wait for socket connection retry for get flutter session (default 300000ms) | 500

By the way the value in documentation seems to be wrong. @truongsinh could you provide some clarification on this?

[Appium] Welcome to Appium v1.18.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[debug] [HTTP] Request idempotency key: 1198053b-fb30-4fb5-85dc-5c463974ad2d
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"platformName":"Android","automationName":"Flutter","deviceName":"emulator-5554","app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","retryBackoffTime":100},"capabilities":{"firstMatch":[{"platformName":"Android","appium:automationName":"Flutter","appium:deviceName":"emulator-5554","appium:app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","appium:retryBackoffTime":100}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","automationName":"Flutter","deviceName":"emulator-5554","app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","retryBackoffTime":100},null,{"firstMatch":[{"platformName":"Android","appium:automationName":"Flutter","appium:deviceName":"emulator-5554","appium:app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","appium:retryBackoffTime":100}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1601659128733 (14:18:48 GMT-0300 (GMT-03:00))
[simctl] Appium Appium v1.18.2 creating new FlutterDriver (v0.0.23) session
[debug] [simctl] BaseDriver Creating session with MJSONWP desired capabilities: {
[debug] [simctl] BaseDriver   "platformName": "Android",
[debug] [simctl] BaseDriver   "automationName": "Flutter",
[debug] [simctl] BaseDriver   "deviceName": "emulator-5554",
[debug] [simctl] BaseDriver   "app": "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
[debug] [simctl] BaseDriver   "retryBackoffTime": 100
[debug] [simctl] BaseDriver }
[simctl] BaseDriver The following capabilities were provided, but are not recognized by Appium:
[simctl] BaseDriver   retryBackoffTime
[simctl] BaseDriver Session created with session id: 47f6937d-a22d-434b-be5a-7ceb2194ce52
[simctl] FlutterDriver Starting an Android proxy session
[debug] [simctl] BaseDriver Creating session with MJSONWP desired capabilities: {
[debug] [simctl] BaseDriver   "platformName": "Android",
[debug] [simctl] BaseDriver   "automationName": "Flutter",
[debug] [simctl] BaseDriver   "deviceName": "emulator-5554",
[debug] [simctl] BaseDriver   "app": "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
[debug] [simctl] BaseDriver   "retryBackoffTime": 100,
[debug] [simctl] BaseDriver   "newCommandTimeout": 0
[debug] [simctl] BaseDriver }
[simctl] BaseDriver The following capabilities were provided, but are not recognized by Appium:
[simctl] BaseDriver   retryBackoffTime
[simctl] BaseDriver Session created with session id: dbb002c0-4fdc-4768-a7f6-1f166dbce770
[simctl] BaseDriver Using local app '/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk'
[debug] [simctl] UiAutomator2 Checking whether app is actually present

Even using retry_backoff_time the capability is not recognized:

[Appium] Welcome to Appium v1.18.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[debug] [HTTP] Request idempotency key: e72bf9f0-ad38-409d-b6d8-300697f2405d
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"platformName":"Android","automationName":"Flutter","deviceName":"emulator-5554","app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","retryBackoffTime":100},"capabilities":{"firstMatch":[{"platformName":"Android","appium:automationName":"Flutter","appium:deviceName":"emulator-5554","appium:app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","appium:retry_backoff_time":100}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","automationName":"Flutter","deviceName":"emulator-5554","app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","retryBackoffTime":100},null,{"firstMatch":[{"platformName":"Android","appium:automationName":"Flutter","appium:deviceName":"emulator-5554","appium:app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","appium:retry_backoff_time":100}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1601660015713 (14:33:35 GMT-0300 (GMT-03:00))
[Appium] The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: ["retryBackoffTime"]
[Appium] Trying to fix W3C capabilities by merging them with JSONWP caps
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver]   retryBackoffTime
[BaseDriver]   automationName
[BaseDriver]   deviceName
[BaseDriver]   app
[BaseDriver]   retry_backoff_time
[simctl] Appium Appium v1.18.2 creating new FlutterDriver (v0.0.23) session
[debug] [simctl] BaseDriver Creating session with MJSONWP desired capabilities: {
[debug] [simctl] BaseDriver   "platformName": "Android",
[debug] [simctl] BaseDriver   "automationName": "Flutter",
[debug] [simctl] BaseDriver   "deviceName": "emulator-5554",
[debug] [simctl] BaseDriver   "app": "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
[debug] [simctl] BaseDriver   "retryBackoffTime": 100
[debug] [simctl] BaseDriver }
[simctl] BaseDriver The following capabilities were provided, but are not recognized by Appium:
[simctl] BaseDriver   retryBackoffTime
[simctl] BaseDriver Session created with session id: 0023129c-c865-40d7-9be3-97198ec78085
[simctl] FlutterDriver Starting an Android proxy session
[debug] [simctl] BaseDriver Creating session with MJSONWP desired capabilities: {
[debug] [simctl] BaseDriver   "platformName": "Android",
[debug] [simctl] BaseDriver   "automationName": "Flutter",
[debug] [simctl] BaseDriver   "deviceName": "emulator-5554",
[debug] [simctl] BaseDriver   "app": "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
[debug] [simctl] BaseDriver   "retryBackoffTime": 100,
[debug] [simctl] BaseDriver   "newCommandTimeout": 0
[debug] [simctl] BaseDriver }
[simctl] BaseDriver The following capabilities were provided, but are not recognized by Appium:
[simctl] BaseDriver   retryBackoffTime
[simctl] BaseDriver Session created with session id: dd2c8eaa-9795-4ed3-a40f-a6235b9523df
[simctl] BaseDriver Using local app '/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk'
[debug] [simctl] UiAutomator2 Checking whether app is actually present

@Reppinger could you kill Appium, restart and share your logs to verify the capabilities for your session?

Thanks in advance.

from appium-flutter-driver.

Reppinger avatar Reppinger commented on June 9, 2024

@pablo-gonzalez, I get the same error that it doesn't recognize the setting, but it works for me.

Here is my desired caps that I am passing from my Cucumber project to Appium:

desired_caps = {
    caps: {
        platformName:  'Android',
        deviceName:    'Pixel',
        app:           ANDROID_APP,
        avd: FigNewton.avd,
        automationName: 'Flutter',
        retry_backoff_time: 10000 #10 seconds
    },
    appium_lib: {
        export_session: true,
        wait_timeout: 20,
        wait_interval: 1
    }
}

$core = ::Appium::Core.for(desired_caps)

Appium logs the following:

The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver]   retryBackoffTime
[BaseDriver]   deviceName
[BaseDriver]   app
[BaseDriver]   avd
[BaseDriver]   automationName
[BaseDriver]   retry_backoff_time
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver]   retryBackoffTime

Yet, when it gets the intermittent error it only waits 10 seconds before making Attempt 2:

[FlutterDriver] Attempt #1
[FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:42859/OZMCTuegozY=/ws
[FlutterDriver] Connected to ws://127.0.0.1:42859/OZMCTuegozY=/ws
[FlutterDriver] Listing all isolates: [{"type":"@Isolate","id":"isolates/3728727374444047","name":"main","number":"3728727374444047","isSystemIsolate":false}]
[FlutterDriver] "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame","ext.dart.io.getHttpEnableTimelineLogging","ext.dart.io.setHttpEnableTimelineLogging","ext.dart.io.getSocketProfile","ext.dart.io.startSocketProfiling","ext.dart.io.pauseSocketProfiling","ext.dart.io.clearSocketProfile","ext.dart.io.getVersion","ext.flutter.reassemble","ext.flutter.exit","ext.flutter.platformOverride","ext.flutter.brightnessOverride"]
[FlutterDriver] Waiting 10 seconds before trying...
[FlutterDriver] Attempt #2

I hope that helps!

from appium-flutter-driver.

pablo-gonzalez avatar pablo-gonzalez commented on June 9, 2024

Thank you @Reppinger for your clarification!

I have tried using the same capability you shared (check log below) but it is not working.

I think you are running on emulator too, right?
Could you share your Appium and Ruby versions and gem list to check the differences please?

Thanks in advance

[Appium] Welcome to Appium v1.18.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[debug] [HTTP] Request idempotency key: 5880511b-9224-4aed-807c-76beb958499e
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"platformName":"Android","automationName":"Flutter","deviceName":"emulator-5554","app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","retryBackoffTime":10000},"capabilities":{"firstMatch":[{"platformName":"Android","appium:automationName":"Flutter","appium:deviceName":"emulator-5554","appium:app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","appium:retry_backoff_time":10000}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","automationName":"Flutter","deviceName":"emulator-5554","app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","retryBackoffTime":10000},null,{"firstMatch":[{"platformName":"Android","appium:automationName":"Flutter","appium:deviceName":"emulator-5554","appium:app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","appium:retry_backoff_time":10000}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1601919961661 (14:46:01 GMT-0300 (GMT-03:00))
[Appium] The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: ["retryBackoffTime"]
[Appium] Trying to fix W3C capabilities by merging them with JSONWP caps
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver]   retryBackoffTime
[BaseDriver]   automationName
[BaseDriver]   deviceName
[BaseDriver]   app
[BaseDriver]   retry_backoff_time
[simctl] Appium Appium v1.18.2 creating new FlutterDriver (v0.0.23) session
[debug] [simctl] BaseDriver Creating session with MJSONWP desired capabilities: {
[debug] [simctl] BaseDriver   "platformName": "Android",
[debug] [simctl] BaseDriver   "automationName": "Flutter",
[debug] [simctl] BaseDriver   "deviceName": "emulator-5554",
[debug] [simctl] BaseDriver   "app": "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
[debug] [simctl] BaseDriver   "retryBackoffTime": 10000
[debug] [simctl] BaseDriver }
[simctl] BaseDriver The following capabilities were provided, but are not recognized by Appium:
[simctl] BaseDriver   retryBackoffTime
[simctl] BaseDriver Session created with session id: 8ded6f23-acd4-4854-93fb-ab54bbeb1a7d
[simctl] FlutterDriver Starting an Android proxy session
[debug] [simctl] BaseDriver Creating session with MJSONWP desired capabilities: {
[debug] [simctl] BaseDriver   "platformName": "Android",
[debug] [simctl] BaseDriver   "automationName": "Flutter",
[debug] [simctl] BaseDriver   "deviceName": "emulator-5554",
[debug] [simctl] BaseDriver   "app": "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
[debug] [simctl] BaseDriver   "retryBackoffTime": 10000,
[debug] [simctl] BaseDriver   "newCommandTimeout": 0
[debug] [simctl] BaseDriver }
[simctl] BaseDriver The following capabilities were provided, but are not recognized by Appium:
[simctl] BaseDriver   retryBackoffTime
[simctl] BaseDriver Session created with session id: bf0cf036-6efd-4aff-bdd5-4e38acf13045
[simctl] BaseDriver Using local app '/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk'
[debug] [simctl] UiAutomator2 Checking whether app is actually present
...
[simctl] FlutterDriver Attempt #1
[simctl] FlutterDriver Connecting to Dart Observatory: ws://127.0.0.1:33141/ORAT-h4wA70=/ws
[simctl] FlutterDriver Connected to ws://127.0.0.1:33141/ORAT-h4wA70=/ws
[simctl] FlutterDriver Listing all isolates: [{"type":"@Isolate","id":"isolates/1028156084125559","name":"main","number":"1028156084125559"}]
[simctl] FlutterDriver "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame","ext.dart.io.getHttpEnableTimelineLogging","ext.dart.io.setHttpEnableTimelineLogging","ext.dart.io.getSocketProfile","ext.dart.io.startSocketProfiling","ext.dart.io.pauseSocketProfiling","ext.dart.io.clearSocketProfile","ext.dart.io.getVersion"]
[simctl] FlutterDriver Waiting 300 seconds before trying...

from appium-flutter-driver.

Reppinger avatar Reppinger commented on June 9, 2024

Yes, @pablo-gonzalez I am using an Android emulator. It also works with another dev's emulator and on the emulator on the build server.
I don't recall where I read it, but you want to use appium-flutter-driver 0.25 which requires installing Appium 1.19 beta.

npm install -g [email protected]

npm list -g appium-flutter-driver
/usr/local/lib
└─┬ [email protected]
  └── [email protected] 

I'm using ruby 2.6.6p146 on MacOS with rvm.

Here's my Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (6.0.3.3)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 0.7, < 2)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
      zeitwerk (~> 2.2, >= 2.2.2)
    appium_flutter_finder (0.1.1)
      appium_lib_core (~> 3.4, >= 3.4.2)
    appium_lib (10.6.0)
      appium_lib_core (~> 3.3)
      nokogiri (~> 1.8, >= 1.8.1)
      tomlrb (~> 1.1)
    appium_lib_core (3.11.0)
      faye-websocket (~> 0.11.0)
      selenium-webdriver (~> 3.14, >= 3.14.1)
    builder (3.2.4)
    childprocess (3.0.0)
    concurrent-ruby (1.1.7)
    cucumber (5.1.2)
      builder (~> 3.2, >= 3.2.4)
      cucumber-core (~> 8.0, >= 8.0.1)
      cucumber-create-meta (~> 2.0, >= 2.0.2)
      cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
      cucumber-gherkin (~> 15.0, >= 15.0.2)
      cucumber-html-formatter (~> 9.0, >= 9.0.0)
      cucumber-messages (~> 13.1, >= 13.1.0)
      cucumber-wire (~> 4.0, >= 4.0.1)
      diff-lcs (~> 1.4, >= 1.4.4)
      multi_test (~> 0.1, >= 0.1.2)
      sys-uname (~> 1.2, >= 1.2.1)
    cucumber-core (8.0.1)
      cucumber-gherkin (~> 15.0, >= 15.0.2)
      cucumber-messages (~> 13.0, >= 13.0.1)
      cucumber-tag-expressions (~> 2.0, >= 2.0.4)
    cucumber-create-meta (2.0.2)
      cucumber-messages (~> 13.0, >= 13.0.1)
      sys-uname (~> 1.2, >= 1.2.1)
    cucumber-cucumber-expressions (10.3.0)
    cucumber-gherkin (15.0.2)
      cucumber-messages (~> 13.0, >= 13.0.1)
    cucumber-html-formatter (9.0.0)
      cucumber-messages (~> 13.0, >= 13.0.1)
    cucumber-messages (13.1.0)
      protobuf-cucumber (~> 3.10, >= 3.10.8)
    cucumber-tag-expressions (2.0.4)
    cucumber-wire (4.0.1)
      cucumber-core (~> 8.0, >= 8.0.1)
      cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
      cucumber-messages (~> 13.0, >= 13.0.1)
    diff-lcs (1.4.4)
    eventmachine (1.2.7)
    faye-websocket (0.11.0)
      eventmachine (>= 0.12.0)
      websocket-driver (>= 0.5.1)
    ffi (1.13.1)
    fig_newton (1.0)
      yml_reader (>= 0.7)
    i18n (1.8.5)
      concurrent-ruby (~> 1.0)
    middleware (0.1.0)
    mini_portile2 (2.4.0)
    minitest (5.14.2)
    multi_test (0.1.2)
    nokogiri (1.10.10)
      mini_portile2 (~> 2.4.0)
    protobuf-cucumber (3.10.8)
      activesupport (>= 3.2)
      middleware
      thor
      thread_safe
    rake (13.0.1)
    rspec (3.9.0)
      rspec-core (~> 3.9.0)
      rspec-expectations (~> 3.9.0)
      rspec-mocks (~> 3.9.0)
    rspec-core (3.9.2)
      rspec-support (~> 3.9.3)
    rspec-expectations (3.9.2)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.9.0)
    rspec-mocks (3.9.1)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.9.0)
    rspec-support (3.9.3)
    rubyzip (2.3.0)
    selenium-webdriver (3.142.7)
      childprocess (>= 0.5, < 4.0)
      rubyzip (>= 1.2.2)
    sys-uname (1.2.1)
      ffi (>= 1.0.0)
    thor (1.0.1)
    thread_safe (0.3.6)
    tomlrb (1.3.0)
    tzinfo (1.2.7)
      thread_safe (~> 0.1)
    websocket-driver (0.7.3)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.5)
    yml_reader (0.7)
    zeitwerk (2.4.0)

PLATFORMS
  ruby

DEPENDENCIES
  appium_flutter_finder
  appium_lib
  cucumber
  fig_newton
  rake
  rspec

BUNDLED WITH
   2.1.4

from appium-flutter-driver.

Trongk58d avatar Trongk58d commented on June 9, 2024

Thank you @Reppinger for your clarification!

I have tried using the same capability you shared (check log below) but it is not working.

I think you are running on emulator too, right?
Could you share your Appium and Ruby versions and gem list to check the differences please?

Thanks in advance

[Appium] Welcome to Appium v1.18.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[debug] [HTTP] Request idempotency key: 5880511b-9224-4aed-807c-76beb958499e
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"platformName":"Android","automationName":"Flutter","deviceName":"emulator-5554","app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","retryBackoffTime":10000},"capabilities":{"firstMatch":[{"platformName":"Android","appium:automationName":"Flutter","appium:deviceName":"emulator-5554","appium:app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","appium:retry_backoff_time":10000}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","automationName":"Flutter","deviceName":"emulator-5554","app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","retryBackoffTime":10000},null,{"firstMatch":[{"platformName":"Android","appium:automationName":"Flutter","appium:deviceName":"emulator-5554","appium:app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","appium:retry_backoff_time":10000}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1601919961661 (14:46:01 GMT-0300 (GMT-03:00))
[Appium] The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: ["retryBackoffTime"]
[Appium] Trying to fix W3C capabilities by merging them with JSONWP caps
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver]   retryBackoffTime
[BaseDriver]   automationName
[BaseDriver]   deviceName
[BaseDriver]   app
[BaseDriver]   retry_backoff_time
[simctl] Appium Appium v1.18.2 creating new FlutterDriver (v0.0.23) session
[debug] [simctl] BaseDriver Creating session with MJSONWP desired capabilities: {
[debug] [simctl] BaseDriver   "platformName": "Android",
[debug] [simctl] BaseDriver   "automationName": "Flutter",
[debug] [simctl] BaseDriver   "deviceName": "emulator-5554",
[debug] [simctl] BaseDriver   "app": "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
[debug] [simctl] BaseDriver   "retryBackoffTime": 10000
[debug] [simctl] BaseDriver }
[simctl] BaseDriver The following capabilities were provided, but are not recognized by Appium:
[simctl] BaseDriver   retryBackoffTime
[simctl] BaseDriver Session created with session id: 8ded6f23-acd4-4854-93fb-ab54bbeb1a7d
[simctl] FlutterDriver Starting an Android proxy session
[debug] [simctl] BaseDriver Creating session with MJSONWP desired capabilities: {
[debug] [simctl] BaseDriver   "platformName": "Android",
[debug] [simctl] BaseDriver   "automationName": "Flutter",
[debug] [simctl] BaseDriver   "deviceName": "emulator-5554",
[debug] [simctl] BaseDriver   "app": "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
[debug] [simctl] BaseDriver   "retryBackoffTime": 10000,
[debug] [simctl] BaseDriver   "newCommandTimeout": 0
[debug] [simctl] BaseDriver }
[simctl] BaseDriver The following capabilities were provided, but are not recognized by Appium:
[simctl] BaseDriver   retryBackoffTime
[simctl] BaseDriver Session created with session id: bf0cf036-6efd-4aff-bdd5-4e38acf13045
[simctl] BaseDriver Using local app '/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk'
[debug] [simctl] UiAutomator2 Checking whether app is actually present
...
[simctl] FlutterDriver Attempt #1
[simctl] FlutterDriver Connecting to Dart Observatory: ws://127.0.0.1:33141/ORAT-h4wA70=/ws
[simctl] FlutterDriver Connected to ws://127.0.0.1:33141/ORAT-h4wA70=/ws
[simctl] FlutterDriver Listing all isolates: [{"type":"@Isolate","id":"isolates/1028156084125559","name":"main","number":"1028156084125559"}]
[simctl] FlutterDriver "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame","ext.dart.io.getHttpEnableTimelineLogging","ext.dart.io.setHttpEnableTimelineLogging","ext.dart.io.getSocketProfile","ext.dart.io.startSocketProfiling","ext.dart.io.pauseSocketProfiling","ext.dart.io.clearSocketProfile","ext.dart.io.getVersion"]
[simctl] FlutterDriver Waiting 300 seconds before trying...

i have same issue with You, have any update for this issue?

from appium-flutter-driver.

Trongk58d avatar Trongk58d commented on June 9, 2024

Thank you @Reppinger for your clarification!
I have tried using the same capability you shared (check log below) but it is not working.
I think you are running on emulator too, right?
Could you share your Appium and Ruby versions and gem list to check the differences please?
Thanks in advance

[Appium] Welcome to Appium v1.18.2
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[debug] [HTTP] Request idempotency key: 5880511b-9224-4aed-807c-76beb958499e
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"platformName":"Android","automationName":"Flutter","deviceName":"emulator-5554","app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","retryBackoffTime":10000},"capabilities":{"firstMatch":[{"platformName":"Android","appium:automationName":"Flutter","appium:deviceName":"emulator-5554","appium:app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","appium:retry_backoff_time":10000}]}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","automationName":"Flutter","deviceName":"emulator-5554","app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","retryBackoffTime":10000},null,{"firstMatch":[{"platformName":"Android","appium:automationName":"Flutter","appium:deviceName":"emulator-5554","appium:app":"/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk","appium:retry_backoff_time":10000}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1601919961661 (14:46:01 GMT-0300 (GMT-03:00))
[Appium] The following capabilities were provided in the JSONWP desired capabilities that are missing in W3C capabilities: ["retryBackoffTime"]
[Appium] Trying to fix W3C capabilities by merging them with JSONWP caps
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver]   retryBackoffTime
[BaseDriver]   automationName
[BaseDriver]   deviceName
[BaseDriver]   app
[BaseDriver]   retry_backoff_time
[simctl] Appium Appium v1.18.2 creating new FlutterDriver (v0.0.23) session
[debug] [simctl] BaseDriver Creating session with MJSONWP desired capabilities: {
[debug] [simctl] BaseDriver   "platformName": "Android",
[debug] [simctl] BaseDriver   "automationName": "Flutter",
[debug] [simctl] BaseDriver   "deviceName": "emulator-5554",
[debug] [simctl] BaseDriver   "app": "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
[debug] [simctl] BaseDriver   "retryBackoffTime": 10000
[debug] [simctl] BaseDriver }
[simctl] BaseDriver The following capabilities were provided, but are not recognized by Appium:
[simctl] BaseDriver   retryBackoffTime
[simctl] BaseDriver Session created with session id: 8ded6f23-acd4-4854-93fb-ab54bbeb1a7d
[simctl] FlutterDriver Starting an Android proxy session
[debug] [simctl] BaseDriver Creating session with MJSONWP desired capabilities: {
[debug] [simctl] BaseDriver   "platformName": "Android",
[debug] [simctl] BaseDriver   "automationName": "Flutter",
[debug] [simctl] BaseDriver   "deviceName": "emulator-5554",
[debug] [simctl] BaseDriver   "app": "/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk",
[debug] [simctl] BaseDriver   "retryBackoffTime": 10000,
[debug] [simctl] BaseDriver   "newCommandTimeout": 0
[debug] [simctl] BaseDriver }
[simctl] BaseDriver The following capabilities were provided, but are not recognized by Appium:
[simctl] BaseDriver   retryBackoffTime
[simctl] BaseDriver Session created with session id: bf0cf036-6efd-4aff-bdd5-4e38acf13045
[simctl] BaseDriver Using local app '/Users/pablo.gonzalez/projects/my_app/build/app/outputs/flutter-apk/app-debug.apk'
[debug] [simctl] UiAutomator2 Checking whether app is actually present
...
[simctl] FlutterDriver Attempt #1
[simctl] FlutterDriver Connecting to Dart Observatory: ws://127.0.0.1:33141/ORAT-h4wA70=/ws
[simctl] FlutterDriver Connected to ws://127.0.0.1:33141/ORAT-h4wA70=/ws
[simctl] FlutterDriver Listing all isolates: [{"type":"@Isolate","id":"isolates/1028156084125559","name":"main","number":"1028156084125559"}]
[simctl] FlutterDriver "ext.flutter.driver" is not found in "extensionRPCs" ["ext.ui.window.scheduleFrame","ext.dart.io.getHttpEnableTimelineLogging","ext.dart.io.setHttpEnableTimelineLogging","ext.dart.io.getSocketProfile","ext.dart.io.startSocketProfiling","ext.dart.io.pauseSocketProfiling","ext.dart.io.clearSocketProfile","ext.dart.io.getVersion"]
[simctl] FlutterDriver Waiting 300 seconds before trying...

i have same issue with You, have any update for this issue?

sometimes i run success, but not much, error happens more regularly!

from appium-flutter-driver.

Reppinger avatar Reppinger commented on June 9, 2024

@Trongk58d I am still running [email protected] and the related appium-flutter-driver as seen below:

npm list -g appium-flutter-driver
/usr/local/lib
└─┬ [email protected]
  └── [email protected] 

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.

from appium-flutter-driver.

Trongk58d avatar Trongk58d commented on June 9, 2024

@Trongk58d I am still running [email protected] and the related appium-flutter-driver as seen below:

npm list -g appium-flutter-driver
/usr/local/lib
└─┬ [email protected]
  └── [email protected] 

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.

thank you!
image
my appium is the newest version (1.19.0) and the same version of appium-flutter-driver with U! I will try to change retry_backoff_time like You and rerun it, tks!

from appium-flutter-driver.

sahanaprasad avatar sahanaprasad commented on June 9, 2024

I'm having the same issue. Changed appium to beta version as well. It is still not working for me. Tried with android emulator API26 and real device. Still no luck. Is there any update on this issue?

from appium-flutter-driver.

mesolutionsN avatar mesolutionsN commented on June 9, 2024

Is there any further fix or workaround possible?

from appium-flutter-driver.

huylg avatar huylg commented on June 9, 2024

does anyone have a solution for this issue? I am getting the same issue :(

from appium-flutter-driver.

LSambo02 avatar LSambo02 commented on June 9, 2024

For me it was getting this error for using incompatible packages with Sound Null-Safety.
After I rolled back to an sdk version prior to 2.7 (dart) and got rid of all the package versions related to null-safety it worked.

EDIT 1:
Another point to peer attention is to make sure you are using the latest appium flutter driver, currently on 0.0.28

from appium-flutter-driver.

ravireddy07 avatar ravireddy07 commented on June 9, 2024

i'm getting the tree like this:

npm list -g appium-flutter-driver

/usr/local/lib
└── [email protected] 
└─┬ [email protected]
       └── [email protected] 

from appium-flutter-driver.

jackgitsource avatar jackgitsource commented on June 9, 2024

I encountered this problem and I solved it.

#Upgrade the fluent SDK to the latest version. Mine is

#Use the fluent create command to create a new project

#Migrate your old project business code to the new project

#configure enableFlutterDriverExtension

#flutter clean && flutter build apk --debug

from appium-flutter-driver.

prolificcoder avatar prolificcoder commented on June 9, 2024

This problem is still happening to me on both iOS or Android and even on a physical device. For the small sample apps I was able to add the enableFlutterDriverExtension() call #256 and it works.

But when I add this enableFlutterDriverExtension on my PROD app I am getting the following error and the app hangs

[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: 'package:flutter_driver/src/extension/extension.dart': Failed assertion: line 222 pos 10: 'WidgetsBinding.instance == null': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      enableFlutterDriverExtension (package:flutter_driver/src/extension/extension.dart:222:10)
#3      main (package:sofi_x_package/main.dart:19:3)
#4      main (package:sofi_x_flutter/main.dart:4:9)
#5      main (file:///Users/smalugu/code/sofi-x/.dart_tool/flutter_build/generated_main.dart:212:42)
#6      _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:128:38)
#7      _rootRun (dart:async/zone.dart:1426:13)
#8      _CustomZone.run (dart:async/zone.dart:1328:19)
#9      _runZoned (dart:async/zone.dart:1861:10)
#10     runZonedGuarded (dart:async/zone.dart:1849:12)
#11     _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:126:5)<…>

Are there any known workarounds?

Looks like google's moving away from flutter_driver for integration tests to integration_test and appium_flutter_driver is depending on this old driver. This seems like a fundamental issue? Am i missing something, why is this issue closed?

from appium-flutter-driver.

MatteoAntolini avatar MatteoAntolini commented on June 9, 2024

Solved by adding

dev_dependencies:
 flutter_driver:
    sdk: flutter

And then starting the client with capability 'appium:fullReset': true,

from appium-flutter-driver.

LSambo02 avatar LSambo02 commented on June 9, 2024

This problem is still happening to me on both iOS or Android and even on a physical device. For the small sample apps I was able to add the enableFlutterDriverExtension() call #256 and it works.

But when I add this enableFlutterDriverExtension on my PROD app I am getting the following error and the app hangs

[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: 'package:flutter_driver/src/extension/extension.dart': Failed assertion: line 222 pos 10: 'WidgetsBinding.instance == null': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
#2      enableFlutterDriverExtension (package:flutter_driver/src/extension/extension.dart:222:10)
#3      main (package:sofi_x_package/main.dart:19:3)
#4      main (package:sofi_x_flutter/main.dart:4:9)
#5      main (file:///Users/smalugu/code/sofi-x/.dart_tool/flutter_build/generated_main.dart:212:42)
#6      _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:128:38)
#7      _rootRun (dart:async/zone.dart:1426:13)
#8      _CustomZone.run (dart:async/zone.dart:1328:19)
#9      _runZoned (dart:async/zone.dart:1861:10)
#10     runZonedGuarded (dart:async/zone.dart:1849:12)
#11     _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:126:5)<…>

Are there any known workarounds?

Looks like google's moving away from flutter_driver for integration tests to integration_test and appium_flutter_driver is depending on this old driver. This seems like a fundamental issue? Am i missing something, why is this issue closed?

Are you using the release or debug apk?
Asking because you say "PROD", and it only runs correctly if it's a debug apk.

from appium-flutter-driver.

ehabibov avatar ehabibov commented on June 9, 2024

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 worked fine, but mine - not (seen similar cases here).

If someone get into this thread again or first time - try placing your enableFlutterDriverExtension(); at the very first line in main() method, i.e. as earlier as possible.

2023-01-03_17-31-05

appium --version
2.0.0-beta.48

appium driver list
[email protected] [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.

from appium-flutter-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.