Skip to content

[web] FileSystemException: Cannot open file #45798

@wanzijinx

Description

@wanzijinx

Multiple dart.exe processes were started in the background When I run 'flutter run -d chrome', leading to an error:

FileSystemException: Cannot open file, path =
'C: \ Users \ chenwanjin \ AppData \ Local \ Temp \ scratch_spaceada79580-1272-11ea-a949-c46516304869 \ packages \ flutter \ src \ gestures \ arena.ddc.js' (OS Error: Another program is using this file, The process is inaccessible.
, errno = 32).

Here is my terminal log:

log 1
[  +17 ms] executing: [D:\install\flutter\] git -c log.showSignature=false log -n 1
--pretty=format:%H
[  +57 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] cf37c2cd07a1d3ba296efff2dc75e19ba65e1665
[        ] executing: [D:\install\flutter\] git describe --match v*.*.* --first-parent --long   
--tags
[  +36 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.12.13-0-gcf37c2cd0
[   +5 ms] executing: [D:\install\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
[  +38 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/dev
[        ] executing: [D:\install\flutter\] git ls-remote --get-url origin
[  +33 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +64 ms] executing: [D:\install\flutter\] git rev-parse --abbrev-ref HEAD
[  +34 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] dev
[  +79 ms] executing: D:\install\AndroidSDK\platform-tools\adb.exe devices -l
[  +40 ms] Exit code 0 from: D:\install\AndroidSDK\platform-tools\adb.exe devices -l
[        ] List of devices attached
[  +13 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. 
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping       
update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.      
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.        
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.        
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.    
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.   
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.   
[ +114 ms] Generating
D:\project\flutter_web\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +89 ms] Launching lib\main.dart on Chrome in debug mode...
[   +1 ms] Building application for the web...
[+6561 ms] Starting daemon...
[ +111 ms] Initializing inputs
[   +9 ms] Reading cached asset graph...
[ +140 ms] Reading cached asset graph completed, took 138ms

[ +183 ms] Checking for updates since last build...
[ +432 ms] Checking for updates since last build completed, took 432ms

[   +7 ms] Initializing inputs
[  +18 ms] Reading cached asset graph...
[   +4 ms] Reading cached asset graph completed, took 138ms
[        ] Checking for updates since last build...
[        ] Checking for updates since last build completed, took 432ms
[ +212 ms] Serving DevTools at http://127.0.0.1:49550

[ +705 ms] About to build [web]...
[   +6 ms] Running build...
[   +6 ms] Running build completed, took 63ms

[   +1 ms] Caching finalized dependency graph...
[   +4 ms] Caching finalized dependency graph completed, took 90ms

[  +12 ms] FileSystemException: Cannot open file, path =

'C:\Users\chenwanjin\AppData\Local\Temp\scratch_spaceada79580-1272-11ea-a949-c46516304869\packag           es\collection\src\canonicalized_map.ddc.js' (OS Error: 另一个程序正在使用此文件,进程
无法访问。
           , errno = 32)
[   +6 ms] #0      _File.open.<anonymous closure> (dart:io/file_impl.dart:366:9)
           #1      _rootRunUnary (dart:async/zone.dart:1134:38)
           #2      _CustomZone.runUnary (dart:async/zone.dart:1031:19)
           #3      _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
           #4      Future._propagateToListeners.handleValueCallback
           (dart:async/future_impl.dart:680:45)
           #5      Future._propagateToListeners (dart:async/future_impl.dart:709:32)
           #6      Future._completeWithValue (dart:async/future_impl.dart:524:5)
           #7      Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:554:7)           #8      _rootRun (dart:async/zone.dart:1126:13)
           #9      _CustomZone.run (dart:async/zone.dart:1023:19)
           #10     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
           #11     _CustomZone.bindCallbackGuarded.<anonymous closure>
           (dart:async/zone.dart:965:23)
           #12     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
           #13     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
           #14     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)  
           #15     _RawReceivePortImpl._handleMessage
           (dart:isolate-patch/isolate_patch.dart:175:5)

[  +31 ms] FileSystemException: Cannot open file, path =

'C:\Users\chenwanjin\AppData\Local\Temp\scratch_spaceada79580-1272-11ea-a949-c46516304869\packag           es\flutter\src\gestures\arena.ddc.js' (OS Error: 另一个程序正在使用此文件,进程无法访
问。
           , errno = 32)
[   +2 ms] #0      _File.open.<anonymous closure> (dart:io/file_impl.dart:366:9)
           #1      _rootRunUnary (dart:async/zone.dart:1134:38)
           #2      _CustomZone.runUnary (dart:async/zone.dart:1031:19)
           #3      _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
           #4      Future._propagateToListeners.handleValueCallback
           (dart:async/future_impl.dart:680:45)
           #5      Future._propagateToListeners (dart:async/future_impl.dart:709:32)
           #6      Future._completeWithValue (dart:async/future_impl.dart:524:5)
           #7      Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:554:7)           #8      _rootRun (dart:async/zone.dart:1126:13)
           #9      _CustomZone.run (dart:async/zone.dart:1023:19)
           #10     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
           #11     _CustomZone.bindCallbackGuarded.<anonymous closure>
           (dart:async/zone.dart:965:23)
           #12     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
           #13     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
           #14     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)  
           #15     _RawReceivePortImpl._handleMessage
           (dart:isolate-patch/isolate_patch.dart:175:5)

[  +18 ms] AssetNotFoundException: collection|lib/src/canonicalized_map.ddc.js
[   +9 ms] #0      bootstrapDdc
(package:build_web_compilers/src/dev_compiler_bootstrap.dart:147:34)
           <asynchronous suspension>
           #1      FlutterWebEntrypointBuilder.build
           (package:flutter_tools/src/build_runner/build_script.dart:232:11)
           #2      runBuilder.buildForInput (package:build/src/generate/run_builder.dart:55:21) 
           #3      MappedListIterable.elementAt (dart:_internal/iterable.dart:417:29)
           #4      ListIterator.moveNext (dart:_internal/iterable.dart:346:26)
           #5      Future.wait (dart:async/future.dart:393:26)
           #6      runBuilder.<anonymous closure>
           (package:build/src/generate/run_builder.dart:61:36)
           #7      _rootRun (dart:async/zone.dart:1126:13)
           #8      _CustomZone.run (dart:async/zone.dart:1023:19)
           #9      _runZoned (dart:async/zone.dart:1518:10)
           #10     runZoned (dart:async/zone.dart:1502:12)
           #11     scopeLogAsync (package:build/src/builder/logging.dart:22:3)
           #12     runBuilder (package:build/src/generate/run_builder.dart:61:9)
           #13     _SingleBuild._runForInput.<anonymous closure>.<anonymous closure>.<anonymous 
           closure> (package:build_runner_core/src/generate/build_impl.dart:478:19)
           #14     _NoOpBuilderActionTracker.trackStage
           (package:build_runner_core/src/generate/performance_tracker.dart:300:15)
           #15     _SingleBuild._runForInput.<anonymous closure>.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:476:23)
           <asynchronous suspension>
           #16     NoOpTimeTracker.track (package:timing/src/timing.dart:222:44)
           #17     _SingleBuild._runForInput.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:434:22)
           #18     Pool.withResource (package:pool/pool.dart:127:28)
           <asynchronous suspension>
           #19     _SingleBuild._runForInput
           (package:build_runner_core/src/generate/build_impl.dart:430:17)
           #20     _SingleBuild._runBuilder.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:378:38)
           #21     MappedIterator.moveNext (dart:_internal/iterable.dart:395:18)
           #22     Future.wait (dart:async/future.dart:393:26)
           #23     _SingleBuild._runBuilder
           (package:build_runner_core/src/generate/build_impl.dart:377:36)
           #24     _SingleBuild._runPhases.<anonymous closure>.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:323:20)
           <asynchronous suspension>
           #25     _NoOpBuildPerformanceTracker.trackBuildPhase
           (package:build_runner_core/src/generate/performance_tracker.dart:184:15)
           #26     _SingleBuild._runPhases.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:319:47)
           <asynchronous suspension>
           #27     NoOpTimeTracker.track (package:timing/src/timing.dart:222:44)
           #28     _SingleBuild._runPhases
           (package:build_runner_core/src/generate/build_impl.dart:313:32)
           #29     logTimedAsync (package:build_runner_core/src/logging/logging.dart:25:30)     
           #30     _SingleBuild._safeBuild.<anonymous closure>
           (package:build_runner_core/src/generate/build_impl.dart:270:26)
           #31     _rootRun (dart:async/zone.dart:1126:13)
           #32     _CustomZone.run (dart:async/zone.dart:1023:19)
           #33     _runZoned (dart:async/zone.dart:1518:10)
           #34     runZoned (dart:async/zone.dart:1502:12)
           #35     _SingleBuild._safeBuild
           (package:build_runner_core/src/generate/build_impl.dart:265:5)
           #36     _SingleBuild.run
           (package:build_runner_core/src/generate/build_impl.dart:212:24)
           #37     BuildImpl.run (package:build_runner_core/src/generate/build_impl.dart:97:56) 
           #38     BuildRunnerDaemonBuilder.build
           (package:build_runner/src/daemon/daemon_builder.dart:111:35)
           #39     Server._build.<anonymous closure>
           (package:build_daemon/src/server.dart:122:25)
           #40     Pool.withResource (package:pool/pool.dart:127:28)
           <asynchronous suspension>
           #41     Server._build (package:build_daemon/src/server.dart:119:13)
           #42     Server.listen.<anonymous closure>.<anonymous closure>
           (package:build_daemon/src/server.dart:85:17)
           <asynchronous suspension>
           #43     _rootRunUnary (dart:async/zone.dart:1134:38)
           #44     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
           #45     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
           #46     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)  
           #47     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:265:7)        
           #48     _SyncStreamControllerDispatch._sendData
           (dart:async/stream_controller.dart:766:19)
           #49     _StreamController._add (dart:async/stream_controller.dart:642:7)
           #50     _StreamController.add (dart:async/stream_controller.dart:588:5)
           #51     new WebSocketImpl.fromSocket.<anonymous closure>
           (package:web_socket_channel/src/copy/web_socket_impl.dart:719:21)
           #52     _rootRunUnary (dart:async/zone.dart:1134:38)
           #53     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
           #54     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
           #55     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)  
           #56     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:265:7)        
           #57     _SinkTransformerStreamSubscription._add
           (dart:async/stream_transformers.dart:70:11)
           #58     _EventSinkWrapper.add (dart:async/stream_transformers.dart:17:11)
           #59     _WebSocketProtocolTransformer._messageFrameEnd
           (package:web_socket_channel/src/copy/web_socket_impl.dart:316:22)
           #60     _WebSocketProtocolTransformer.add
           (package:web_socket_channel/src/copy/web_socket_impl.dart:214:46)
           #61     _SinkTransformerStreamSubscription._handleData
           (dart:async/stream_transformers.dart:122:24)
           #62     _rootRunUnary (dart:async/zone.dart:1134:38)
           #63     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
           #64     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
           #65     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)  
           #66     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:265:7)        
           #67     _SyncStreamControllerDispatch._sendData
           (dart:async/stream_controller.dart:766:19)
           #68     _StreamController._add (dart:async/stream_controller.dart:642:7)
           #69     _StreamController.add (dart:async/stream_controller.dart:588:5)
           #70     _Socket._onData (dart:io-patch/socket_patch.dart:1831:41)
           #71     _rootRunUnary (dart:async/zone.dart:1138:13)
           #72     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
           #73     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
           #74     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:338:11)  
           #75     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:265:7)        
           #76     _SyncStreamControllerDispatch._sendData
           (dart:async/stream_controller.dart:766:19)
           #77     _StreamController._add (dart:async/stream_controller.dart:642:7)
           #78     _StreamController.add (dart:async/stream_controller.dart:588:5)
           #79     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1379:33) 
           #80     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:899:14)  
           #81     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
           #82     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
           #83     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)  
           #84     _RawReceivePortImpl._handleMessage
           (dart:isolate-patch/isolate_patch.dart:175:5)

[  +55 ms] Failed after 172ms
[  +20 ms] Building application for the web... (completed in 8.6s)
[   +6 ms] "flutter run" took 8,959ms.
Failed to build application for the Web.

log 2
#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      _DwdsResidentWebRunner.run
(package:flutter_tools/src/build_runner/resident_web_runner.dart:659:7)
<asynchronous suspension>
#2      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:504:37)
<asynchronous suspension>
#3      FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:615:18)
#4      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:73:64)   
#5      _rootRunUnary (dart:async/zone.dart:1134:38)
#6      _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#7      _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#8      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)   
#9      Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#10     Future._completeWithValue (dart:async/future_impl.dart:524:5)
#11     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:32:15)
#12     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:290:13)
#13     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#14     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:73:64)   
#15     _rootRunUnary (dart:async/zone.dart:1134:38)
#16     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#17     _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#18     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)   
#19     Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#20     Future._completeWithValue (dart:async/future_impl.dart:524:5)
#21     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:32:15)
#22     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:290:13)
#23     IosProject.isSwift (package:flutter_tools/src/project.dart)
#24     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:73:64)   
#25     _rootRunUnary (dart:async/zone.dart:1134:38)
#26     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#27     _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#28     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)   
#29     Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#30     Future._completeWithValue (dart:async/future_impl.dart:524:5)
#31     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:554:7)
#32     _rootRun (dart:async/zone.dart:1126:13)
#33     _CustomZone.run (dart:async/zone.dart:1023:19)
#34     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#35     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)       
#36     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#37     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#38     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#39     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5) 

And my flutter doctor log:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, v1.12.13, on Microsoft Windows [Version 10.0.18362.476], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Chrome - develop for the web
[!] Android Studio (version 3.5)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Ultimate Edition (version 2019.3)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] Connected device (2 available)

! Doctor found issues in 2 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consoleplatform-webWeb applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions