wolfenrain/fluttium

fix: can not start test driver with iOS simulator

dtvtkien opened this issue · 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?

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?

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

eb-so commented

in my case, it's hanging forever

Image

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

eb-so commented

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

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

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.