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 migrate exception #45406

Closed
dmitrymozheyko opened this issue Mar 22, 2021 · 4 comments
Closed

dart migrate exception #45406

dmitrymozheyko opened this issue Mar 22, 2021 · 4 comments
Labels
area-migration (deprecated) Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool). P2 A bug or feature request we're likely to work on

Comments

@dmitrymozheyko
Copy link

SDK version (2.12.2)

`NoSuchMethodError: The getter 'node' was called on null.
Receiver: null
Tried calling: node at offset 3064 in /Users/dm/work/sit-co.ru/shattecustomermobile/sources/shatte_customer/lib/bloc_gallery/gallery.dart (ShatteApp?.logoImage)

#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5)
#1 EdgeBuilder._handlePropertyAccess (package:nnbd_migration/src/edge_builder.dart:3014:47)
#2 EdgeBuilder.visitPropertyAccess (package:nnbd_migration/src/edge_builder.dart:1451:12)
#3 PropertyAccessImpl.accept (package:analyzer/src/dart/ast/ast.dart:8448:49)
#4 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2207:24)
#5 EdgeBuilder._handleAssignment (package:nnbd_migration/src/edge_builder.dart:2329:20)
#6 EdgeBuilder._handleInvocationArguments (package:nnbd_migration/src/edge_builder.dart:2934:7)
#7 EdgeBuilder.visitInstanceCreationExpression (package:nnbd_migration/src/edge_builder.dart:1154:5)
#8 InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:6130:15)
#9 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2207:24)
#10 EdgeBuilder._handleAssignment (package:nnbd_migration/src/edge_builder.dart:2329:20)
#11 EdgeBuilder._handleInvocationArguments (package:nnbd_migration/src/edge_builder.dart:2934:7)
#12 EdgeBuilder.visitInstanceCreationExpression (package:nnbd_migration/src/edge_builder.dart:1154:5)
#13 InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:6130:15)
#14 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2207:24)
#15 EdgeBuilder._handleAssignment (package:nnbd_migration/src/edge_builder.dart:2329:20)
#16 EdgeBuilder.visitReturnStatement (package:nnbd_migration/src/edge_builder.dart:1498:7)
#17 ReturnStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:8617:49)
#18 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2207:24)
#19 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1340:9)
#20 GeneralizingAstVisitor.visitStatement (package:analyzer/dart/ast/visitor.dart:517:39)
#21 GeneralizingAstVisitor.visitBlock (package:analyzer/dart/ast/visitor.dart:165:31)
#22 BlockImpl.accept (package:analyzer/src/dart/ast/ast.dart:1083:49)
#23 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2207:24)
#24 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1340:9)
#25 GeneralizingAstVisitor.visitFunctionBody (package:analyzer/dart/ast/visitor.dart:324:45)
#26 GeneralizingAstVisitor.visitBlockFunctionBody (package:analyzer/dart/ast/visitor.dart:168:55)
#27 BlockFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:1038:49)
#28 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2207:24)
#29 EdgeBuilder._handleExecutableDeclaration (package:nnbd_migration/src/edge_builder.dart:2488:7)
#30 EdgeBuilder.visitMethodDeclaration (package:nnbd_migration/src/edge_builder.dart:1243:5)
#31 MethodDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:7033:49)
#32 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2207:24)
#33 EdgeBuilder._dispatchList (package:nnbd_migration/src/edge_builder.dart:2229:7)
#34 EdgeBuilder.visitClassOrMixinOrExtensionDeclaration (package:nnbd_migration/src/edge_builder.dart:607:7)
#35 EdgeBuilder.visitClassDeclaration (package:nnbd_migration/src/edge_builder.dart:574:5)
#36 ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:1536:49)
#37 EdgeBuilder._dispatch (package:nnbd_migration/src/edge_builder.dart:2207:24)
#38 EdgeBuilder.visitNode (package:nnbd_migration/src/edge_builder.dart:1340:9)
#39 GeneralizingAstVisitor.visitCompilationUnit (package:analyzer/dart/ast/visitor.dart:202:51)
#40 CompletenessTracker.visitCompilationUnit. (package:nnbd_migration/src/utilities/completeness_tracker.dart:52:24)
#41 PermissiveModeVisitor.reportExceptionsIfPermissive (package:nnbd_migration/src/utilities/permissive_mode.dart:26:24)
#42 CompletenessTracker.visitCompilationUnit (package:nnbd_migration/src/utilities/completeness_tracker.dart:43:5)
#43 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2134:49)
#44 NullabilityMigrationImpl.processInput (package:nnbd_migration/src/nullability_migration_impl.dart:244:12)
#45 NonNullableFix.processUnit (package:nnbd_migration/src/front_end/non_nullable_fix.dart:164:15)
#46 _FixCodeProcessor.runLaterPhases. (package:nnbd_migration/migration_cli.dart:1154:19)
#47 _FixCodeProcessor.runLaterPhases. (package:nnbd_migration/migration_cli.dart:1152:28)
#48 _FixCodeProcessor.processResources (package:nnbd_migration/migration_cli.dart:1081:30)

#49 _FixCodeProcessor.runLaterPhases (package:nnbd_migration/migration_cli.dart:1152:5)

#50 MigrationCliRunner.run (package:nnbd_migration/migration_cli.dart:749:24)

#51 MigrateCommand.run (package:nnbd_migration/migration_cli.dart:185:7)

#52 CommandRunner.runCommand (package:args/command_runner.dart:196:13)

#53 DartdevRunner.runCommand (package:dartdev/dartdev.dart:199:18)

#54 runDartdev (package:dartdev/dartdev.dart:53:16)

#55 main (file:///b/s/w/ir/cache/builder/sdk/pkg/dartdev/bin/dartdev.dart:11:3)
`

Code in this line is

static final Widget logoImage = Image.asset('assets/images/shatte-logo.png', fit: BoxFit.cover, height: 32);

@lrhn lrhn added area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. area-migration (deprecated) Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool). and removed area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Mar 22, 2021
@stereotype441
Copy link
Member

@dmitrymozheyko thanks for the report! Are you able to make progress by running the tool with the command-line argument --ignore-exceptions?

@dmitrymozheyko
Copy link
Author

@dmitrymozheyko thanks for the report! Are you able to make progress by running the tool with the command-line argument --ignore-exceptions?

I removed ? sign after class names in static members calls and migration completes succcesfully

@stereotype441
Copy link
Member

@dmitrymozheyko thanks for the report! Are you able to make progress by running the tool with the command-line argument --ignore-exceptions?

I removed ? sign after class names in static members calls and migration completes succcesfully

Thanks! That's a valuable clue.

@stereotype441 stereotype441 added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Mar 22, 2021
@stereotype441 stereotype441 added P2 A bug or feature request we're likely to work on and removed P1 A high priority bug; for example, a single project is unusable or has many test failures labels Aug 4, 2021
@stereotype441
Copy link
Member

As of 1c7fe71, the null safety migration tool has been removed from active development and retired. No further work on the tool is planned.

If you still need help, or you believe this issue has been closed in error, please feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-migration (deprecated) Deprecated: this label is no longer actively used (was: issues with the `dart migrate` tool). P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

3 participants