Giter VIP home page Giter VIP logo

Comments (4)

vixez avatar vixez commented on September 24, 2024 1

Hello @huycozy,
I created the sample app from the linked article, I am experiencing the same issue.

I am not running the tests through the command line, but using the UI in Android Studio.
It seems to always fail when running the tests with debugging in Android Studio.
If I run the tests without debugging, it works as expected.

Regular run:
Screenshot 2024-02-26 at 11 41 36

Debug run:
Screenshot 2024-02-26 at 11 40 43

/Users/glennruysschaert/development/flutter/bin/flutter --no-color test --machine --start-paused -d emulator-5554 integration_test/app_test.dart
Testing started at 11:34 ...
Running Gradle task 'assembleDebug'...                              9.2s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app-debug.apk...        2,023ms

adb uninstall failed: ProcessException: Process exited abnormally with exit code -2:

  Command: /Users/glennruysschaert/Library/Android/sdk/platform-tools/adb -s emulator-5554 uninstall com.example.integration_test_example
unhandled error during finalization of test:
/Users/glennruysschaert/Code/integration_test_example/integration_test/app_test.dart
PathNotFoundException: Deletion failed, path = '/var/folders/l9/rsj1dsjd64b2hnrzxw53hvc80000gn/T/flutter_tools.IaoJJH/flutter_test_listener.pLE6A2' (OS Error: No such file or directory, errno = 2)
#0      _Directory._deleteSync (dart:io/directory_impl.dart:188:7)
#1      FileSystemEntity.deleteSync (dart:io/file_system_entity.dart:407:7)
#2      ForwardingFileSystemEntity.deleteSync (package:file/src/forwarding/forwarding_file_system_entity.dart:70:16)
#3      FlutterPlatform._createListenerDart.<anonymous closure> (package:flutter_tools/src/test/flutter_platform.dart:601:15)
#4      FlutterPlatform._startTest (package:flutter_tools/src/test/flutter_platform.dart:565:26)
<asynchronous suspension>
#5      Future.wait.<anonymous closure> (dart:async/future.dart:518:21)
<asynchronous suspension>
#6      _FlutterPlatformStreamSinkWrapper.close.<anonymous closure> (package:flutter_tools/src/test/flutter_platform.dart:675:7)
<asynchronous suspension>

dart:io/directory_impl.dart 188:7                                     _Directory._deleteSync
dart:io/file_system_entity.dart 407:7                                 FileSystemEntity.deleteSync
package:file/src/forwarding/forwarding_file_system_entity.dart 70:16  ForwardingFileSystemEntity.deleteSync
package:flutter_tools/src/test/flutter_platform.dart 601:15           FlutterPlatform._createListenerDart.<fn>
package:flutter_tools/src/test/flutter_platform.dart 565:26           FlutterPlatform._startTest
===== asynchronous gap ===========================
dart:async/future.dart 518:21                                         Future.wait.<fn>
===== asynchronous gap ===========================
package:flutter_tools/src/test/flutter_platform.dart 675:7            _FlutterPlatformStreamSinkWrapper.close.<fn>
Error: the Dart compiler exited unexpectedly.
package:flutter_tools/src/base/common.dart 10:3  throwToolExit
package:flutter_tools/src/compile.dart 896:9     DefaultResidentCompiler._compile.<fn>
dart:async/zone.dart 1407:47                     _rootRunUnary
dart:async/zone.dart 1308:19                     _CustomZone.runUnary
dart:async/future_impl.dart 838:45               Future._propagateToListeners.handleValueCallback
dart:async/future_impl.dart 867:13               Future._propagateToListeners
dart:async/future_impl.dart 643:5                Future._completeWithValue
dart:async/future_impl.dart 713:7                Future._asyncCompleteWithValue.<fn>
dart:async/zone.dart 1399:13                     _rootRun
dart:async/zone.dart 1301:19                     _CustomZone.run
dart:async/zone.dart 1209:7                      _CustomZone.runGuarded
dart:async/zone.dart 1249:23                     _CustomZone.bindCallbackGuarded.<fn>
dart:async/schedule_microtask.dart 40:21         _microtaskLoop
dart:async/schedule_microtask.dart 49:5          _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 118:13     _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 185:5      _RawReceivePort._handleMessage

PathNotFoundException: Deletion failed, path = '/var/folders/l9/rsj1dsjd64b2hnrzxw53hvc80000gn/T/flutter_tools.IaoJJH/flutter_test_listener.pLE6A2' (OS Error: No such file or directory, errno = 2)

from flutter.

huycozy avatar huycozy commented on September 24, 2024

Hi @vixez
I'm checking this issue with a minimal sample code at An introduction to integration testing but can't see the issue (ran the test a few times)

/Users/huynq/Documents/GitHub/flutter/bin/flutter --no-color test --machine --start-paused -d EUYTFEUSQSRGDA6D integration_test/app_test.dart
Testing started at 12:38 ...
Running Gradle task 'assembleDebug'...                             60.9s
✓  Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app-debug.apk...           5.7s

Could you also try this example and confirm the same result?

from flutter.

huycozy avatar huycozy commented on September 24, 2024

Thanks for the update, I can reproduce the issue when debugging the test. But this only appears on Android Studio as I don't see it on VSCode. For the details, I started debugging the test on the IDE's UI as follows:

Android Studio ❗ VSCode ✅

✅: No Issue ❗: Issue reproduced

flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.19.1, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.19.1 on channel stable at /Users/huynq/Documents/GitHub/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision abb292a07e (29 hours ago), 2024-02-20 14:35:05 -0800
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio Hedgehog.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 17.0.7+0-17.0.7b1000.6-10550314)

[✓] Android Studio (version 2022.2)
    • 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
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 121.0.6167.184

[✓] Network resources
    • All expected network resources are available.

• No issues found!
[!] Flutter (Channel master, 3.20.0-13.0.pre.46, on macOS 14.1 23B74 darwin-x64, locale en-VN)
    • Flutter version 3.20.0-13.0.pre.46 on channel master at /Users/huynq/Documents/GitHub/flutter_master
    ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 523b0c4d84 (3 hours ago), 2024-02-26 15:55:52 -0800
    • Engine revision 04ff2868ce
    • Dart version 3.4.0 (build 3.4.0-176.0.dev)
    • DevTools version 2.33.0-dev.11
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/huynq/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/huynq/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
    • Android Studio at /Applications/Android Studio Hedgehog.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 17.0.7+0-17.0.7b1000.6-10550314)

[✓] Android Studio (version 2022.2)
    • 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
    • android-studio-dir = /Applications/Android Studio.app/
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 122.0.6261.69

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Looking at the stack trace, perhaps tool team can have thoughts on this.

from flutter.

agent3bood avatar agent3bood commented on September 24, 2024

I get the same error when debugging, but just running the test from IDE works.

Both run and debug commands are the same

/Users/username/fvm/versions/3.19.5/bin/flutter --no-color test --machine --start-paused -d 4A757678-006D-46B7-9E32-A7704DC2C067 integration_test/video_test.dart

from flutter.

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.