flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.61k stars 27.34k forks source link

[tool_crash] FileSystemException: FileSystemException: Cannot create file, path = 'reports\coverage' (OS Error: Access is denied. , errno = 5) #76024

Open fredgrott opened 3 years ago

fredgrott commented 3 years ago

Okay, I did already check to make sure that windows folder control access system setting is at off. No commercial virus apps running. Just it will not do flutter test --coverage --coverage-path it does flutter test --coverage with no errors...and yes the folder path exists as I create that at project creation

it's not immediate but here is the full log:

Flutter crash report. Please report a bug at https://github.com/flutter/flutter/issues.

command

flutter test --coverage --coverage-path reports\coverage

exception

FileSystemException: FileSystemException: Cannot create file, path = 'reports\coverage' (OS Error: Access is denied. , errno = 5)

#0      _File.throwIfError (dart:io/file_impl.dart:635:7)
#1      _File.createSync (dart:io/file_impl.dart:273:5)
#2      ForwardingFile.createSync (package:file/src/forwarding/forwarding_file.dart:24:16)
#3      ForwardingFile.createSync (package:file/src/forwarding/forwarding_file.dart:24:16)
#4      CoverageCollector.collectCoverageData (package:flutter_tools/src/test/coverage_collector.dart:148:9)
<asynchronous suspension>
#5      TestCommand.runCommand (package:flutter_tools/src/commands/test.dart:293:53)
<asynchronous suspension>
#6      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:977:18)
#7      _rootRunUnary (dart:async/zone.dart:1198:47)
#8      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#9      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#10     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#11     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#12     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#13     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
#14     _rootRun (dart:async/zone.dart:1190:13)
#15     _CustomZone.run (dart:async/zone.dart:1093:19)
#16     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#17     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
#18     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#19     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#20     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#21     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

flutter doctor


[✓] Flutter (Channel stable, 1.22.6, on Microsoft Windows [Version 10.0.19042.804], locale en-US)
    • Flutter version 1.22.6 at D:\fluttersdk\myfluttersdk\flutter
    • Framework revision 9b2d32b605 (3 weeks ago), 2021-01-22 14:36:39 -0800
    • Engine revision 2f0af37152
    • Dart version 2.10.5

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at D:\androidstuff\androidsdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_SDK_ROOT = D:\androidstuff\androidsdk
    • Java binary at: D:\myOpt\AmazonCorretto\jdk1.8.0_282\bin\java
    • Java version OpenJDK Runtime Environment Corretto-8.282.08.1 (build 1.8.0_282-b08)
    • All Android licenses accepted.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[✓] VS Code (version 1.52.1)
    • VS Code at C:\Users\fgrott\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.18.1

[✓] VS Code, 64-bit edition (version 1.22.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.18.1

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.
iapicca commented 3 years ago

possible duplicate of https://github.com/flutter/flutter/issues/69116

@fredgrott
please try this possible solution