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_tool/flutter_build/82e9e80bd955475dabc6ca394adf8ada/main.dart: Internal Error: The compiler crashed when compiling this element. #52641

Closed
FarhanAli-98 opened this issue Jun 8, 2023 · 1 comment

Comments

@FarhanAli-98
Copy link

FarhanAli-98 commented Jun 8, 2023

Flutter web

I'm having a problem while trying to create a build using Flutter 3.10.2, and as a result, I can't compile my project.

Target dart2js failed: Exception: ../../../.pub-cache/hosted/pub.dev/flick_video_player-0.5.0/lib/src/flick_video_player.dart:141:13:
Warning: Operand of null-aware operation '!' has type 'OverlayState' which excludes null.

  • 'OverlayState' is from 'package:flutter/src/widgets/overlay.dart' ('../../flutter_versions/flutter3.10.2/packages/flutter/lib/src/widgets/overlay.dart').
    Overlay.of(context)!.insert(_overlayEntry!);
    ^
    ../../../.pub-cache/hosted/pub.dev/flutter_widget_from_html_core-0.9.1/lib/src/internal/ops/anchor.dart:160:22:
    Warning: Operand of null-aware operation '?.' has type 'ScrollableState' which excludes null.
  • 'ScrollableState' is from 'package:flutter/src/widgets/scrollable.dart' ('../../flutter_versions/flutter3.10.2/packages/flutter/lib/src/widgets/scrollable.dart').
    final position = scrollState?.position;
    ^
    .dart_tool/flutter_build/82e9e80bd955475dabc6ca394adf8ada/main.dart:
    Internal Error: The compiler crashed when compiling this element.

The compiler is broken.

When compiling the above element, the compiler crashed. It is not
possible to tell if this is caused by a problem in your program or
not. Regardless, the compiler should not crash.

The Dart team would greatly appreciate if you would take a moment to
report this problem at http://dartbug.com/new.

Please include the following information:

  • the name and version of your operating system,

  • the Dart SDK build number (3.0.2), and

  • the entire message you see here (including the full stack trace
    below as well as the source location above).

The compiler crashed: Crash when compiling:
type 'Null' is not a subtype of type 'FunctionType' in type cast

#0 CloneVisitorNotMembers.visitInstanceGetterInvocation (package:kernel/clone.dart:834:60)
#1 InstanceGetterInvocation.accept (package:kernel/ast.dart:6302:44)
#2 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#3 CloneVisitorNotMembers.visitLet (package:kernel/clone.dart:426:33)
#4 Let.accept (package:kernel/ast.dart:9277:44)
#5 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#6 CloneVisitorNotMembers.visitExpressionStatement (package:kernel/clone.dart:448:36)
#7 ExpressionStatement.accept (package:kernel/ast.dart:9715:43)
#8 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#9 MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31)
#10 ListIterator.moveNext (dart:_internal/iterable.dart:344:26)
#11 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#12 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#13 new List.of (dart:core-patch/array_patch.dart:47:28)
#14 ListIterable.toList (dart:_internal/iterable.dart:214:7)
#15 CloneVisitorNotMembers.visitBlock (package:kernel/clone.dart:453:49)
#16 Block.accept (package:kernel/ast.dart:9771:43)
#17 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#18 CloneVisitorNotMembers.visitIfStatement (package:kernel/clone.dart:543:32)
#19 IfStatement.accept (package:kernel/ast.dart:10711:43)
#20 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#21 MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31)
#22 ListIterator.moveNext (dart:_internal/iterable.dart:344:26)
#23 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#24 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#25 new List.of (dart:core-patch/array_patch.dart:47:28)
#26 ListIterable.toList (dart:_internal/iterable.dart:214:7)
#27 CloneVisitorNotMembers.visitBlock (package:kernel/clone.dart:453:49)
#28 Block.accept (package:kernel/ast.dart:9771:43)
#29 CloneVisitorNotMembers.cloneOptional (package:kernel/clone.dart:128:29)
#30 CloneVisitorNotMembers.cloneFunctionNodeBody (package:kernel/clone.dart:632:14)
#31 CloneVisitorNotMembers.visitFunctionNode (package:kernel/clone.dart:648:29)
#32 ListGenerateLoopBodyInliner.visitFunctionNode (package:compiler/src/kernel/transformations/list_factory_specializer.dart:353:26)
#33 FunctionNode.accept (package:kernel/ast.dart:4198:38)
#34 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#35 CloneVisitorNotMembers.visitFunctionExpression (package:kernel/clone.dart:389:35)
#36 FunctionExpression.accept (package:kernel/ast.dart:9166:44)
#37 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#38 CloneVisitorNotMembers.visitNamedExpression (package:kernel/clone.dart:669:43)
#39 NamedExpression.accept (package:kernel/ast.dart:5821:38)
#40 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#41 MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31)
#42 ListIterator.moveNext (dart:_internal/iterable.dart:344:26)
#43 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#44 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#45 new List.of (dart:core-patch/array_patch.dart:47:28)
#46 ListIterable.toList (dart:_internal/iterable.dart:214:7)
#47 CloneVisitorNotMembers.visitArguments (package:kernel/clone.dart:664:38)
#48 Arguments.accept (package:kernel/ast.dart:5746:38)
#49 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#50 CloneVisitorNotMembers.visitInstanceInvocation (package:kernel/clone.dart:824:53)
#51 InstanceInvocation.accept (package:kernel/ast.dart:6128:44)
#52 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#53 MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31)
#54 ListIterator.moveNext (dart:_internal/iterable.dart:344:26)
#55 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#56 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#57 new List.of (dart:core-patch/array_patch.dart:47:28)
#58 ListIterable.toList (dart:_internal/iterable.dart:214:7)
#59 CloneVisitorNotMembers.visitListLiteral (package:kernel/clone.dart:347:56)
#60 ListLiteral.accept (package:kernel/ast.dart:8700:44)
#61 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#62 CloneVisitorNotMembers.visitNamedExpression (package:kernel/clone.dart:669:43)
#63 NamedExpression.accept (package:kernel/ast.dart:5821:38)
#64 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#65 MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31)
#66 ListIterator.moveNext (dart:_internal/iterable.dart:344:26)
#67 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#68 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#69 new List.of (dart:core-patch/array_patch.dart:47:28)
#70 ListIterable.toList (dart:_internal/iterable.dart:214:7)
#71 CloneVisitorNotMembers.visitArguments (package:kernel/clone.dart:664:38)
#72 Arguments.accept (package:kernel/ast.dart:5746:38)
#73 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#74 CloneVisitorNotMembers.visitConstructorInvocation (package:kernel/clone.dart:240:31)
#75 ConstructorInvocation.accept (package:kernel/ast.dart:7119:44)
#76 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#77 ListGenerateLoopBodyInliner.visitReturnStatement (package:compiler/src/kernel/transformations/list_factory_specializer.dart:326:56)
#78 ReturnStatement.accept (package:kernel/ast.dart:10786:43)
#79 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#80 MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31)
#81 ListIterator.moveNext (dart:_internal/iterable.dart:344:26)
#82 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#83 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#84 new List.of (dart:core-patch/array_patch.dart:47:28)
#85 ListIterable.toList (dart:_internal/iterable.dart:214:7)
#86 CloneVisitorNotMembers.visitBlock (package:kernel/clone.dart:453:49)
#87 Block.accept (package:kernel/ast.dart:9771:43)
#88 CloneVisitorNotMembers.clone (package:kernel/clone.dart:116:34)
#89 CloneVisitorNotMembers.cloneInContext (package:kernel/clone.dart:139:29)
#90 ListGenerateLoopBodyInliner.run (package:compiler/src/kernel/transformations/list_factory_specializer.dart:301:22)
#91 ListFactorySpecializer._loopBody (package:compiler/src/kernel/transformations/list_factory_specializer.dart:182:20)
#92 ListFactorySpecializer.transformListGenerateFactory (package:compiler/src/kernel/transformations/list_factory_specializer.dart:161:7)
#93 FactorySpecializer.transformStaticInvocation (package:compiler/src/kernel/transformations/factory_specializer.dart:31:25)
#94 _Lowering.visitStaticInvocation (package:compiler/src/kernel/transformations/lowering.dart:57:31)
#95 StaticInvocation.accept (package:kernel/ast.dart:7029:44)
#96 Transformer.transform (package:kernel/visitor.dart:1801:21)
#97 ReturnStatement.transformChildren (package:kernel/ast.dart:10800:22)
#98 _Lowering.visitReturnStatement (package:compiler/src/kernel/transformations/lowering.dart:105:15)
#99 ReturnStatement.accept (package:kernel/ast.dart:10786:43)
#100 Transformer.transform (package:kernel/visitor.dart:1801:21)
#101 Transformer.transformList (package:kernel/visitor.dart:1836:18)
#102 Block.transformChildren (package:kernel/ast.dart:9783:7)
#103 Transformer.defaultTreeNode (package:kernel/visitor.dart:1858:10)
#104 TreeVisitor.defaultStatement (package:kernel/visitor.dart:421:41)
#105 TreeVisitor.visitBlock (package:kernel/visitor.dart:426:31)
#106 Block.accept (package:kernel/ast.dart:9771:43)
#107 Transformer.transform (package:kernel/visitor.dart:1801:21)
#108 FunctionNode.transformChildren (package:kernel/ast.dart:4224:16)
#109 _Lowering.visitFunctionNode (package:compiler/src/kernel/transformations/lowering.dart:64:10)
#110 FunctionNode.accept (package:kernel/ast.dart:4198:38)
#111 Transformer.transform (package:kernel/visitor.dart:1801:21)
#112 Procedure.transformChildren (package:kernel/ast.dart:3611:20)
#113 Transformer.defaultTreeNode (package:kernel/visitor.dart:1858:10)
#114 TreeVisitor.defaultMember (package:kernel/visitor.dart:477:35)
#115 _Lowering.defaultMember (package:compiler/src/kernel/transformations/lowering.dart:44:18)
#116 TreeVisitor.visitProcedure (package:kernel/visitor.dart:481:39)
#117 Procedure.accept (package:kernel/ast.dart:3590:40)
#118 Transformer.transform (package:kernel/visitor.dart:1801:21)
#119 Transformer.transformList (package:kernel/visitor.dart:1836:18)
#120 Class.transformChildren (package:kernel/ast.dart:1536:7)
#121 Transformer.defaultTreeNode (package:kernel/visitor.dart:1858:10)
#122 TreeVisitor.visitClass (package:kernel/visitor.dart:490:31)
#123 Class.accept (package:kernel/ast.dart:1481:38)
#124 Transformer.transform (package:kernel/visitor.dart:1801:21)
#125 Transformer.transformList (package:kernel/visitor.dart:1836:18)
#126 Library.transformChildren (package:kernel/ast.dart:611:7)
#127 _Lowering.visitLibrary (package:compiler/src/kernel/transformations/lowering.dart:49:10)
#128 List.forEach (dart:core-patch/growable_array.dart:416:8)
#129 transformLibraries (package:compiler/src/kernel/transformations/lowering.dart:22:13)
#130 Dart2jsTarget.performModularTransformationsOnLibraries (package:compiler/src/kernel/dart2js_target.dart:173:14)
#131 KernelTarget.runBuildTransformations (package:front_end/src/fasta/kernel/kernel_target.dart:1568:19)
#132 KernelTarget.buildComponent. (package:front_end/src/fasta/kernel/kernel_target.dart:638:7)

#133 withCrashReporting (package:front_end/src/fasta/crash.dart:136:12)

#134 _buildInternal (package:front_end/src/kernel_generator_impl.dart:207:19)

#135 withCrashReporting (package:front_end/src/fasta/crash.dart:136:12)

#136 compile. (package:front_end/src/api_unstable/dart2js.dart:201:37)

#137 compile (package:front_end/src/api_unstable/dart2js.dart:199:36)

#138 _loadFromSource (package:compiler/src/phase/load_kernel.dart:299:29)

#139 run (package:compiler/src/phase/load_kernel.dart:400:36)

#140 Compiler.loadKernel (package:compiler/src/compiler.dart:395:9)

#141 Compiler.produceKernel (package:compiler/src/compiler.dart:402:36)

#142 Compiler.runSequentialPhases (package:compiler/src/compiler.dart:743:20)

#143 Compiler.runInternal. (package:compiler/src/compiler.dart:319:7)

#144 Compiler.runInternal (package:compiler/src/compiler.dart:318:5)

#145 Compiler.run. (package:compiler/src/compiler.dart:239:11)

#146 main (package:compiler/src/dart2js.dart:1473:3)

#0 Dart2JSTarget.build (package:flutter_tools/src/build_system/targets/web.dart:212:7)

#1 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:847:9)

#2 Future.wait. (dart:async/future.dart:525:21)

#3 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:785:32)

#4 Future.wait. (dart:async/future.dart:525:21)

#5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:785:32)

#6 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:614:16)

#7 WebBuilder.buildWeb (package:flutter_tools/src/web/compile.dart:81:34)

#8 BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:191:5)

#9 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1336:27)

#10 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#11 CommandRunner.runCommand (package:args/command_runner.dart:212:13)

#12 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:296:9)

#13 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#14 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:244:5)

#15 run.. (package:flutter_tools/runner.dart:91:9)

#16 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#17 main (package:flutter_tools/executable.dart:91:3)

Compiling lib/main_dev.dart for the Web... 23.4s
Exception: Failed to compile the application for the Web.


Flutter Doctor
Screenshot 2023-06-08 at 1 02 34 PM

Screenshot 2023-06-08 at 1 04 49 PM
@edeetee
Copy link

edeetee commented Sep 26, 2023

How did you fix this? I notice that when running flutter pub upgrade, I notice that web has a new version but can't upgrade due to a dependency constraint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants