Open Mohammad-Safayet opened 2 months ago
## Dart analysis issue Internal error: Failed to handle request: analysis.setAnalysisRoots ## Version information - Dart SDK 3.5.2 - Dart IntelliJ 241.18808 - Android Studio Koala Feature Drop | 2024.1.2 - Windows 11 10.0 ## Details Internal error: Failed to handle request: analysis.setAnalysisRoots Null check operator used on a null value #0 _LintConfig._parseYaml.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:analyzer/src/lint/config.dart:161:48) #1 CastMap.forEach.<anonymous closure> (dart:_internal/cast.dart:286:8) #2 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:633:13) #3 CastMap.forEach (dart:_internal/cast.dart:285:13) #4 MapView.forEach (dart:collection/maps.dart:347:10) #5 _LintConfig._parseYaml.<anonymous closure>.<anonymous closure> (package:analyzer/src/lint/config.dart:155:54) #6 CastMap.forEach.<anonymous closure> (dart:_internal/cast.dart:286:8) #7 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:633:13) #8 CastMap.forEach (dart:_internal/cast.dart:285:13) #9 MapView.forEach (dart:collection/maps.dart:347:10) #10 _LintConfig._parseYaml.<anonymous closure> (package:analyzer/src/lint/config.dart:144:46) #11 _HashMap.forEach (dart:collection-patch/collection_patch.dart:153:15) #12 MapView.forEach (dart:collection/maps.dart:347:10) #13 _LintConfig._parseYaml (package:analyzer/src/lint/config.dart:117:16) #14 new LintConfig.parseMap (package:analyzer/src/lint/config.dart:38:62) #15 parseConfig (package:analyzer/src/lint/config.dart:15:25) #16 AnalysisOptionsImplExtensions.applyOptions (package:analyzer/src/analysis_options/apply_options.dart:229:18) #17 ContextBuilderImpl._createOptionsMap (package:analyzer/src/dart/analysis/context_builder.dart:210:15) #18 ContextBuilderImpl.createContext (package:analyzer/src/dart/analysis/context_builder.dart:135:15) #19 new AnalysisContextCollectionImpl (package:analyzer/src/dart/analysis/analysis_context_collection.dart:108:36) #20 ContextManagerImpl._createAnalysisContexts.performContextRebuildGuarded.performContextRebuild (package:analysis_server/src/context_manager.dart:549:40) <asynchronous suspension> #21 ContextManagerImpl._createAnalysisContexts.performContextRebuildGuarded (package:analysis_server/src/context_manager.dart:694:11) <asynchronous suspension> #22 _CancellingTaskQueue.queue.<anonymous closure> (package:analysis_server/src/context_manager.dart:978:15) <asynchronous suspension> #23 ContextManagerImpl.setRoots (package:analysis_server/src/context_manager.dart:364:5) <asynchronous suspension> #24 LegacyAnalysisServer.setAnalysisRoots (package:analysis_server/src/legacy_analysis_server.dart:793:9) <asynchronous suspension> #25 AnalysisSetAnalysisRootsHandler.handle (package:analysis_server/src/handler/legacy/analysis_set_analysis_roots.dart:46:7) <asynchronous suspension> #26 LegacyAnalysisServer.handleRequest.<anonymous closure>.<anonymous closure> (package:analysis_server/src/legacy_analysis_server.dart:577:11) <asynchronous suspension> #27 OperationPerformanceImpl.runAsync (package:analyzer/src/util/performance/operation_performance.dart:174:14) <asynchronous suspension> #28 LegacyAnalysisServer.handleRequest.<anonymous closure> (package:analysis_server/src/legacy_analysis_server.dart:558:7) <asynchronous suspension>
null
## Debug log
1726204726494 <= {"event":"analysis.errors","params":{"file":"file:///D:/Projects/cosconpro_app/lib/src/core/constants/app_themes.dart","errors":[{"severity":"WARNING","type":"STATIC_WARNING","locatio... 1726204726495 <= {"event":"flutter.outline","params":{"file":"file:///D:/Projects/cosconpro_app/lib/src/core/constants/app_themes.dart","outline":{"kind":"DART_ELEMENT","offset":0,"length":5231,"codeO... 1726204726847 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}} 1726204734607 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}} 1726204735068 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}} 1726204776071 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}} 1726204776072 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}} 1726204776072 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}} 1726204776072 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}} 1726204798416 => {"id":"28","method":"server.shutdown","clientRequestTime":1726204798416} 1726204798432 <= {"event":"analysis.flushResults","params":{"files":["file:///D:/Projects/cosconpro_app/analysis_options.yaml","file:///D:/Projects/cosconpro_app/android/app/src/debug/AndroidManifest.... 1726204798437 <= {"id":"28"} 1726204798444 started analysis server: C:\Users\Dell\fvm\versions\stable\bin\cache\dart-sdk\bin\dart.exe language-server --client-id=Android-Studio --client-version=AI-241.18034.62 --protocol=analyzer 1726204798716 <= {"event":"server.connected","params":{"version":"1.38.0","pid":10636}} 1726204798727 <= {"id":"0","result":{"version":"1.38.0"}} 1726204798727 => {"id":"1","method":"server.setSubscriptions","params":{"subscriptions":["STATUS"]},"clientRequestTime":1726204798448} 1726204798727 => {"id":"2","method":"analysis.updateOptions","params":{"options":{"enableAsync":true,"enableDeferredLoading":true,"enableEnums":true,"enableNullAwareOperators":true,"generateDart2jsHin... 1726204798727 => {"id":"3","method":"server.setClientCapabilities","params":{"requests":["openUrlRequest","showMessageRequest"],"supportsUris":true},"clientRequestTime":1726204798448} 1726204798727 => {"id":"4","method":"flutter.setSubscriptions","params":{"subscriptions":{"OUTLINE":["file:///D:/Projects/cosconpro_app/lib/src/features/shared/base/base_view.dart","file:///D:/Project... 1726204798742 <= {"id":"1"} 1726204798742 <= {"id":"2"} 1726204798744 <= {"id":"3"} 1726204798746 <= {"id":"4"} 1726204800577 => {"id":"5","method":"analysis.setAnalysisRoots","params":{"included":["file:///D:/Projects/cosconpro_app"],"excluded":["file:///D:/Projects/cosconpro_app/.idea","file:///D:/Projects/co... 1726204800577 => {"id":"6","method":"analysis.setPriorityFiles","params":{"files":["file:///D:/Projects/cosconpro_app/pubspec.yaml"]},"clientRequestTime":1726204800577} 1726204800577 => {"id":"7","method":"analysis.setSubscriptions","params":{"subscriptions":{"CLOSING_LABELS":["file:///D:/Projects/cosconpro_app/pubspec.yaml"],"OVERRIDES":["file:///D:/Projects/cosconp... 1726204800612 <= {"id":"6"} 1726204800614 <= {"id":"7"} 1726204801058 <= {"event":"server.error","params":{"isFatal":true,"message":"Internal error: Failed to handle request: analysis.setAnalysisRoots\nNull check operator used on a null value\n#0 _Lin...
Updating last version not compatible with flutter (Android studio IDE)
null
1726204726494 <= {"event":"analysis.errors","params":{"file":"file:///D:/Projects/cosconpro_app/lib/src/core/constants/app_themes.dart","errors":[{"severity":"WARNING","type":"STATIC_WARNING","locatio... 1726204726495 <= {"event":"flutter.outline","params":{"file":"file:///D:/Projects/cosconpro_app/lib/src/core/constants/app_themes.dart","outline":{"kind":"DART_ELEMENT","offset":0,"length":5231,"codeO... 1726204726847 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}} 1726204734607 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}} 1726204735068 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}} 1726204776071 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}} 1726204776072 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}} 1726204776072 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}} 1726204776072 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}} 1726204798416 => {"id":"28","method":"server.shutdown","clientRequestTime":1726204798416} 1726204798432 <= {"event":"analysis.flushResults","params":{"files":["file:///D:/Projects/cosconpro_app/analysis_options.yaml","file:///D:/Projects/cosconpro_app/android/app/src/debug/AndroidManifest.... 1726204798437 <= {"id":"28"} 1726204798444 started analysis server: C:\Users\Dell\fvm\versions\stable\bin\cache\dart-sdk\bin\dart.exe language-server --client-id=Android-Studio --client-version=AI-241.18034.62 --protocol=analyzer 1726204798716 <= {"event":"server.connected","params":{"version":"1.38.0","pid":10636}} 1726204798727 <= {"id":"0","result":{"version":"1.38.0"}} 1726204798727 => {"id":"1","method":"server.setSubscriptions","params":{"subscriptions":["STATUS"]},"clientRequestTime":1726204798448} 1726204798727 => {"id":"2","method":"analysis.updateOptions","params":{"options":{"enableAsync":true,"enableDeferredLoading":true,"enableEnums":true,"enableNullAwareOperators":true,"generateDart2jsHin... 1726204798727 => {"id":"3","method":"server.setClientCapabilities","params":{"requests":["openUrlRequest","showMessageRequest"],"supportsUris":true},"clientRequestTime":1726204798448} 1726204798727 => {"id":"4","method":"flutter.setSubscriptions","params":{"subscriptions":{"OUTLINE":["file:///D:/Projects/cosconpro_app/lib/src/features/shared/base/base_view.dart","file:///D:/Project... 1726204798742 <= {"id":"1"} 1726204798742 <= {"id":"2"} 1726204798744 <= {"id":"3"} 1726204798746 <= {"id":"4"} 1726204800577 => {"id":"5","method":"analysis.setAnalysisRoots","params":{"included":["file:///D:/Projects/cosconpro_app"],"excluded":["file:///D:/Projects/cosconpro_app/.idea","file:///D:/Projects/co... 1726204800577 => {"id":"6","method":"analysis.setPriorityFiles","params":{"files":["file:///D:/Projects/cosconpro_app/pubspec.yaml"]},"clientRequestTime":1726204800577} 1726204800577 => {"id":"7","method":"analysis.setSubscriptions","params":{"subscriptions":{"CLOSING_LABELS":["file:///D:/Projects/cosconpro_app/pubspec.yaml"],"OVERRIDES":["file:///D:/Projects/cosconp... 1726204800612 <= {"id":"6"} 1726204800614 <= {"id":"7"} 1726204801058 <= {"event":"server.error","params":{"isFatal":true,"message":"Internal error: Failed to handle request: analysis.setAnalysisRoots\nNull check operator used on a null value\n#0 _Lin...