Open mjablecnik opened 1 month ago
Summary: The user is experiencing an error during Dart analysis, where the "dart:async" library is missing. The error occurs despite restarting, cleaning the cache, updating packages, and upgrading the IDE. The user has provided their project repository, version information, and a detailed log of the error.
Try close IDE, purge analysis driver cache by doing mv ~/.dartServer ~/.dartServer.bak
and start IDE again.
If that helps then something is wrong with analysis driver cache got somehow corrupted and might be of interest to analyzer team.
@mraleph Your advice didn't work, but I discovered that downgrading to Flutter version 3.22.0 solved the issue.
Version where it works is:
martin at Martins-MacBook-Air startup_project >>> flutter --version
Flutter 3.22.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5dcb86f68f (5 months ago) • 2024-05-09 07:39:20 -0500
Engine • revision f6344b75dc
Tools • Dart 3.4.0 • DevTools 2.34.3
I created a specific branch in my project: https://github.com/mjablecnik/startup_project/tree/dart-analysis-issue where I had the problem if you will need it for test.
@scheglov
Hello, I have some issue with Dart analysis. Can you say me how can I fix it? It is appeared in this my project: https://github.com/mjablecnik/startup_project Restart, clean cache, update/upgrade packages or IDE doesn't work..
Here is my log from Dart analysis:
Dart analysis issue
Internal error: Invalid argument(s): Missing library: dart:async
Version information
Details
Internal error: Invalid argument(s): Missing library: dart:async Libraries: [dart:core] Root children: [dart:core, dart:async] Readers: [] Log: [removeLibraries][uriSet: {}][#0 LinkedElementFactory.removeLibraries (package:analyzer/src/summary2/linked_element_factory.dart:262:67)
1 LibraryContext.remove (package:analyzer/src/dart/analysis/library_context.dart:315:20)
2 AnalysisDriver._removePotentiallyAffectedLibraries (package:analyzer/src/dart/analysis/driver.dart:2037:22)
3 AnalysisDriver._applyPendingFileChanges (package:analyzer/src/dart/analysis/driver.dart:1510:7)
4 AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2411:16)