Skip to content

[flutter_driver] Driver tests won't start when project have a path dependency (1.24) #70983

@dluksza

Description

@dluksza

After upgrading from Flutter 1.23 to 1.24, my driver tests won't even start up. Everything worked fine on the previous version and after downgrading issue disappears.

Starting flutter drive on 1.24 results in:

The pubspec.lock file has changed since the .dart_tool/package_config.json file was generated, please run "pub get" again.

I've narrowed dow the issue to a path dependency in my pubspec.yaml. I have two flutter apps linked together. One is my production Android and iOS app. The other have code to generate app screenshots. The screenshots app have a path dependency to app module. Removing this dependency (and commenting out all of the compiler errors) makes driver tests working again.

Steps to Reproduce

  1. Clone https://github.com/dluksza/flutter_path_depenency
  2. Enter app directory
  3. Run flutter drive --target lib/main.dart --driver test_driver/example.dart - test will fail with the issue reported above
  4. Edit pubspec.yaml, remove:
  base:
    path: ../base/
  1. Run flutter drive again, tests will execute successfully

Logs

[✓] Flutter (Channel beta, 1.24.0-10.2.pre, on Mac OS X 10.15.7 19H15 darwin-x64, locale en-GB)
    • Flutter version 1.24.0-10.2.pre at /usr/local/Caskroom/flutter/1.22.4/flutter
    • Framework revision 022b333a08 (3 days ago), 2020-11-18 11:35:09 -0800
    • Engine revision 07c1eed46b
    • Dart version 2.12.0 (build 2.12.0-29.10.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/lock/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = /Users/lock/Library/Android/sdk
    • ANDROID_SDK_ROOT = /usr/local/share/android-sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.2, Build version 12B45b
    • CocoaPods version 1.10.0

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.51.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (1 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
    ! Error: Dariusz’s iPhone is not connected. Xcode will continue when Dariusz’s iPhone is connected. (code -13)

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: regressionIt was better in the past than it is nowtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions