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

NoSuchMethodError: The getter 'flow' was called on null #47526

Closed
yuchuan08 opened this issue Oct 21, 2021 · 5 comments
Closed

NoSuchMethodError: The getter 'flow' was called on null #47526

yuchuan08 opened this issue Oct 21, 2021 · 5 comments
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. needs-info We need additional information from the issue author (auto-closed after 14 days if no response) type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@yuchuan08
Copy link

Thank you for taking the time to file an issue!

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.0, on macOS 11.6 20G165 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Android Studio (version 4.2)

When I input flutter packages pub run build_runner build --delete-conflicting-outputs,the error is:

NoSuchMethodError: The getter 'flow' was called on null.
Receiver: null
Tried calling: flow
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
dart-lang/build#1 ResolverVisitor.startNullAwarePropertyAccess (package:analyzer/src/generated/resolver.dart:805:23)
dart-lang/build#2 ResolverVisitor.visitPropertyAccess (package:analyzer/src/generated/resolver.dart:1776:5)
dart-lang/build#3 PropertyAccessImpl.accept (package:analyzer/src/dart/ast/ast.dart:8390:49)
dart-lang/build#4 BinaryExpressionResolver._resolveEqual (package:analyzer/src/dart/resolver/binary_expression_resolver.dart:111:10)
dart-lang/build#5 BinaryExpressionResolver.resolve (package:analyzer/src/dart/resolver/binary_expression_resolver.dart:58:7)
dart-lang/build#6 ResolverVisitor.visitBinaryExpression (package:analyzer/src/generated/resolver.dart:944:31)
dart-lang/build#7 BinaryExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:956:49)
dart-lang/build#8 BinaryExpressionResolver._resolveLogicalOr (package:analyzer/src/dart/resolver/binary_expression_resolver.dart:224:11)
dart-lang/build#9 BinaryExpressionResolver.resolve (package:analyzer/src/dart/resolver/binary_expression_resolver.dart:63:7)
dart-lang/build#10 ResolverVisitor.visitBinaryExpression (package:analyzer/src/generated/resolver.dart:944:31)
dart-lang/build#11 BinaryExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:956:49)
dart-lang/build#12 ResolverVisitor.visitAssertInitializer (package:analyzer/src/generated/resolver.dart:903:21)
dart-lang/build#13 AssertInitializerImpl.accept (package:analyzer/src/dart/ast/ast.dart:519:49)
dart-lang/build#14 AstResolver.resolve (package:analyzer/src/summary2/ast_resolver.dart:85:10)
dart-lang/build#15 ConstructorInitializerResolver._initializers (package:analyzer/src/summary2/constructor_initializer_resolver.dart:68:20)
dart-lang/build#16 ConstructorInitializerResolver._constructor (package:analyzer/src/summary2/constructor_initializer_resolver.dart:54:5)
dart-lang/build#17 ConstructorInitializerResolver.resolve (package:analyzer/src/summary2/constructor_initializer_resolver.dart:31:11)
dart-lang/build#18 LibraryBuilder.resolveConstructors (package:analyzer/src/summary2/library_builder.dart:240:53)
dart-lang/build#19 Linker._resolveConstructors (package:analyzer/src/summary2/link.dart:210:15)
dart-lang/build#20 Linker._buildOutlines (package:analyzer/src/summary2/link.dart:95:5)
dart-lang/build#21 Linker.link (package:analyzer/src/summary2/link.dart:76:5)
dart-lang/build#22 link (package:analyzer/src/summary2/link.dart:32:10)
dart-lang/build#23 LibraryContext.load2.loadBundle (package:analyzer/src/dart/analysis/library_context.dart:215:24)
dart-lang/build#24 LibraryContext.load2.loadBundle. (package:analyzer/src/dart/analysis/library_context.dart:123:26)
dart-lang/build#25 SetMixin.forEach (dart:collection/set.dart:142:30)
dart-lang/build#26 LibraryContext.load2.loadBundle (package:analyzer/src/dart/analysis/library_context.dart:122:32)
dart-lang/build#27 LibraryContext.load2.loadBundle. (package:analyzer/src/dart/analysis/library_context.dart:123:26)
dart-lang/build#28 SetMixin.forEach (dart:collection/set.dart:142:30)
dart-lang/build#29 LibraryContext.load2.loadBundle (package:analyzer/src/dart/analysis/library_context.dart:122:32)
dart-lang/build#30 LibraryContext.load2. (package:analyzer/src/dart/analysis/library_context.dart:262:17)
dart-lang/build#31 PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:32:15)
dart-lang/build#32 LibraryContext.load2 (package:analyzer/src/dart/analysis/library_context.dart:260:12)
dart-lang/build#33 new LibraryContext (package:analyzer/src/dart/analysis/library_context.dart:77:5)
dart-lang/build#34 AnalysisDriver._createLibraryContext. (package:analyzer/src/dart/analysis/driver.dart:1538:27)
dart-lang/build#35 _rootRun (dart:async/zone.dart:1354:13)
dart-lang/build#36 _CustomZone.run (dart:async/zone.dart:1258:19)
dart-lang/build#37 _runZoned (dart:async/zone.dart:1788:10)
dart-lang/build#38 runZoned (dart:async/zone.dart:1710:10)
dart-lang/build#39 NullSafetyUnderstandingFlag.enableNullSafetyTypes (package:analyzer/dart/element/null_safety_understanding_flag.dart:42:12)
dart-lang/build#40 AnalysisDriver._createLibraryContext (package:analyzer/src/dart/analysis/driver.dart:1536:33)
dart-lang/build#41 AnalysisDriver._computeUnitElement. (package:analyzer/src/dart/analysis/driver.dart:1464:28)
dart-lang/build#42 PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:32:15)
dart-lang/build#43 AnalysisDriver._computeUnitElement (package:analyzer/src/dart/analysis/driver.dart:1462:20)
dart-lang/build#44 AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1020:34)
dart-lang/build#45 AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2013:24)

@jakemac53 jakemac53 transferred this issue from dart-lang/build Oct 21, 2021
@jakemac53 jakemac53 added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Oct 21, 2021
@jakemac53
Copy link
Contributor

Moved to the sdk as this looks like an analyzer issue

@yuchuan08
Copy link
Author

@jakemac53
Hello,change flutter stable 2.2.3,the error same。Can you help me solve this problem?

@srawlins
Copy link
Member

@yuchuan08 is the code which triggers this crash open source? Can you perhaps link us to the code which crashes, or perhaps create and paste a minimal reproduction which causes this crash?

@srawlins
Copy link
Member

Thanks for upgrading Flutter. Flutter 2.2.3 is still not super recent; flutter 2.5.x is available. You also might try pub upgrade to get the latest version of the analyzer package, which is where the crash is taking place.

@srawlins srawlins added the needs-info We need additional information from the issue author (auto-closed after 14 days if no response) label Oct 29, 2021
@srawlins
Copy link
Member

srawlins commented May 2, 2022

Please re-open if you see this problem again.

@srawlins srawlins closed this as completed May 2, 2022
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. needs-info We need additional information from the issue author (auto-closed after 14 days if no response) type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants