fluttium icon indicating copy to clipboard operation
fluttium copied to clipboard

fix: can not start test driver with iOS simulator

Open dtvtkien opened this issue 1 year ago • 7 comments

Description

I can't start a test driver with my iOS simulator. Here are my logs:

fluttium test flow/splash.yaml ✓ Retrieving devices (6.0s) ✓ Setting up the test runner (27ms) ✓ Setting up the launcher (9ms) ✓ Installing actions (1.4s) ✓ Installing test runner (14.0s) ✗ Failed to start test driver (44.9s) Error (Xcode): Error: Couldn't resolve the package 'fluttium_test_runner' in 'package:fluttium_test_runner/fluttium_test_runner.dart'.

Could not build the application for the simulator. Error launching application on iPhone 14.

✓ Uninstalling test runner

I cannot find anything related to fluttium_test_runner in my project modules. How could I fix that?

dtvtkien avatar Mar 03 '23 11:03 dtvtkien

The fluttium_test_runner is a generated package that Fluttium automatically adds and removes from your pubspec. It seems that installing the test runner was successful so something must have touched the pubspec afterwards.

Are you able to reproduce this consistently?

wolfenrain avatar Mar 03 '23 17:03 wolfenrain

Yes, everytime I start a flow using fluttium test I encounter this problem.

dtvtkien avatar Mar 04 '23 10:03 dtvtkien

in my case, it's hanging forever

Image

eb-so avatar Apr 01 '23 22:04 eb-so

Can you try running it with --verbose? And share the output

wolfenrain avatar Apr 02 '23 16:04 wolfenrain

@wolfenrain Here is the results:

✓ Setting up the test runner (38ms) ✓ Setting up the launcher (9ms) ✓ Installing actions (4.9s) ✓ Installing test runner (22.4s) Running command: flutter run /Users/ebrahimsoliman/Developer/Projects/flutter_projects/inducer/frontend/app/./.fluttium_snMdOs_launcher.dart -d 84755E8C-6741-4931-8F89-5A4E14DCF263 ⠙ Launching the test runner... (0.9s)driver: Launching ./.fluttium_snMdOs_launcher.dart on iPhone 12 Pro in debug mode...

⠇ Launching the test runner... (19.0s)driver: Running pod install...
⠏ Launching the test runner... (88.7s)

eb-so avatar Apr 02 '23 16:04 eb-so

Even I am facing the same problem. Is there any fix for it?

abusaadp avatar Jun 21 '23 15:06 abusaadp

Even I am facing the same problem. Is there any fix for it?

I haven't gotten to the root cause of it but I suspect it is a racing condition. The next version of Fluttium (see #293) should allow the CLI to detect app starts more better and hopefully remedy this problem or provide more insights into it.

wolfenrain avatar Jun 29 '23 08:06 wolfenrain