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

Dart Analyzer Error In Flutter Using IntelliJ #35810

Closed
psycry opened this issue Jan 30, 2019 · 5 comments
Closed

Dart Analyzer Error In Flutter Using IntelliJ #35810

psycry opened this issue Jan 30, 2019 · 5 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.

Comments

@psycry
Copy link

psycry commented Jan 30, 2019

I've removed personal/app identifying information from the stack trace below, but randomly I'm getting this error in IntelliJ after updating flutter earlier today, reproducible on a mac using the beta branch (as well as dev) with the current IntelliJ flutter plugin (also updated today, if there is another board for that particular plugin feel free to move this to the correct queue or let me know where to submit for the plugin itself if you don't mantain it):

13:24 Dart Analyzer Error
Encountered a Dart Analysis Server error.
Open issue submission form?

It also seems to be doing auto-complete way slower than usual. It seems to have coincided with an upgrade and isn't consistent.

I also noticed I had to re-install dart/flutter lost the path during the upgrade and it took a few restarts to fix it though this could be unrelated.

It's happening fairly consistently and every time it does I have to restart intellij in order for the code completion to work again.

Analyzer Feedback from IntelliJ

Version information

  • IDEA IU-183.5429.30
  • 2.2.0-edge.ec86471ccc47a62df8b4009e1fb37c66ff9dc91b
  • IU-183.5429.30, JRE 1.8.0_152-release-1343-b26x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.1, screens 1920x1080, 1920x1080, 1680x1050 Retina

Exception

Dart analysis server, SDK version 2.2.0-edge.ec86471ccc47a62df8b4009e1fb37c66ff9dc91b, server version 1.21.1, error: Analysis failed: /Users/app/app/lib/pages/home_page.dart
Exception: Element not found in summary: package:flutter/src/widgets/ticker_provider.dart;package:flutter/src/widgets/ticker_provider.dart;int
#0      SummaryResynthesizer.getElement (package:analyzer/src/summary/resynthesize.dart:314:9)
#1      ElementHandle.actualElement (package:analyzer/src/dart/element/handle.dart:353:42)
#2      ClassElementHandle.actualElement (package:analyzer/src/dart/element/handle.dart:34:43)
#3      ClassElementHandle.type (package:analyzer/src/dart/element/handle.dart:113:29)
#4      _ReferenceInfo._buildType.<anonymous closure> (package:analyzer/src/summary/resynthesize.dart:1019:48)
#5      InterfaceTypeImpl.typeArguments (package:analyzer/src/dart/element/type.dart:1439:26)
#6      DeclarationResolver._setGenericFunctionType (package:analyzer/src/generated/declaration_resolver.dart:521:37)
#7      DeclarationResolver.visitVariableDeclarationList (package:analyzer/src/generated/declaration_resolver.dart:474:7)
#8      VariableDeclarationListImpl.accept (package:analyzer/src/dart/ast/ast.dart:11610:15)
#9      FieldDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4395:17)
#10     RecursiveAstVisitor.visitFieldDeclaration (package:analyzer/dart/ast/visitor.dart:835:10)
#11     DeclarationResolver.visitFieldDeclaration (package:analyzer/src/generated/declaration_resolver.dart:195:11)
#12     FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:4390:49)
#13     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8366:20)
#14     ClassDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1795:13)
#15     RecursiveAstVisitor.visitClassDeclaration (package:analyzer/dart/ast/visitor.dart:691:10)
#16     DeclarationResolver.visitClassDeclaration.<anonymous closure> (package:analyzer/src/generated/declaration_resolver.dart:87:13)
#17     DeclarationResolver._walk (package:analyzer/src/generated/declaration_resolver.dart:541:13)
#18     DeclarationResolver.visitClassDeclaration (package:analyzer/src/generated/declaration_resolver.dart:86:5)
#19     ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1765:49)
#20     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8366:20)
#21     CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2437:21)
#22     RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:715:10)
#23     CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2430:49)
#24     DeclarationResolver.resolve (package:analyzer/src/generated/declaration_resolver.dart:49:12)
#25     LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:597:31)
#26     LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:118:7)
#27     __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8)
#28     LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:117:11)
#29     LibraryAnalyzer.analyze.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:91:14)
#30     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#31     LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:90:43)
#32     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1431:63)
#33     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#34     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1409:20)
#35     AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1203:17)
<asynchronous suspension>
#36     AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2116:24)
<asynchronous suspension>
#37     AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2057:5)
#38     new AnalysisServer (package:analysis_server/src/analysis_server.dart:236:29)
#39     SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:79:26)
#40     StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18)
#41     Driver.startAnalysisServer.<anonymous closure> (package:analysis_server/src/server/driver.dart:519:21)
#42     _rootRun (dart:async/zone.dart:1124:13)
#43     _CustomZone.run (dart:async/zone.dart:1021:19)
#44     _runZoned (dart:async/zone.dart:1516:10)
#45     runZoned (dart:async/zone.dart:1463:12)
#46     Driver._captureExceptions (package:analysis_server/src/server/driver.dart:585:12)
#47     Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:517:7)
#48     Driver.start (package:analysis_server/src/server/driver.dart:414:7)
#49     main (file:///b/rr/tmpFYAHZv/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:12:11)
#50     _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#51     main (file:///b/rr/tmpFYAHZv/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:10:10)
#52     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#53     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

Dart analysis server, SDK version 2.2.0-edge.ec86471ccc47a62df8b4009e1fb37c66ff9dc91b, server version 1.21.1, error: Analysis failed: /Users/app/app/app/lib/pages/home_page.dart
Exception: Element not found in summary: package:flutter/src/widgets/ticker_provider.dart;package:flutter/src/widgets/ticker_provider.dart;int
#0 SummaryResynthesizer.getElement (package:analyzer/src/summary/resynthesize.dart:314:9)
#1 ElementHandle.actualElement (package:analyzer/src/dart/element/handle.dart:353:42)
#2 ClassElementHandle.actualElement (package:analyzer/src/dart/element/handle.dart:34:43)
#3 ClassElementHandle.type (package:analyzer/src/dart/element/handle.dart:113:29)
#4 _ReferenceInfo._buildType. (package:analyzer/src/summary/resynthesize.dart:1019:48)
#5 InterfaceTypeImpl.typeArguments (package:analyzer/src/dart/element/type.dart:1439:26)
#6 DeclarationResolver._setGenericFunctionType (package:analyzer/src/generated/declaration_resolver.dart:521:37)
#7 DeclarationResolver.visitVariableDeclarationList (package:analyzer/src/generated/declaration_resolver.dart:474:7)
#8 VariableDeclarationListImpl.accept (package:analyzer/src/dart/ast/ast.dart:11610:15)
#9 FieldDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4395:17)
#10 RecursiveAstVisitor.visitFieldDeclaration (package:analyzer/dart/ast/visitor.dart:835:10)
#11 DeclarationResolver.visitFieldDeclaration (package:analyzer/src/generated/declaration_resolver.dart:195:11)
#12 FieldDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:4390:49)
#13 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8366:20)
#14 ClassDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1795:13)
#15 RecursiveAstVisitor.visitClassDeclaration (package:analyzer/dart/ast/visitor.dart:691:10)
#16 DeclarationResolver.visitClassDeclaration. (package:analyzer/src/generated/declaration_resolver.dart:87:13)
#17 DeclarationResolver._walk (package:analyzer/src/generated/declaration_resolver.dart:541:13)
#18 DeclarationResolver.visitClassDeclaration (package:analyzer/src/generated/declaration_resolver.dart:86:5)
#19 ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1765:49)
#20 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:8366:20)
#21 CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2437:21)
#22 RecursiveAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:715:10)
#23 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2430:49)
#24 DeclarationResolver.resolve (package:analyzer/src/generated/declaration_resolver.dart:49:12)
#25 LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:597:31)
#26 LibraryAnalyzer.analyzeSync. (package:analyzer/src/dart/analysis/library_analyzer.dart:118:7)
#27 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.forEach (dart:collection/runtime/libcompact_hash.dart:367:8)
#28 LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:117:11)
#29 LibraryAnalyzer.analyze. (package:analyzer/src/dart/analysis/library_analyzer.dart:91:14)
#30 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
#31 LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:90:43)
#32 AnalysisDriver._computeAnalysisResult. (package:analyzer/src/dart/analysis/driver.dart:1431:63)
#33 PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
#34 AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1409:20)
#35 AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1203:17)

#36 AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2116:24)

#37 AnalysisDriverScheduler.start (package:analyzer/src/dart/analysis/driver.dart:2057:5)
#38 new AnalysisServer (package:analysis_server/src/analysis_server.dart:236:29)
#39 SocketServer.createAnalysisServer (package:analysis_server/src/socket_server.dart:79:26)
#40 StdioAnalysisServer.serveStdio (package:analysis_server/src/server/stdio_server.dart:37:18)
#41 Driver.startAnalysisServer. (package:analysis_server/src/server/driver.dart:519:21)
#42 _rootRun (dart:async/zone.dart:1124:13)
#43 _CustomZone.run (dart:async/zone.dart:1021:19)
#44 _runZoned (dart:async/zone.dart:1516:10)
#45 runZoned (dart:async/zone.dart:1463:12)
#46 Driver._captureExceptions (package:analysis_server/src/server/driver.dart:585:12)
#47 Driver.startAnalysisServer (package:analysis_server/src/server/driver.dart:517:7)
#48 Driver.start (package:analysis_server/src/server/driver.dart:414:7)
#49 main (file:///b/rr/tmpFYAHZv/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:12:11)
#50 _AsyncAwaitCompleter.start (dart:async/runtime/libasync_patch.dart:49:6)
#51 main (file:///b/rr/tmpFYAHZv/w/src/third_party/dart/pkg/analysis_server/bin/server.dart:10:10)
#52 _startIsolate. (dart:isolate/runtime/libisolate_patch.dart:287:32)
#53 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

1548872682421 => {"id":"52","method":"edit.getAssists","params":{"file":"/Users/app/app/app/lib/pages/home_page.dart","offset":152,"length":0},"clientRequestTime":1548872682421}
1548872682428 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1548872682475 <= {"id":"52","result":{"assists":[]}}
1548872682478 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1548872683071 => {"id":"53","method":"execution.mapUri","params":{"id":"0","file":"/Users/app/lib/main.dart"},"clientRequestTime":1548872683071}
1548872683073 <= {"id":"53","result":{"uri":"package:app/main.dart"}}
1548872683685 => {"id":"54","method":"analysis.updateContent","params":{"files":{"/Users/app/app/app/lib/pages/home_page.dart":{"type":"add","content":"part of app\n\nclass Ho
1548872683689 <= {"id":"54","result":{}}
1548872683689 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1548872683699 => {"id":"55","method":"edit.getAssists","params":{"file":"/Users/app/app/app/lib/pages/home_page.dart","offset":151,"length":0},"clientRequestTime":1548872683699}
1548872683748 <= {"id":"55","result":{"assists":[]}}
1548872683773 <= {"event":"server.error","params":{"isFatal":false,"message":"Analysis failed: /Users/app/app/app/lib/navigation_menu.dart","stackTrace":"Exception: Element not fo
1548872683776 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1548872685171 => {"id":"56","method":"analysis.updateContent","params":{"files":{"/Users/app/app/app/lib/pages/home_page.dart":{"type":"add","content":"part of app;\n\nclass Ho
1548872685174 <= {"id":"56","result":{}}
1548872685174 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1548872685184 => {"id":"57","method":"edit.getAssists","params":{"file":"/Users/app/app/app/lib/pages/home_page.dart","offset":120,"length":0},"clientRequestTime":1548872685184}
1548872685211 <= {"event":"server.error","params":{"isFatal":false,"message":"Analysis failed: /Users/app/app/app/lib/pages/home_page.dart","stackTrace":"Exception: Element not fo
1548872685230 <= {"id":"57","result":{"assists":[]}}
1548872685234 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1548872686262 => {"id":"58","method":"edit.getAssists","params":{"file":"/Users/app/app/app/lib/pages/home_page.dart","offset":136,"length":0},"clientRequestTime":1548872686262}
1548872686262 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1548872686283 <= {"id":"58","result":{"assists":[]}}
1548872686286 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1548872687465 => {"id":"59","method":"edit.organizeDirectives","params":{"file":"/Users/app/app/app/lib/pages/home_page.dart"},"clientRequestTime":1548872687465}
1548872687466 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1548872687487 <= {"id":"59","error":{"code":"FILE_NOT_ANALYZED","message":"File is not analyzed: /Users/app/app/app/lib/pages/home_page.dart."}}
1548872687489 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
1548872687502 <= {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
1548872687528 <= {"event":"server.error","params":{"isFatal":false,"message":"Analysis failed: /Users/app/app/app/lib/pages/home_page.dart","stackTrace":"Exception: Element not fo
@psycry psycry changed the title Dart Analyzer Error Dart Analyzer Error In Flutter Using IntelliJ Jan 30, 2019
@psycry
Copy link
Author

psycry commented Jan 30, 2019

I've also confirmed this is not isolated to ticker provider:

Dart analysis server, SDK version 2.2.0-edge.ec86471ccc47a62df8b4009e1fb37c66ff9dc91b, server version 1.21.1, error: Analysis failed: /Users/app/app/app/lib/pages/home_page.dart
Exception: Element not found in summary: package:flutter/src/animation/animation.dart;package:flutter/src/animation/animation.dart;AnimatedBuilde

@a-siva a-siva added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Jan 30, 2019
@kika
Copy link

kika commented Jan 31, 2019

@psycry Not that it's very helpful, but instead of restarting the whole nine yards, you can just restart the Analyzer. In Android Studio it's a small circular red icon in the upper left corner of Dart Analysis window.
I have tens of these exceptions per day :-(

@psycry
Copy link
Author

psycry commented Jan 31, 2019

Thanks ill try that instead, how long has it been doing this? I dont update religiously but it hasnt been that long.

Is there another bug following it? I couldnt find one so thats why i cut this one.

@stereotype441
Copy link
Member

Duplicate of #35620

@stereotype441 stereotype441 marked this as a duplicate of #35620 Jan 31, 2019
@kika
Copy link

kika commented Jan 31, 2019

@psycry it has been doing this for a couple of weeks already

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.
Projects
None yet
Development

No branches or pull requests

4 participants