Skip to content

Target dart2js failed: ProcessException: Process exited abnormally with exit code 253 #60425

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
kjamespoulson opened this issue Mar 28, 2025 · 3 comments

Comments

@kjamespoulson
Copy link

The following issue happened on MacOS Sequoia 15.3.2 (24D81):

Jamess-MacBook-Pro:james_ramsey me$ flutter build web
Resolving dependencies...
Downloading packages... (1.5s)
async 2.12.0 (2.13.0 available)
fake_async 1.3.2 (1.3.3 available)
leak_tracker 10.0.8 (10.0.9 available)
material_color_utilities 0.11.1 (0.12.0 available)
vm_service 14.3.1 (15.0.0 available)
Got dependencies!
5 packages have newer versions incompatible with dependency constraints.
Try flutter pub outdated for more information.

Target dart2js failed: ProcessException: Process exited abnormally with exit code 253:
.dart_tool/flutter_build/e58faa58406fdff4e8b46d822e0dae57/app.dill:
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.7.2), and

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

The compiler crashed: Error reading '.dart_tool/flutter_build/e58faa58406fdff4e8b46d822e0dae57/app.dill' (No such file or directory)
Command: /usr/local/Caskroom/flutter/3.29.2/flutter/bin/cache/dart-sdk/bin/dart compile js --platform-binaries=/usr/local/Caskroom/flutter/3.29.2/flutter/bin/cache/flutter_web_sdk/kernel --invoker=flutter_tool
-Ddart.vm.product=true -DFLUTTER_WEB_USE_SKIA=true -DFLUTTER_WEB_USE_SKWASM=false -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/18b71d647a292a980abb405ac7d16fe1f0b20434/ --native-null-assertions
--no-source-maps -O4 -o /Users/me/Desktop/flutter/james_ramsey/.dart_tool/flutter_build/e58faa58406fdff4e8b46d822e0dae57/main.dart.js
/Users/me/Desktop/flutter/james_ramsey/.dart_tool/flutter_build/e58faa58406fdff4e8b46d822e0dae57/app.dill
#0 RunResult.throwException (package:flutter_tools/src/base/process.dart:118:5)
#1 _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart:344:19)

#2 Dart2JSTarget.build (package:flutter_tools/src/build_system/targets/web.dart:205:5)

#3 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:876:9)

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

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

#6 Future.wait. (dart:async/future.dart:528:21)

#7 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:814:32)

#8 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:637:16)

#9 WebBuilder.buildWeb (package:flutter_tools/src/web/compile.dart:93:34)

#10 BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:253:5)

#11 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1558:27)

#12 AppContext.run. (package:flutter_tools/src/base/context.dart:154:19)

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

#14 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:496:9)

#15 AppContext.run. (package:flutter_tools/src/base/context.dart:154:19)

#16 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:431:5)

#17 run.. (package:flutter_tools/runner.dart:98:11)

#18 AppContext.run. (package:flutter_tools/src/base/context.dart:154:19)

#19 main (package:flutter_tools/executable.dart:99:3)

Compiling lib/main.dart for the Web... 8.4s
Error: Failed to compile application for the Web.
Jamess-MacBook-Pro:james_ramsey me$

@sigmundch
Copy link
Member

I believe this to be a duplicate of #55096

As I mentioned in other reports, I think something else in the tooling is hiding the original error (tracking under flutter/flutter#165315).

@kjamespoulson - If the input you are using is something you can share publicly or something you can reduce to a repro, that would be super helpful!

For now, I'll close this issue and merge with the other.

cc @bkonyi

@kjamespoulson
Copy link
Author

All I can say is:

The error happened on MacOS (see OS version above).

This error started happening after cleaning the project directory from the VS Code CL using "flutter clean" and "flutter clean cache" (which explains the missing .dart_tool/flutter_tools dir).

I can still launch my app to the web using VS Code's "Run with Debugging" button, but will not build in XCode or via the command line.

@sigmundch
Copy link
Member

Thanks so much for sharing - we haven't received much details from other reports, so all hints are helpful :)

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