sdk
sdk copied to clipboard
Internal error: Bad state: Expected existing element
This error is threw very often with different files
Dart analysis issue
Internal error: Bad state: Expected existing element: root::package:CONFIDENTIAL_INFO/domain/models/schedule/schedule_calendar.dart::@unit::package:CONFIDENTIAL_INFO/domain/models/schedule/schedule_calendar.dart
Version information
- Dart SDK 3.5.1
- Dart IntelliJ 242.22855.32
- Android Studio Ladybug | 2024.2.1 Patch 1
- Mac OS X 15.0.1
Details
Internal error: Bad state: Expected existing element: root::package:CONFIDENTIAL_INFO/domain/models/schedule/schedule_calendar.dart::@unit::package:CONFIDENTIAL_INFO/domain/models/schedule/schedule_calendar.dart
#0 LinkedElementFactory.elementOfReference (package:analyzer/src/summary2/linked_element_factory.dart:225:7)
#1 LinkedElementFactory.elementOfReference (package:analyzer/src/summary2/linked_element_factory.dart:216:25)
#2 ResolutionReader._readRawElement (package:analyzer/src/summary2/bundle_reader.dart:2502:28)
#3 ResolutionReader.readElement (package:analyzer/src/summary2/bundle_reader.dart:2008:19)
#4 ResolutionReader.readType (package:analyzer/src/summary2/bundle_reader.dart:2149:21)
#5 ResolutionReader.readRequiredType (package:analyzer/src/summary2/bundle_reader.dart:2111:12)
#6 ResolutionReader._readRecordType.
null
Debug log
1729391019037 => {"id":"798","method":"edit.getFixes","params":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO/lib/ui/screens/client_creating/ui/widgets/tiles/...
1729391019038 <= {"event":"analysis.navigation","params":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO/lib/ui/screens/client_creating/ui/widgets/tiles/base_t...
1729391019039 <= {"event":"analysis.closingLabels","params":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO/lib/ui/screens/client_creating/ui/widgets/tiles/bas...
1729391019044 <= {"event":"analysis.outline","params":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO/lib/ui/screens/client_creating/ui/widgets/tiles/base_tile...
1729391019046 <= {"event":"analysis.overrides","params":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO/lib/ui/screens/client_creating/ui/widgets/tiles/base_ti...
1729391019058 => {"id":"799","method":"edit.getFixes","params":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO/lib/ui/screens/client_creating/ui/widgets/tiles/...
1729391019059 <= {"event":"flutter.outline","params":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO/lib/ui/screens/client_creating/ui/widgets/tiles/base_tile....
1729391019065 <= {"id":"798","result":{"fixes":[{"error":{"severity":"ERROR","type":"SYNTACTIC_ERROR","location":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO...
1729391019065 <= {"id":"799","result":{"fixes":[{"error":{"severity":"ERROR","type":"SYNTACTIC_ERROR","location":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO...
1729391019070 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1729391019070 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1729391019075 => {"id":"800","method":"edit.getFixes","params":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO/lib/ui/screens/client_creating/ui/widgets/tiles/...
1729391019080 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1729391019080 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1729391019092 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1729391019093 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1729391019094 <= {"id":"800","result":{"fixes":[{"error":{"severity":"ERROR","type":"SYNTACTIC_ERROR","location":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO...
1729391019111 <= {"event":"analysis.implemented","params":{"file":"file:///Users/MY_NAME/Documents/projects/CONFIDENTIAL_INFO/lib/ui/screens/client_creating/ui/widgets/tiles/base_...
1729391019114 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1729391019114 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1729391019119 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1729391019119 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1729391019123 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1729391019123 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1729391019126 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1729391019126 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1729391019130 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1729391019130 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1729391019137 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1729391019145 <= {"event":"server.error","params":{"isFatal":false,"message":"Internal error: Bad state: Expected existing element: root::package:CONFIDENTIAL_INFO/domain/models/schedule/schedule_calendar....
Summary: The user is experiencing an "Internal error: Bad state: Expected existing element" error during Dart analysis. The error occurs frequently with different files and appears to be related to the analysis of the schedule_calendar.dart file.