Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error: Bad state: Expected existing element #56922

Open
ChaserVasya opened this issue Oct 20, 2024 · 1 comment
Open

Internal error: Bad state: Expected existing element #56922

ChaserVasya opened this issue Oct 20, 2024 · 1 comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@ChaserVasya
Copy link

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. (package:analyzer/src/summary2/bundle_reader.dart:2515:15)
#7 SummaryDataReader.readTypedList. (package:analyzer/src/summary2/data_reader.dart:144:18)
#8 new _List.generate (dart:core-patch/array.dart:113:28)
#9 SummaryDataReader.readTypedList (package:analyzer/src/summary2/data_reader.dart:143:12)
#10 ResolutionReader.readTypedList (package:analyzer/src/summary2/bundle_reader.dart:2188:20)
#11 ResolutionReader._readRecordType (package:analyzer/src/summary2/bundle_reader.dart:2512:23)
#12 ResolutionReader.readType (package:analyzer/src/summary2/bundle_reader.dart:2169:18)
#13 ResolutionReader.readRequiredType (package:analyzer/src/summary2/bundle_reader.dart:2111:12)
#14 ResolutionReader._readTypeList. (package:analyzer/src/summary2/bundle_reader.dart:2535:14)
#15 SummaryDataReader.readTypedList. (package:analyzer/src/summary2/data_reader.dart:144:18)
#16 new _List.generate (dart:core-patch/array.dart:113:28)
#17 SummaryDataReader.readTypedList (package:analyzer/src/summary2/data_reader.dart:143:12)
#18 ResolutionReader.readTypedList (package:analyzer/src/summary2/bundle_reader.dart:2188:20)
#19 ResolutionReader._readTypeList (package:analyzer/src/summary2/bundle_reader.dart:2534:12)
#20 ResolutionReader.readType (package:analyzer/src/summary2/bundle_reader.dart:2140:27)
#21 ResolutionReader.readRequiredType (package:analyzer/src/summary2/bundle_reader.dart:2111:12)
#22 ExtensionElementLinkedData._read (package:analyzer/src/summary2/bundle_reader.dart:399:33)
#23 ElementLinkedData.read (package:analyzer/src/summary2/bundle_reader.dart:257:5)
#24 ExtensionElementImpl.augmented (package:analyzer/src/dart/element/element.dart:2989:17)
#25 ExtensionsExtensions.havingMemberWithBaseName (package:analyzer/src/dart/resolver/applicable_extensions.dart:146:37)
#26 _ImportLibraryContainingExtension.compute (package:analysis_server/src/services/correction/dart/import_library.dart:494:10)
#27 FixProcessor._addFromProducers.compute (package:analysis_server/src/services/correction/fix_processor.dart:111:24)
#28 FixProcessor._addFromProducers (package:analysis_server/src/services/correction/fix_processor.dart:147:17)

#29 FixProcessor.compute (package:analysis_server/src/services/correction/fix_processor.dart:76:5)

#30 computeFixes (package:analysis_server/src/services/correction/fix_internal.dart:1812:8)

#31 EditGetFixesHandler._computeDartFixes (package:analysis_server/src/handler/legacy/edit_get_fixes.dart:192:21)

#32 EditGetFixesHandler.handle (package:analysis_server/src/handler/legacy/edit_get_fixes.dart:76:26)

#33 LegacyAnalysisServer.handleRequest.. (package:analysis_server/src/legacy_analysis_server.dart:576:11)

#34 OperationPerformanceImpl.runAsync (package:analyzer/src/util/performance/operation_performance.dart:174:14)

#35 LegacyAnalysisServer.handleRequest. (package:analysis_server/src/legacy_analysis_server.dart:557:7)

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....
@dart-github-bot
Copy link
Collaborator

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.

@dart-github-bot dart-github-bot added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Oct 20, 2024
@keertip keertip added analyzer-crash-report Issues which have been reported due to an analysis server crash P3 A lower priority bug or feature request and removed analyzer-crash-report Issues which have been reported due to an analysis server crash labels Oct 21, 2024
@lrhn lrhn removed the triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants