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

An error occurred when handling textDocument/completion #37016

Closed
itome opened this issue May 20, 2019 · 4 comments
Closed

An error occurred when handling textDocument/completion #37016

itome opened this issue May 20, 2019 · 4 comments
Assignees
Labels
analyzer-lsp Issues with analysis server's support of Language Server Protocol

Comments

@itome
Copy link

itome commented May 20, 2019

I'm using https://github.com/emacs-lsp/lsp-mode for client.
Bellow error occurred when sending textDocuemnt/completion.

An error occurred while handling textDocument/completion request
An error occurred while handling textDocument/completion request
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
#1      elementKindToCompletionItemKind (package:analysis_server/src/lsp/mapping.dart:154:31)
#2      toCompletionItem (package:analysis_server/src/lsp/mapping.dart:394:9)
#3      CompletionHandler._getItems.<anonymous closure> (package:analysis_server/src/lsp/handlers/handler_completion.dart:97:26)
#4      MappedListIterable.elementAt (dart:_internal/iterable.dart:414:29)
#5      ListIterable.toList (dart:_internal/iterable.dart:219:19)
#6      CompletionHandler._getItems (package:analysis_server/src/lsp/handlers/handler_completion.dart:105:12)
<asynchronous suspension>
#7      CompletionHandler.handle.<anonymous closure> (package:analysis_server/src/lsp/handlers/handler_completion.dart:65:41)
#8      ErrorOr.mapResult (package:analysis_server/lsp_protocol/protocol_special.dart:181:12)
#9      CompletionHandler.handle (package:analysis_server/src/lsp/handlers/handler_completion.dart:65:19)
<asynchronous suspension>
#10     MessageHandler.handleMessage (package:analysis_server/src/lsp/handlers/handlers.dart:84:12)
#11     ServerStateMessageHandler.handleMessage (package:analysis_server/src/lsp/handlers/handlers.dart:105:19)
<asynchronous suspension>
#12     LspAnalysisServer.handleMessage.<anonymous closure>.<anonymous closure> (package:analysis_server/src/lsp/lsp_analysis_server.dart:278:49)
<asynchronous suspension>
#13     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#14     LspAnalysisServer.handleMessage.<anonymous closure> (package:analysis_server/src/lsp/lsp_analysis_server.dart:273:50)
#15     _rootRun (dart:async/zone.dart:1124:13)
#16     _CustomZone.run (dart:async/zone.dart:1021:19)
#17     _runZoned (dart:async/zone.dart:1516:10)
#18     runZoned (dart:async/zone.dart:1500:12)
#19     LspAnalysisServer.handleMessage (package:analysis_server/src/lsp/lsp_analysis_server.dart:272:5)
#20     LspByteStreamServerChannel._readMessage.<anonymous closure> (package:analysis_server/src/lsp/channel/lsp_byte_stream_channel.dart:95:18)
#21     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#22     LspByteStreamServerChannel._readMessage (package:analysis_server/src/lsp/channel/lsp_byte_stream_channel.dart:91:47)
#23     LspByteStreamServerChannel.listen.<anonymous closure> (package:analysis_server/src/lsp/channel/lsp_byte_stream_channel.dart:61:24)
#24     _rootRunUnary (dart:async/zone.dart:1132:38)
#25     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#26     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#27     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#28     _DelayedData.perform (dart:async/stream_impl.dart:591:14)
#29     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:707:11)
#30     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:667:7)
#31     _rootRun (dart:async/zone.dart:1120:38)
#32     _CustomZone.run (dart:async/zone.dart:1021:19)
#33     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#34     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#35     _rootRun (dart:async/zone.dart:1124:13)
#36     _CustomZone.run (dart:async/zone.dart:1021:19)
#37     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#38     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#39     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#40     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#41     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#42     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

@natebosch natebosch added the analyzer-lsp Issues with analysis server's support of Language Server Protocol label May 20, 2019
@natebosch
Copy link
Member

cc @DanTup

@DanTup DanTup self-assigned this May 20, 2019
@DanTup
Copy link
Collaborator

DanTup commented May 21, 2019

Thanks for the report!

I've got a fix for review at https://dart-review.googlesource.com/c/sdk/+/103131/.

If you're using Dart (without Flutter), then the day after this lands you could test it with a nightly build. If you're using Flutter it may take a few days to roll into the master branch where you could test it there.

If you hit any other issues, please do let us know (and feel free to CC me directly on the issue if it seems LSP related). Thanks!

@itome
Copy link
Author

itome commented May 21, 2019

Thanks!
I'm personally flutter user but I'll try the nightly build after the fix is merged.
I leave this pull request open until I check the fix.

@DanTup
Copy link
Collaborator

DanTup commented May 21, 2019

The bot will probably close this when the issue lands, but if you think it's not fixed please do just shout and we can reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-lsp Issues with analysis server's support of Language Server Protocol
Projects
None yet
Development

No branches or pull requests

3 participants