AOT compilation failure on flutter application – Missing canonical name

The failure can be reproduced by running flutter build apk on the example repo here: https://github.com/IsaNascimento/retroJaguarErrorReplication. Flutter run works normally.

Flutter/Dart version:

flutter doctor -v
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale fr-FR)
    • Flutter version 0.8.2 at /Users/jaumard/flutter
    • Framework revision 5ab9e70727 (3 weeks ago), 2018-09-07 12:33:05 -0700
    • Engine revision 58a1894a1c
    • Dart version 2.1.0-dev.3.1.flutter-760a9690c2

Stack trace

compiler message: Unhandled exception:
Missing canonical name for Reference to #lib510::QueryParam::
#0      BinaryPrinter.writeReference (package:kernel/binary/ast_to_binary.dart:528:9)
#1      BinaryPrinter.visitConstructorInvocation (package:kernel/binary/ast_to_binary.dart:1136:5)
#2      ConstructorInvocation.accept (package:kernel/ast.dart:2934:36)
#3      BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
#4      LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
#5      BinaryPrinter.writeAnnotation (package:kernel/binary/ast_to_binary.dart:719:5)
#6      BinaryPrinter.writeAnnotationList (package:kernel/binary/ast_to_binary.dart:727:7)
#7      BinaryPrinter.writeVariableDeclaration (package:kernel/binary/ast_to_binary.dart:1566:5)
#8      List.forEach (dart:core/runtime/libgrowable_array.dart:275:8)
#9      BinaryPrinter.writeList (package:kernel/binary/ast_to_binary.dart:230:11)
#10     BinaryPrinter.writeVariableDeclarationList (package:kernel/binary/ast_to_binary.dart:1577:5)
#11     BinaryPrinter.visitFunctionNode (package:kernel/binary/ast_to_binary.dart:973:5)
#12     FunctionNode.accept (package:kernel/ast.dart:2026:30)
#13     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
#14     LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
#15     BinaryPrinter.writeOptionalNode (package:kernel/binary/ast_to_binary.dart:254:7)
#16     BinaryPrinter.visitProcedure (package:kernel/binary/ast_to_binary.dart:839:5)
#17     Procedure.accept (package:kernel/ast.dart:1688:32)
#18     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
#19     LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
#20     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:238:7)
#21     BinaryPrinter.visitClass (package:kernel/binary/ast_to_binary.dart:768:5)
#22     Class.accept (package:kernel/ast.dart:921:30)
#23     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
#24     LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
#25     BinaryPrinter.writeNodeList (package:kernel/binary/ast_to_binary.dart:238:7)
#26     BinaryPrinter.visitLibrary (package:kernel/binary/ast_to_binary.dart:616:5)
#27     Library.accept (package:kernel/ast.dart:409:30)
#28     BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:246:10)
#29     LimitedBinaryPrinter.writeNode (package:kernel/binary/limited_ast_to_binary.dart:55:11)
#30     List.forEach (dart:core/runtime/libgrowable_array.dart:275:8)
#31     BinaryPrinter.writeList (package:kernel/binary/ast_to_binary.dart:230:11)
#32     LimitedBinaryPrinter.writeLibraries (package:kernel/binary/limited_ast_to_binary.dart:49:5)
#33     BinaryPrinter.writeComponentFile (package:kernel/binary/ast_to_binary.dart:324:5)
#34     FrontendCompiler.writeDillFile (package:vm/frontend_server.dart:385:13)
<asynchronous suspension>
#35     FrontendCompiler.compile (package:vm/frontend_server.dart:350:13)
<asynchronous suspension>
#36     _FlutterFrontendCompiler.compile (package:frontend_server/server.dart:29:22)
<asynchronous suspension>
#37     starter (package:frontend_server/server.dart:124:27)
<asynchronous suspension>
#38     main (file:///b/build/slave/Mac_Engine/build/src/flutter/frontend_server/bin/starter.dart:8:30)
<asynchronous suspension>
#39     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#40     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

Author: Fantashit

1 thought on “AOT compilation failure on flutter application – Missing canonical name

Comments are closed.