Closed hattersharath closed 3 years ago
@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.
thank you! 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!
@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!
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?
Is there any further fix or workaround possible?
does anyone have a solution for this issue? I am getting the same issue :(
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
i'm getting the tree like this:
npm list -g appium-flutter-driver
/usr/local/lib
└── appium-flutter-driver@0.0.25
└─┬ appium@1.19.0-beta.0
└── appium-flutter-driver@0.0.32
Note that flutter_driver
package is needed for this driver instead of integration_test
I encountered this problem and I solved it.
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 https://github.com/appium-userland/appium-flutter-driver/pull/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?
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.
Solved by adding
dev_dependencies:
flutter_driver:
sdk: flutter
And then starting the client with capability 'appium:fullReset': true,
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 tointegration_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.
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.
appium --version
2.0.0-beta.48
appium driver list
flutter@1.11.0 [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.
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": "
", "appium:app": "
", "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: @.***>