Skip to content

The compiler crashed: NoSuchMethodError: The getter 'boxedVariables' was called on null. #48517

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

Closed
dopecoder opened this issue Mar 7, 2022 · 1 comment
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. closed-duplicate Closed in favor of an existing report web-dart2js

Comments

@dopecoder
Copy link

This tracker is for issues related to:

  • dart2js

  • Dart SDK Version (dart --version)

Dart SDK build number (2.17.0-165.0.dev)

  • Whether you are using Windows, MacOSX, or Linux (if applicable)

Mac OS Montery 12.2.1 (21D62)

  • Whether you are using Chrome, Safari, Firefox, Edge (if applicable)
 Target dart2js failed: Exception: Warning: The 'dart2js' entrypoint script is deprecated, please use 'dart compile js' instead.
           lib/app/pages/signals/application/signal-actor-bloc/signal-actor-bloc.cg.freezed.dart:5940:17:
           Internal Error: The compiler crashed when compiling this element.
             const factory _ReportInaccurateSignalFailure(SignalsFailure failure) =
                           ^
           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 (2.17.0-165.0.dev), and
           
           * the entire message you see here (including the full stack trace
             below as well as the source location above).
           
           The compiler crashed: NoSuchMethodError: The getter 'boxedVariables' was called on null.
           Receiver: null
           Tried calling: boxedVariables
           #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
           #1      JsKernelToElementMap.makeRecordContainer (package:compiler/src/js_model/element_map_impl.dart:1770:14)
           #2      ClosureDataBuilder.createClosureEntities.processModel (package:compiler/src/js_model/closure.dart:329:23)
           #3      ClosureDataBuilder.createClosureEntities.<anonymous closure>.<anonymous closure>
(package:compiler/src/js_model/closure.dart:389:9)
           #4      CompilerDiagnosticReporter.withCurrentElement (package:compiler/src/compiler.dart:1025:15)
           #5      ClosureDataBuilder.createClosureEntities.<anonymous closure> (package:compiler/src/js_model/closure.dart:388:17)
           #6      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:579:13)
           #7      ClosureDataBuilder.createClosureEntities (package:compiler/src/js_model/closure.dart:387:19)
           #8      JsClosedWorldBuilder.convertClosedWorld (package:compiler/src/js_model/js_world_builder.dart:161:41)
           #9      JsBackendStrategy.createJClosedWorld (package:compiler/src/js_model/js_strategy.dart:174:52)
           #10     Compiler.closeResolution (package:compiler/src/compiler.dart:610:25)
           #11     Compiler.computeClosedWorld (package:compiler/src/compiler.dart:470:9)
           #12     Compiler.compileFromKernel.<anonymous closure>.<anonymous closure> (package:compiler/src/compiler.dart:572:17)
           #13     CompilerTask.measureSubtask (package:compiler/src/common/tasks.dart:181:35)
           #14     Compiler.compileFromKernel.<anonymous closure> (package:compiler/src/compiler.dart:571:44)
           #15     CompilerTask.measureSubtask (package:compiler/src/common/tasks.dart:181:35)
           #16     Compiler.compileFromKernel (package:compiler/src/compiler.dart:570:14)
           #17     Compiler.runInternal (package:compiler/src/compiler.dart:372:17)
           <asynchronous suspension>
           #18     main (package:compiler/src/dart2js.dart:1392:3)
           <asynchronous suspension>
           
           
[  +17 ms] Compiling lib/main.dart for the Web... (completed in 30.2s)
[   +1 ms] "flutter web" took 31,363ms.
[   +4 ms] Exception: Failed to compile application for the Web.
[        ] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      buildWeb (package:flutter_tools/src/web/compile.dart:81:5)
           <asynchronous suspension>
           #2      BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:112:5)
           <asynchronous suspension>
           #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1165:27)
           <asynchronous suspension>
           #4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #5      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
           <asynchronous suspension>
           #6      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
           <asynchronous suspension>
           #7      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #8      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
           <asynchronous suspension>
           #9      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #11     main (package:flutter_tools/executable.dart:94:3)
           <asynchronous suspension>
           
           
[  +90 ms] ensureAnalyticsSent: 88ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1

I upgraded my packages to work with Flutter 2.10 and unable to go back to previous version without downgrading my packages.

@sigmundch
Copy link
Member

Thanks so much for the bug report! I'm closing this issue to mark it as a duplicate of #47916 (which I saw you noticed as well).

@sigmundch sigmundch added closed-duplicate Closed in favor of an existing report area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. web-dart2js labels Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. closed-duplicate Closed in favor of an existing report web-dart2js
Projects
None yet
Development

No branches or pull requests

2 participants