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

VSCode/Dart Code: NoSuchMethodError: The getter 'fullName' was called on null. #33859

Closed
chances opened this Issue Jul 14, 2018 · 3 comments

Comments

Projects
None yet
5 participants
@chances
Copy link

chances commented Jul 14, 2018

Exception from analysis server (running from VSCode / Dart Code)

What I was doing

I had just reloaded the VSCode window using the Reload Window command with a Flutter project opened.

Request

While responding to request: analysis.updateContent

Versions

  • Dart SDK 2.0.0-edge.af1436931b93e755d38223c487d33a0a1f5eadf5
  • Visual Studio Code 1.25.1
  • Dart Code 2.15.0

Analyzer Info

The analyzer was launched using the arguments:

/home/chances/bin/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot
--client-id=Dart-Code.dart-code
--client-version=2.15.0

Exception

NoSuchMethodError: The getter 'fullName' was called on null.
Receiver: null
Tried calling: fullName

#0      Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)
#1      FileSystemState.hasUri (package:analyzer/src/dart/analysis/file_state.dart:894)
#2      AnalysisDriver.addFile (package:analyzer/src/dart/analysis/driver.dart:542)
#3      AnalysisServer.updateContent.<anonymous closure> (package:analysis_server/src/analysis_server.dart:1037)
#4      _HashVMBase&MapMixin&&_LinkedHashMapMixin.forEach (dart:collection-patch/dart:collection/compact_hash.dart:363)
#5      AnalysisServer.updateContent (package:analysis_server/src/analysis_server.dart:998)
#6      AnalysisDomainHandler.updateContent (package:analysis_server/src/domain_analysis.dart:399)
#7      AnalysisDomainHandler.handleRequest (package:analysis_server/src/domain_analysis.dart:273)
#8      AnalysisServer.handleRequest.<anonymous closure>.<anonymous closure> (package:analysis_server/src/analysis_server.dart:722)
#9      _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:210)
#10     AnalysisServer.handleRequest.<anonymous closure> (package:analysis_server/src/analysis_server.dart:718)
#11     _rootRun (dart:async/zone.dart:1126)
#12     _CustomZone.run (dart:async/zone.dart:1023)
#13     runZoned (dart:async/zone.dart:1490)
#14     AnalysisServer.handleRequest (package:analysis_server/src/analysis_server.dart:717)
#15     ByteStreamServerChannel._readRequest.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:172)
#16     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:210)
#17     ByteStreamServerChannel._readRequest (package:analysis_server/src/channel/byte_stream_channel.dart:163)
#18     ByteStreamServerChannel.listen.<anonymous closure> (package:analysis_server/src/channel/byte_stream_channel.dart:108)
#19     _rootRunUnary (dart:async/zone.dart:1134)
#20     _CustomZone.runUnary (dart:async/zone.dart:1031)
#21     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933)
#22     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#23     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#24     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68)
#25     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15)
#26     _StringAdapterSink.add (dart:convert/string_conversion.dart:268)
#27     _LineSplitterSink._addLines (dart:convert/line_splitter.dart:154)
#28     _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:129)
#29     StringConversionSinkMixin.add (dart:convert/string_conversion.dart:189)
#30     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120)
#31     _rootRunUnary (dart:async/zone.dart:1134)
#32     _CustomZone.runUnary (dart:async/zone.dart:1031)
#33     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933)
#34     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#35     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#36     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68)
#37     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15)
#38     _StringAdapterSink.add (dart:convert/string_conversion.dart:268)
#39     _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:273)
#40     _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:348)
#41     _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341)
#42     _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86)
#43     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120)
#44     _rootRunUnary (dart:async/zone.dart:1134)
#45     _CustomZone.runUnary (dart:async/zone.dart:1031)
#46     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933)
#47     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#48     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#49     _StreamController&&_SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:763)
#50     _StreamController._add (dart:async/stream_controller.dart:639)
#51     _StreamController.add (dart:async/stream_controller.dart:585)
#52     _Socket._onData (dart:io-patch/socket_patch.dart:1672)
#53     _rootRunUnary (dart:async/zone.dart:1138)
#54     _CustomZone.runUnary (dart:async/zone.dart:1031)
#55     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933)
#56     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#57     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#58     _StreamController&&_SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:763)
#59     _StreamController._add (dart:async/stream_controller.dart:639)
#60     _StreamController.add (dart:async/stream_controller.dart:585)
#61     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1245)
#62     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:797)
#63     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#64     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#65     _runPendingImmediateCallback (dart:isolate-patch/dart:isolate/isolate_patch.dart:113)
#66     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:166)

Diagnostics requested after the error occurred are:

[
    {
        "name": "/home/chances/GitHub/flutter-app",
        "explicitFileCount": 0,
        "implicitFileCount": 0,
        "workItemQueueLength": 0,
        "cacheEntryExceptions": []
    }
]
@kankaristo

This comment has been minimized.

Copy link

kankaristo commented Jul 15, 2018

Seeing this as well. Versions:

  • Dart SDK 2.0.0-dev.67.0
  • Visual Studio Code - Insiders 1.26.0-insider
  • Dart Code 2.15.0
@kankaristo

This comment has been minimized.

Copy link

kankaristo commented Jul 15, 2018

Hmm, updated to Dart SDK 2.0.0-dev.68.0, and I'm no longer seeing this.

Now I'm getting a different error: "Wrong full snapshot version" from the Dart Analyzer.

EDIT:
Something else must have been wrong, now the error in this issue came back in 2.0.0-dev.68.0.

@bwilkerson bwilkerson added the type-bug label Aug 28, 2018

@bwilkerson bwilkerson added this to the Dart2.1 milestone Aug 28, 2018

@scheglov scheglov self-assigned this Sep 5, 2018

dart-bot pushed a commit that referenced this issue Sep 5, 2018

Safer FileSystemState.hasUri
SourceFactory.forUri2() can return null.

R=brianwilkerson@google.com

Bug: #33859
Bug: #33233
Change-Id: I34908cd9d04050cc2afcdc716c6bb68d4f177702
Reviewed-on: https://dart-review.googlesource.com/73242
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
@scheglov

This comment has been minimized.

Copy link
Contributor

scheglov commented Sep 5, 2018

I think https://dart-review.googlesource.com/c/sdk/+/73242 fixes this, at least the symptom.

@scheglov scheglov closed this Sep 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.