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
166.15k stars 27.47k forks source link

[tool_crash] FileSystemException: Cannot create file, OS Error: The system cannot find the file specified., errno = 2 #65242

Open arunkumard001 opened 4 years ago

arunkumard001 commented 4 years ago

Command

flutter create buji

Steps to Reproduce

  1. ...
  2. ...
  3. ...

Logs

FileSystemException: Cannot create file, OS Error: The system cannot find the file specified. , errno = 2

#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      Template.render.<anonymous closure> (package:flutter_tools/src/template.dart:218:28)
#5      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
#6      Template.render (package:flutter_tools/src/template.dart:182:24)
#7      CreateCommand._renderTemplate (package:flutter_tools/src/commands/create.dart:795:21)
#8      _rootRunUnary (dart:async/zone.dart:1198:47)
#9      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#10     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#12     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#13     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#14     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#15     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
#16     Template.fromName (package:flutter_tools/src/template.dart)
#17     _rootRunUnary (dart:async/zone.dart:1198:47)
#18     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#19     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
#20     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
#21     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
#22     Future._completeWithValue (dart:async/future_impl.dart:529:5)
#23     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
#24     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
[✓] Flutter (Channel beta, 1.21.0-9.2.pre, on Microsoft Windows [Version 10.0.19041.450], locale en-IN)
    • Flutter version 1.21.0-9.2.pre at C:\src\flutter
    • Framework revision 81a45ec2e5 (8 days ago), 2020-08-27 14:14:33 -0700
    • Engine revision 20a9531835
    • Dart version 2.10.0 (build 2.10.0-7.3.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\arunk\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[✓] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] VS Code (version 1.48.2)
    • VS Code at C:\Users\arunk\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.14.0

[✓] Connected device (4 available)
    • Infinix X625C (mobile) • 0443031974142383 • android-arm64  • Android 9 (API 28)
    • Web Server (web)       • web-server       • web-javascript • Flutter Tools
    • Chrome (web)           • chrome           • web-javascript • Google Chrome 84.0.4147.135
    • Edge (web)             • edge             • web-javascript • Microsoft Edge 85.0.564.44

• No issues found!

Flutter Application Metadata

No pubspec in working directory.

hamdikahloun commented 4 years ago

Hi @arunkumard001 Can you please provide your flutter run --verbose ? Thank you

arunkumard001 commented 4 years ago

Hi @arunkumard001 Can you please provide your flutter run --verbose ? Thank you

flutter run -v ``` [ +554 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +216 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ +2 ms] 81a45ec2e5f80fa71d5135f1702ce540558b416d [ +3 ms] executing: [C:\src\flutter/] git tag --contains HEAD [ +601 ms] Exit code 0 from: git tag --contains HEAD [ +1 ms] 1.21.0-9.2.pre [ +53 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +128 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ +1 ms] origin/beta [ ] executing: [C:\src\flutter/] git ls-remote --get-url origin [ +123 ms] Exit code 0 from: git ls-remote --get-url origin [ +3 ms] https://github.com/flutter/flutter.git [ +188 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD [ +669 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ +2 ms] beta [ +193 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +7 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ +29 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ +5 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ +35 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +75 ms] executing: C:\Users\arunk\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l [ +164 ms] List of devices attached 0443031974142383 device product:H576D model:Infinix_X625C device:Infinix-X625C transport_id:13 [ +29 ms] C:\Users\arunk\AppData\Local\Android\sdk\platform-tools\adb.exe -s 0443031974142383 shell getprop [ +224 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update. [ +23 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ +31 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +11 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ +39 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ +91 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +614 ms] Generating C:\Users\arunk\Videos\buji\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java [ +83 ms] "flutter run" took 1,497ms. [ +70 ms] Sending crash report to Google. [+1974 ms] Crash report sent (report ID: 6fa27dc09fa7ee63) [ +9 ms] Oops; flutter has exited unexpectedly: "FileSystemException: writeFrom failed, path = 'C:\Users\arunk\Videos\buji\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java' (OS Error: Access is denied. , errno = 5)". [ +75 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version [ +265 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version [ +1 ms] openjdk version "1.8.0_242-release" OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode) [ +7 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version [ +291 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version [ +1 ms] openjdk version "1.8.0_242-release" OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode) [ +41 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version [ +257 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version [ +1 ms] openjdk version "1.8.0_242-release" OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode) [ +4 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version [ +250 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version [ +5 ms] openjdk version "1.8.0_242-release" OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode) [ +14 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%ar [ +124 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%ar [ +1 ms] 8 days ago [ +176 ms] java -version \[ +301 ms] ro.hardware = mt6757 [ +5 ms] ro.build.characteristics = default |[ +120 ms] executing: C:\Users\arunk\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l /[ +112 ms] List of devices attached 0443031974142383 device product:H576D model:Infinix_X625C device:Infinix-X625C transport_id:13 \[ +174 ms] executing: C:\Users\arunk\AppData\Local\Android\sdk\cmdline-tools\latest\bin\sdkmanager.bat --licenses [+9284 ms] A crash report has been written to C:\Users\arunk\AppData\Local\Temp\flutter_tools.3a1d5c9e\flutter_01.log. [ +2 ms] This crash may already be reported. Check GitHub for similar crashes. [ +2 ms] https://github.com/flutter/flutter/issues?q=is%3Aissue+FileSystemException%3A+writeFrom+failed%2C+path+%3D+%27C%3A%5CUsers%5Carunk%5CVideos%5Cbuji%5Candroid%5Capp%5Csrc%5Cmain%5Cjava%5Cio%5Cflutter%5Cplugins%5CGeneratedPluginRegistrant.java%27+%28OS+Error%3A+Access+is+denied.%0D%0A%2C+errno+%3D+5%29 [ +6 ms] To report your crash to the Flutter team, first read the guide to filing a bug. [ +2 ms] https://flutter.dev/docs/resources/bug-reports [ +53 ms] Create a new GitHub issue by pasting this link into your browser and completing the issue template. Thank you! [ +92 ms] .metadata is malformed. [ +35 ms] .metadata project_type version is malformed. [ +25 ms] .metadata is malformed. [ +34 ms] .metadata version is malformed. [ +2 ms] .metadata is malformed. [ +1 ms] .metadata version is malformed. [ +9 ms] Attempting git.io shortener: https://github.com/flutter/flutter/issues/new?title=%5Btool_crash%5D+FileSystemException%3A+writeFrom+failed%2C+OS+Error%3A+Access+is+denied.%0D%0A%2C+errno+%3D+5&body=%23%23+Command%0A%60%60%60%0Aflutter+run+--verbose%0A%60%60%60%0A%0A%23%23+Steps+to+Reproduce%0A1.+...%0A2.+...%0A3.+...%0A%0A%23%23+Logs%0AFileSystemException%3A+writeFrom+failed%2C+OS+Error%3A+Access+is+denied.%0D%0A%2C+errno+%3D+5%0A%60%60%60%0A%230++++++_RandomAccessFile.writeFromSync+%28dart%3Aio%2Ffile_impl.dart%3A870%3A7%29%0A%231++++++_File.writeAsBytesSync+%28dart%3Aio%2Ffile_impl.dart%3A606%3A14%29%0A%232++++++_File.writeAsStringSync+%28dart%3Aio%2Ffile_impl.dart%3A628%3A5%29%0A%233++++++ForwardingFile.writeAsStringSync+%28package%3Afile%2Fsrc%2Fforwarding%2Fforwarding_file.dart%3A154%3A16%29%0A%234++++++ErrorHandlingFile.writeAsStringSync.%3Canonymous+closure%3E+%28package%3Aflutter_tools%2Fsrc%2Fbase%2Ferror_handling_file_system.dart%3A186%3A22%29%0A%235++++++_runSync+%28package%3Aflutter_tools%2Fsrc%2Fbase%2Ferror_handling_file_system.dart%3A351%3A14%29%0A%236++++++ErrorHandlingFile.writeAsStringSync+%28package%3Aflutter_tools%2Fsrc%2Fbase%2Ferror_handling_file_system.dart%3A185%3A5%29%0A%237++++++_renderTemplateToFile+%28package%3Aflutter_tools%2Fsrc%2Fplugins.dart%3A27%3A8%29%0A%238++++++_writeAndroidPluginRegistrant+%28package%3Aflutter_tools%2Fsrc%2Fplugins.dart%3A676%3A3%29%0A%239++++++injectPlugins+%28package%3Aflutter_tools%2Fsrc%2Fplugins.dart%3A1163%3A11%29%0A%2310+++++_rootRunUnary+%28dart%3Aasync%2Fzone.dart%3A1198%3A47%29%0A%2311+++++_CustomZone.runUnary+%28dart%3Aasync%2Fzone.dart%3A1100%3A19%29%0A%2312+++++_FutureListener.handleValue+%28dart%3Aasync%2Ffuture_impl.dart%3A143%3A18%29%0A%2313+++++Future._propagateToListeners.handleValueCallback+%28dart%3Aasync%2Ffuture_impl.dart%3A696%3A45%29%0A%2314+++++Future._propagateToListeners+%28dart%3Aasync%2Ffuture_impl.dart%3A725%3A32%29%0A%2315+++++Future._completeWithValue+%28dart%3Aasync%2Ffuture_impl.dart%3A529%3A5%29%0A%2316+++++_AsyncAwaitCompleter.complete+%28dart%3Aasync-patch%2Fasync_patch.dart%3A40%3A15%29%0A%2317+++++_completeOnAsyncReturn+%28dart%3Aasync-patch%2Fasync_patch.dart%3A311%3A13%29%0A%2318+++++findPlugins+%28package%3Aflutter_tools%2Fsrc%2Fplugins.dart%29%0A%2319+++++_rootRunUnary+%28dart%3Aasync%2Fzone.dart%3A1198%3A47%29%0A%2320+++++_CustomZone.runUnary+%28dart%3Aasync%2Fzone.dart%3A1100%3A19%29%0A%2321+++++_FutureListener.handleValue+%28dart%3Aasync%2Ffuture_impl.dart%3A143%3A18%29%0A%2322+++++Future._propagateToListeners.handleValueCallback+%28dart%3Aasync%2Ffuture_impl.dart%3A696%3A45%29%0A%2323+++++Future._propagateToListeners+%28dart%3Aasync%2Ffuture_impl.dart%3A725%3A32%29%0A%2324+++++Future._completeWithValue+%28dart%3Aasync%2Ffuture_impl.dart%3A529%3A5%29%0A%60%60%60%0A%60%60%60%0A%5B%E2%9C%93%5D+Flutter+%28Channel+beta%2C+1.21.0-9.2.pre%2C+on+Microsoft+Windows+%5BVersion+10.0.19041.450%5D%2C+locale+en-IN%29%0A++++%E2%80%A2+Flutter+version+1.21.0-9.2.pre+at+C%3A%5Csrc%5Cflutter%0A++++%E2%80%A2+Framework+revision+81a45ec2e5+%288+days+ago%29%2C+2020-08-27+14%3A14%3A33+-0700%0A++++%E2%80%A2+Engine+revision+20a9531835%0A++++%E2%80%A2+Dart+version+2.10.0+%28build+2.10.0-7.3.beta%29%0A%0A%5B%E2%9C%93%5D+Android+toolchain+-+develop+for+Android+devices+%28Android+SDK+version+29.0.3%29%0A++++%E2%80%A2+Android+SDK+at+C%3A%5CUsers%5Carunk%5CAppData%5CLocal%5CAndroid%5Csdk%0A++++%E2%80%A2+Platform+android-29%2C+build-tools+29.0.3%0A++++%E2%80%A2+Java+binary+at%3A+C%3A%5CProgram+Files%5CAndroid%5CAndroid+Studio%5Cjre%5Cbin%5Cjava%0A++++%E2%80%A2+Java+version+OpenJDK+Runtime+Environment+%28build+1.8.0_242-release-1644-b01%29%0D%0A++++%E2%80%A2+All+Android+licenses+accepted.%0A%0A%5B%E2%9C%93%5D+Chrome+-+develop+for+the+web%0A++++%E2%80%A2+Chrome+at+C%3A%5CProgram+Files+%28x86%29%5CGoogle%5CChrome%5CApplication%5Cchrome.exe%0A%0A%5B%E2%9C%93%5D+Android+Studio+%28version+4.0%29%0A++++%E2%80%A2+Android+Studio+at+C%3A%5CProgram+Files%5CAndroid%5CAndroid+Studio%0A++++%E2%80%A2+Flutter+plugin+version+48.1.2%0A++++%E2%80%A2+Dart+plugin+version+193.7361%0A++++%E2%80%A2+Java+version+OpenJDK+Runtime+Environment+%28build+1.8.0_242-release-1644-b01%29%0D%0A%0A%5B%E2%9C%93%5D+VS+Code+%28version+1.48.2%29%0A++++%E2%80%A2+VS+Code+at+C%3A%5CUsers%5Carunk%5CAppData%5CLocal%5CPrograms%5CMicrosoft+VS+Code%0A++++%E2%80%A2+Flutter+extension+version+3.14.0%0A%0A%5B%E2%9C%93%5D+Connected+device+%284+available%29%0A++++%E2%80%A2+Infinix+X625C+%28mobile%29+%E2%80%A2+0443031974142383+%E2%80%A2+android-arm64++%E2%80%A2+Android+9+%28API+28%29%0A++++%E2%80%A2+Web+Server+%28web%29+++++++%E2%80%A2+web-server+++++++%E2%80%A2+web-javascript+%E2%80%A2+Flutter+Tools%0A++++%E2%80%A2+Chrome+%28web%29+++++++++++%E2%80%A2+chrome+++++++++++%E2%80%A2+web-javascript+%E2%80%A2+Google+Chrome+84.0.4147.135%0A++++%E2%80%A2+Edge+%28web%29+++++++++++++%E2%80%A2+edge+++++++++++++%E2%80%A2+web-javascript+%E2%80%A2+Microsoft+Edge+85.0.564.44%0A%0A%E2%80%A2+No+issues+found%21%0A%0A%60%60%60%0A%0A%23%23+Flutter+Application+Metadata%0A%2A%2AType%2A%2A%3A+null%0A%2A%2AVersion%2A%2A%3A+1.0.0%2B1%0A%2A%2AMaterial%2A%2A%3A+true%0A%2A%2AAndroid+X%2A%2A%3A+false%0A%2A%2AModule%2A%2A%3A+false%0A%2A%2APlugin%2A%2A%3A+false%0A%2A%2AAndroid+package%2A%2A%3A+null%0A%2A%2AiOS+bundle+identifier%2A%2A%3A+null%0A%2A%2ACreation+channel%2A%2A%3A+null%0A%2A%2ACreation+framework+version%2A%2A%3A+null%0A%0A&labels=tool%2Csevere%3A+crash [+2746 ms] https://git.io/JU3DL [ +6 ms] ensureAnalyticsSent: 2ms [ +3 ms] Running shutdown hooks [ +2 ms] Shutdown hook priority 4 [ +94 ms] Shutdown hooks complete [ +95 ms] exiting with code 1 ```
hamdikahloun commented 4 years ago

@arunkumard001 I think you must change the flutter location folder from C:\src\flutter to %userprofile%\Documents\flutter or any other location don't require write permission and try again.

Don't forget to set the new Flutter folder path in your system environment variables.

christopherfujino commented 3 years ago

crash report from stable/2.5.1:

Thread 0 main threadFileSystemException: FileSystemException: Creation failed, path = 'C:\Users\<username>\Documents\flutter_demo\lib' (OS Error: The system cannot find the file specified.
, errno = 2)
at _Directory.createSync(directory_impl.dart:133)
at _File.createSync(file_impl.dart:270)
at ForwardingFile.createSync(forwarding_file.dart:23)
at ErrorHandlingFile.createSync.<anonymous closure>(error_handling_io.dart:286)
at _runSync(error_handling_io.dart:597)
at ErrorHandlingFile.createSync(error_handling_io.dart:285)
at Template.render.<anonymous closure>(template.dart:293)
at _LinkedHashMapMixin.forEach(compact_hash.dart:400)
at Template.render(template.dart:253)
at CreateBase.renderMerged(create_base.dart:429)
at <asynchronous gap>(async)
at CreateBase.generateApp(create_base.dart:440)
at <asynchronous gap>(async)
at CreateCommand.runCommand(create.dart:269)
at <asynchronous gap>(async)
at FlutterCommand.run.<anonymous closure>(flutter_command.dart:1125)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at CommandRunner.runCommand(command_runner.dart:209)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand.<anonymous closure>(flutter_command_runner.dart:288)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand(flutter_command_runner.dart:236)
at <asynchronous gap>(async)
at run.<anonymous closure>.<anonymous closure>(runner.dart:62)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at main(executable.dart:92)
at <asynchronous gap>(async)
iapicca commented 2 years ago

possibly related to

AniketMalik commented 2 years ago

Any solution ?

iapicca commented 2 years ago

@exaby73 since many issue are consolidated under this one, maybe could be worth the label crowd

exaby73 commented 2 years ago

@christopherfujino From a similar issue, @AniketMalik found the culprit to be Windows Defender blocking access to the Documents directory. Could this be related to this issue?

christopherfujino commented 2 years ago

@christopherfujino From a similar issue, @AniketMalik found the culprit to be Windows Defender blocking access to the Documents directory. Could this be related to this issue?

Ahh yes, that sounds very likely. I wish defender would leave us some breadcrumbs to know what happened...

exaby73 commented 2 years ago

Maybe the error message could be improved to add suggestions that the project should not be in the Documents directory? Not sure if that's a plausible one.

Many issues with this error are Flutter trying to find files in the Documents directory e.g. https://github.com/flutter/flutter/issues/95753. From what I've gathered in past issues errno = 2 is usually caused because of the Documents directory, and errno = 3 is caused when trying to access a file in another drive e.g. https://github.com/flutter/flutter/issues/98514.

bshanoj commented 1 year ago

Screenshot 2023-04-02 093246

This issue is not related to Flutter. Switch off "Controlled Folder Access" under Settings > Windows Security > Virus & threat protection > Virus & Threat Protection Settings -> Manage Settings > Controlled folder access -> Manage controlled folder access.