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

InconsistentAnalysisException in ExecutionDomainHandler.getSuggestions #34208

Closed
agirenko opened this issue Aug 21, 2018 · 4 comments
Closed
Assignees
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@agirenko
Copy link

agirenko commented Aug 21, 2018

Analyzer Feedback from IntelliJ

Version information

  • IDEA IU-182.3911.36
  • 2.0.0-dev.69.5
  • IU-182.3911.36, JRE 1.8.0_152-release-1248-b8x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.13.6 unknown, screens 2560x1440 Retina

Exception

Please append the contents of:
file:///private/var/folders/8g/pm17c65n2qv73xm62yjb7vhm0000gn/T/report.txt

Dart analysis server, SDK version 2.0.0-dev.69.5, server version 1.20.3, FATAL error: Failed to handle request: {id: 229, method: execution.getSuggestions, params: {code: original[10], offset: 11, contextFile: /Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart, contextOffset: 268, variables: [], expressions: []}, clientRequestTime: 1534855447483}
InconsistentAnalysisException: Requested result might be inconsistent with previously returned results

#0      AnalysisSessionImpl._checkConsistency (package:analyzer/src/dart/analysis/session.dart:160:7)
#1      AnalysisSessionImpl.getResolvedAst (package:analyzer/src/dart/analysis/session.dart:125:5)
#2      DartChangeBuilderImpl.createFileEditBuilder (package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart:58:42)
<asynchronous suspension>
#3      ChangeBuilderImpl.addFileEdit (package:analyzer_plugin/src/utilities/change_builder/change_builder_core.dart:68:41)
<asynchronous suspension>
#4      DartChangeBuilderImpl.addFileEdit (package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart:47:18)
#5      RuntimeCompletionComputer.compute (package:analysis_server/src/domains/execution/completion.dart:59:25)
<asynchronous suspension>
#6      ExecutionDomainHandler.getSuggestions (package:analysis_server/src/domain_execution.dart:79:63)
<asynchronous suspension>
Dart analysis server, SDK version 2.0.0-dev.69.5, server version 1.20.3, FATAL error: Failed to handle request: {id: 229, method: execution.getSuggestions, params: {code: original[10], offset: 11, contextFile: /Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart, contextOffset: 268, variables: [], expressions: []}, clientRequestTime: 1534855447483}
InconsistentAnalysisException: Requested result might be inconsistent with previously returned results

#0      AnalysisSessionImpl._checkConsistency (package:analyzer/src/dart/analysis/session.dart:160:7)
#1      AnalysisSessionImpl.getResolvedAst (package:analyzer/src/dart/analysis/session.dart:125:5)
#2      DartChangeBuilderImpl.createFileEditBuilder (package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart:58:42)
<asynchronous suspension>
#3      ChangeBuilderImpl.addFileEdit (package:analyzer_plugin/src/utilities/change_builder/change_builder_core.dart:68:41)
<asynchronous suspension>
#4      DartChangeBuilderImpl.addFileEdit (package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart:47:18)
#5      RuntimeCompletionComputer.compute (package:analysis_server/src/domains/execution/completion.dart:59:25)
<asynchronous suspension>
#6      ExecutionDomainHandler.getSuggestions (package:analysis_server/src/domain_execution.dart:79:63)
<asynchronous suspension>
#7      ExecutionDomainHandler.handleRequest (package:analysis_server/src/domain_execution.dart:97:9)
#8      AnalysisServer.handleRequest.<anonymous closure>.<anonymous closure> (package:analysis_server/src/analysis_server.dart:751:45)
#9      _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:210:15)
#10     AnalysisServer.handleRequest.<anonymous closure> (package:analysis_server/src/analysis_server.dart:747:50)
#11     _rootRun (dart:async/zone.dart:1124:13)
#12     _CustomZone.run (dart:async/zone.dart:1021:19)
#13     _runZoned (dart:async/zone.dart:1516:10)
#14     runZoned (dart:async/zone.dart:1500:12)
#15     AnalysisServer.handleRequest (package:analysis_server/src/analysis_server.dart:746:5)
#16     ByteStreamServerChannel._readRequest.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:174:16)
#17     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:210:15)
#18     ByteStreamServerChannel._readRequest (package:analysis_server/src/channel/byte_stream_channel.dart:165:47)
#19     ByteStreamServerChannel.listen.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:110:26)
#20     _rootRunUnary (dart:async/zone.dart:1132:38)
#21     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#22     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#23     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#24     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#25     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#26     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#27     _StringAdapterSink.add (dart:convert/string_conversion.dart:268:11)
#28     _LineSplitterSink._addLines (dart:convert/line_splitter.dart:154:13)
#29     _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:129:5)
#30     StringConversionSinkMixin.add (dart:convert/string_conversion.dart:189:5)
#31     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#32     _rootRunUnary (dart:async/zone.dart:1132:38)
#33     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#34     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#35     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#36     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#37     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)
#38     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)
#39     _StringAdapterSink.add (dart:convert/string_conversion.dart:268:11)
#40     _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:273:7)
#41     _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:348:20)
#42     _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341:5)
#43     _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86:18)
#44     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)
#45     _rootRunUnary (dart:async/zone.dart:1132:38)
#46     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#47     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#48     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#49     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#50     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#51     _StreamController._add (dart:async/stream_controller.dart:639:7)
#52     _StreamController.add (dart:async/stream_controller.dart:585:5)
#53     _Socket._onData (dart:io/runtime/binsocket_patch.dart:1714:41)
#54     _rootRunUnary (dart:async/zone.dart:1136:13)
#55     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#56     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#57     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#58     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)
#59     _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19)
#60     _StreamController._add (dart:async/stream_controller.dart:639:7)
#61     _StreamController.add (dart:async/stream_controller.dart:585:5)
#62     new _RawSocket.<anonymous closure> (dart:io/runtime/binsocket_patch.dart:1276:33)
#63     _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:819:14)
#64     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#65     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#66     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:113:13)
#67     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:166:5)
1534855444228 <= {"event":"analysis.errors","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","errors":[{"severity":"ERROR","type":"SYNTACTIC_ERROR","lo
1534855444252 <= {"id":"225","result":{"suggestions":[{"kind":"INVOCATION","relevance":1000,"completion":"HttpOverrides","selectionOffset":13,"selectionLength":0,"isDeprecated":false,"isPotential":fal
1534855444252 <= {"event":"analysis.highlights","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","regions":[{"type":"DIRECTIVE","offset":0,"length":17}
1534855444253 <= {"event":"analysis.navigation","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","regions":[{"offset":7,"length":9,"targets":[0]},{"off
1534855444253 <= {"event":"analysis.closingLabels","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","labels":[]}}
1534855444254 <= {"event":"analysis.outline","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATIO
1534855444254 <= {"event":"analysis.overrides","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","overrides":[]}}
1534855444280 <= {"event":"analysis.errors","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","errors":[]}}
1534855444281 <= {"event":"analysis.highlights","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","regions":[{"type":"DIRECTIVE","offset":0,"length":17}
1534855444282 <= {"event":"analysis.navigation","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","regions":[{"offset":7,"length":9,"targets":[0]},{"off
1534855444282 <= {"event":"analysis.closingLabels","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","labels":[]}}
1534855444283 <= {"event":"analysis.outline","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","kind":"LIBRARY","outline":{"element":{"kind":"COMPILATIO
1534855444283 <= {"event":"analysis.overrides","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","overrides":[]}}
1534855444285 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1534855444285 <= {"event":"analysis.implemented","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","classes":[],"members":[]}}
1534855445539 => {"id":"226","method":"edit.getAssists","params":{"file":"/dummy.dart","offset":8,"length":0},"clientRequestTime":1534855445539}
1534855445539 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1534855445541 <= {"id":"226","result":{"assists":[]}}
1534855445544 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1534855445544 <= {"event":"analysis.implemented","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","classes":[],"members":[]}}
1534855446928 => {"id":"227","method":"edit.getAssists","params":{"file":"/dummy.dart","offset":9,"length":0},"clientRequestTime":1534855446928}
1534855446933 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1534855446933 <= {"id":"227","result":{"assists":[]}}
1534855446934 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1534855446934 <= {"event":"analysis.implemented","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","classes":[],"members":[]}}
1534855447392 => {"id":"228","method":"execution.getSuggestions","params":{"code":"original[1]","offset":10,"contextFile":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dar
1534855447393 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1534855447483 => {"id":"229","method":"execution.getSuggestions","params":{"code":"original[10]","offset":11,"contextFile":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.da
1534855447513 <= {"event":"analysis.errors","params":{"file":"/Users/alex/d/learnprojs/learn_dart/UdemyDartBryanCairns/compression_gzip.dart","errors":[{"severity":"ERROR","type":"SYNTACTIC_ERROR","lo
1534855447519 <= {"event":"server.error","params":{"isFatal":true,"message":"Failed to handle request: {id: 229, method: execution.getSuggestions, params: {code: original[10], offset: 11, contextFile:
@vsmenon vsmenon added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-server labels Aug 21, 2018
@bwilkerson bwilkerson added this to the Dart2.1 milestone Aug 28, 2018
@bwilkerson bwilkerson added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) analyzer-untriaged labels Aug 28, 2018
@devoncarew devoncarew changed the title Got this error InconsistentAnalysisException: Requested result might be inconsistent with previously returned results Sep 4, 2018
@devoncarew
Copy link
Member

I'm not sure we should be reporting this error to the user:

InconsistentAnalysisException: Requested result might be inconsistent with previously returned results

instead of just trying to recover (re-running the request?) or passing a failure to the client, which could then choose to surface it to the user or re-run a request.

@devoncarew devoncarew removed this from the Dart2.1 milestone Sep 4, 2018
@bwilkerson
Copy link
Member

I don't think it's ever appropriate to display an exception to the user, but in this case I definitely think we should be recovering from it.

@stereotype441 stereotype441 changed the title InconsistentAnalysisException: Requested result might be inconsistent with previously returned results InconsistentAnalysisException in ExecutionDomainHandler.getSuggestions Oct 21, 2018
@stereotype441
Copy link
Member

Raising to P1 due to duplicate reports (see #35532).

@stereotype441 stereotype441 added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Jan 4, 2019
@bwilkerson
Copy link
Member

I believe that this was fixed by https://dart-review.googlesource.com/c/sdk/+/88222 (and I think that one of the duplicate issues was closed; I didn't think to search for other duplicates).

@bwilkerson bwilkerson self-assigned this Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-server area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

5 participants