dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.09k stars 1.56k forks source link

FileSystemException while trying to open flutter sdk #34931

Closed smokytheangel0 closed 3 years ago

smokytheangel0 commented 5 years ago

Please review the below report for any information you do not wish to share and report to https://github.com/dart-lang/sdk/issues/new

Exception from analysis server (running from VSCode / Dart Code)

What I was doing

opening the flutter sdk to read how regular people write code

Versions

Analyzer Info

The analyzer was launched using the arguments:

C:\Users\Justice\Desktop\SDKs\flutter\bin\cache\dart-sdk\bin\snapshots\analysis_server.dart.snapshot
--client-id=Dart-Code.dart-code
--client-version=2.19.0

Exception

Could not initialize the library map from [C:\Users\Justice\Desktop\SDKs\flutter\bin\cache\dart-sdk\lib_internal\sdk_library_metadata\lib\libraries.dart, C:\Users\Justice\Desktop\SDKs\flutter\bin\cache\dart-sdk\lib_internal\libraries.dart]

FileSystemException(path=C:\Users\Justice\Desktop\SDKs\flutter\bin\cache\dart-sdk\lib\_internal\libraries.dart; message=Cannot open file)
#0      _PhysicalFile.readAsStringSync (package:analyzer/file_system/physical_file_system.dart:212:7)
#1      FolderBasedDartSdk.initialLibraryMap (package:analyzer/src/dart/sdk/sdk.dart:613:41)
#2      new FolderBasedDartSdk (package:analyzer/src/dart/sdk/sdk.dart:493:18)
#3      ContextBuilder.findSdk.<anonymous closure> (package:analyzer/src/context/builder.dart:393:36)
#4      _HashMap.putIfAbsent (dart:collection/runtime/libcollection_patch.dart:143:29)
#5      DartSdkManager.getSdk (package:analyzer/src/generated/sdk.dart:146:19)
#6      ContextBuilder.findSdk (package:analyzer/src/context/builder.dart:392:23)
#7      ContextBuilder.createSourceFactory (package:analyzer/src/context/builder.dart:260:19)
#8      ContextBuilder.buildDriver (package:analyzer/src/context/builder.dart:175:16)
#9      ServerContextManagerCallbacks.addAnalysisDriver (package:analysis_server/src/analysis_server.dart:1127:48)
#10     ContextManagerImpl._createContext (package:analysis_server/src/context_manager.dart:1107:19)
#11     ContextManagerImpl._createContexts (package:analysis_server/src/context_manager.dart:1147:16)
#12     ContextManagerImpl._createContexts (package:analysis_server/src/context_manager.dart:1155:13)
#13     ContextManagerImpl._createContexts (package:analysis_server/src/context_manager.dart:1155:13)
#14     ContextManagerImpl.setRoots (package:analysis_server/src/context_manager.dart:737:9)
#15     AnalysisServer.setAnalysisRoots (package:analysis_server/src/analysis_server.dart:819:22)
#16     AnalysisDomainHandler.setAnalysisRoots (package:analysis_server/src/domain_analysis.dart:385:14)
#17     AnalysisDomainHandler.handleRequest (package:analysis_server/src/domain_analysis.dart:299:16)
#18     AnalysisServer.handleRequest.<anonymous closure>.<anonymous closure> (package:analysis_server/src/analysis_server.dart:645:45)
#19     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#20     AnalysisServer.handleRequest.<anonymous closure> (package:analysis_server/src/analysis_server.dart:641:50)
#21     _rootRun (dart:async/zone.dart:1124:13)
#22     _CustomZone.run (dart:async/zone.dart:1021:19)
#23     _runZoned (dart:async/zone.dart:1516:10)
#24     runZoned (dart:async/zone.dart:1500:12)
#25     AnalysisServer.handleRequest (package:analysis_server/src/analysis_server.dart:640:5)
#26     ByteStreamServerChannel._readRequest.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:174:16)
#27     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#28     ByteStreamServerChannel._readRequest (package:analysis_server/src/channel/byte_stream_channel.dart:165:47)
#29     ByteStreamServerChannel.listen.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:110:26)
#30     _rootRunUnary (dart:async/zone.dart:1132:38)
#31     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#32     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#33     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#34     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#35     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#36     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#37     _StringAdapterSink.add (dart:convert/string_conversion.dart:268:11)
#38     _LineSplitterSink._addLines (dart:convert/line_splitter.dart:154:13)
#39     _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:129:5)
#40     StringConversionSinkMixin.add (dart:convert/string_conversion.dart:189:5)
#41     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#42     _rootRunUnary (dart:async/zone.dart:1132:38)
#43     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#44     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#45     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#46     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#47     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#48     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#49     _StringAdapterSink.add (dart:convert/string_conversion.dart:268:11)
#50     _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:273:7)
#51     _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:348:20)
#52     _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341:5)
#53     _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86:18)
#54     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#55     _rootRunUnary (dart:async/zone.dart:1132:38)
#56     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#57     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#58     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#59     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#60     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#61     _StreamController._add (dart:async/stream_controller.dart:639:7)
#62     _StreamController.add (dart:async/stream_controller.dart:585:5)
#63     _Socket._onData (dart:io/runtime/binsocket_patch.dart:1721:41)
#64     _rootRunUnary (dart:async/zone.dart:1136:13)
#65     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#66     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#67     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#68     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#69     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#70     _StreamController._add (dart:async/stream_controller.dart:639:7)
#71     _StreamController.add (dart:async/stream_controller.dart:585:5)
#72     new _RawSocket.<anonymous closure> (dart:io/runtime/binsocket_patch.dart:1283:33)
#73     _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:826:14)
#74     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#75     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#76     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#77     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

Diagnostics requested after the error occurred are:

[
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\packages\\flutter_test",
        "explicitFileCount": 34,
        "implicitFileCount": -34,
        "workItemQueueLength": 34,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\examples\\hello_world",
        "explicitFileCount": 3,
        "implicitFileCount": -3,
        "workItemQueueLength": 3,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\integration_tests\\ui",
        "explicitFileCount": 16,
        "implicitFileCount": -16,
        "workItemQueueLength": 16,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\integration_tests\\platform_interaction",
        "explicitFileCount": 4,
        "implicitFileCount": -4,
        "workItemQueueLength": 4,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter",
        "explicitFileCount": 0,
        "implicitFileCount": 0,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\examples\\platform_view",
        "explicitFileCount": 1,
        "implicitFileCount": -1,
        "workItemQueueLength": 1,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\packages\\flutter_localizations",
        "explicitFileCount": 12,
        "implicitFileCount": -12,
        "workItemQueueLength": 12,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\integration_tests\\android_views",
        "explicitFileCount": 3,
        "implicitFileCount": -3,
        "workItemQueueLength": 3,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\packages\\flutter_test\\test\\test_config\\project_root",
        "explicitFileCount": 1,
        "implicitFileCount": -1,
        "workItemQueueLength": 1,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\examples\\layers",
        "explicitFileCount": 46,
        "implicitFileCount": -46,
        "workItemQueueLength": 46,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\snippets",
        "explicitFileCount": 5,
        "implicitFileCount": -5,
        "workItemQueueLength": 5,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\devicelab",
        "explicitFileCount": 102,
        "implicitFileCount": -102,
        "workItemQueueLength": 102,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\tools\\vitool",
        "explicitFileCount": 3,
        "implicitFileCount": -3,
        "workItemQueueLength": 3,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\examples\\catalog",
        "explicitFileCount": 15,
        "implicitFileCount": -15,
        "workItemQueueLength": 15,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\integration_tests\\flavors",
        "explicitFileCount": 2,
        "implicitFileCount": -2,
        "workItemQueueLength": 2,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\manual_tests",
        "explicitFileCount": 14,
        "implicitFileCount": -14,
        "workItemQueueLength": 14,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\benchmarks\\microbenchmarks",
        "explicitFileCount": 6,
        "implicitFileCount": -6,
        "workItemQueueLength": 6,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\packages\\flutter_driver",
        "explicitFileCount": 26,
        "implicitFileCount": -26,
        "workItemQueueLength": 26,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\packages\\flutter",
        "explicitFileCount": 908,
        "implicitFileCount": -908,
        "workItemQueueLength": 908,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\bots",
        "explicitFileCount": 11,
        "implicitFileCount": -11,
        "workItemQueueLength": 11,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\integration_tests\\android_semantics_testing",
        "explicitFileCount": 13,
        "implicitFileCount": -13,
        "workItemQueueLength": 13,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\examples\\stocks",
        "explicitFileCount": 15,
        "implicitFileCount": -15,
        "workItemQueueLength": 15,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\packages\\flutter_goldens",
        "explicitFileCount": 2,
        "implicitFileCount": -2,
        "workItemQueueLength": 2,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\docs\\platform_integration",
        "explicitFileCount": 0,
        "implicitFileCount": 0,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\missing_dependency_tests",
        "explicitFileCount": 0,
        "implicitFileCount": 0,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\examples\\platform_channel",
        "explicitFileCount": 3,
        "implicitFileCount": -3,
        "workItemQueueLength": 3,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\integration_tests\\channels",
        "explicitFileCount": 6,
        "implicitFileCount": -6,
        "workItemQueueLength": 6,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\tools",
        "explicitFileCount": 9,
        "implicitFileCount": -9,
        "workItemQueueLength": 9,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\automated_tests",
        "explicitFileCount": 14,
        "implicitFileCount": -12,
        "workItemQueueLength": 13,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\examples\\platform_channel_swift",
        "explicitFileCount": 3,
        "implicitFileCount": -3,
        "workItemQueueLength": 3,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\examples\\flutter_view",
        "explicitFileCount": 1,
        "implicitFileCount": -1,
        "workItemQueueLength": 1,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\packages\\flutter_goldens_client",
        "explicitFileCount": 1,
        "implicitFileCount": -1,
        "workItemQueueLength": 1,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\integration_tests\\named_isolates",
        "explicitFileCount": 1,
        "implicitFileCount": -1,
        "workItemQueueLength": 1,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\benchmarks\\complex_layout",
        "explicitFileCount": 6,
        "implicitFileCount": -6,
        "workItemQueueLength": 6,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\examples\\flutter_gallery",
        "explicitFileCount": 107,
        "implicitFileCount": -107,
        "workItemQueueLength": 107,
        "cacheEntryExceptions": []
    },
    {
        "name": "C:\\Users\\Justice\\Desktop\\SDKs\\flutter\\dev\\integration_tests\\external_ui",
        "explicitFileCount": 2,
        "implicitFileCount": -2,
        "workItemQueueLength": 2,
        "cacheEntryExceptions": []
    }
]
srawlins commented 3 years ago

This has not been reported again since Flutter 0.10; please re-open if you see this in a recent version of Dart/Flutter.