Skip to content

Unexpected Version of kernel sdk #60057

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
Kaushik-Mandale opened this issue Feb 5, 2025 · 3 comments
Closed

Unexpected Version of kernel sdk #60057

Kaushik-Mandale opened this issue Feb 5, 2025 · 3 comments
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop needs-info We need additional information from the issue author (auto-closed after 14 days if no response) type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js

Comments

@Kaushik-Mandale
Copy link

Launching lib\main.dart on Edge in profile mode...
Compiling lib\main.dart for the Web...
Target dart2js failed: ProcessException: Process exited abnormally with exit code 253:
.dart_tool/flutter_build/36546c92cb41e23420f74db738b20b08/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.6.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 file:///C:/Users/svbko/Documents/Flutter%20Practice/first_app/.dart_tool/flutter_build/36546c92cb41e23420f74db738b20b08/main.dart:
Unexpected Kernel SDK Version 1bf43bf (expected 42f3fc1).

#0 BinaryBuilder._readAndVerifySdkHash (package:kernel/binary/ast_from_binary.dart:657:7)
#1 BinaryBuilder._verifyComponentInitialBytes (package:kernel/binary/ast_from_binary.dart:874:5)
#2 BinaryBuilder.readComponent. (package:kernel/binary/ast_from_binary.dart:697:7)
#3 Timeline.timeSync (dart:developer/timeline.dart:173:22)
#4 BinaryBuilder.readComponent (package:kernel/binary/ast_from_binary.dart:695:21)
#5 ProcessedOptions.loadComponent (package:front_end/src/base/processed_options.dart:570:10)
#6 ProcessedOptions.loadAdditionalDills (package:front_end/src/base/processed_options.dart:552:20)

#7 generateKernelInternal. (package:front_end/src/kernel_generator_impl.dart:111:16)

#8 withCrashReporting (package:front_end/src/base/crash.dart:138:12)

#9 compile. (package:front_end/src/api_unstable/dart2js.dart:166:37)

#10 CompilerContext.clear (package:front_end/src/base/compiler_context.dart:79:3)

#11 compile (package:front_end/src/api_unstable/dart2js.dart:164:36)

#12 _loadFromSource (package:compiler/src/phase/load_kernel.dart:318:29)

#13 run (package:compiler/src/phase/load_kernel.dart:412:36)

#14 Compiler.loadKernel (package:compiler/src/compiler.dart:393:9)

#15 Compiler.produceKernel (package:compiler/src/compiler.dart:400:36)

#16 Compiler.runSequentialPhases (package:compiler/src/compiler.dart:634:20)

#17 Compiler.runInternal. (package:compiler/src/compiler.dart:317:7)

#18 Compiler.runInternal (package:compiler/src/compiler.dart:316:5)

#19 Compiler.run. (package:compiler/src/compiler.dart:237:11)

#20 compile. (package:compiler/compiler_api.dart:257:30)

#21 compile.compilationDone (package:compiler/src/dart2js.dart:723:3)

#22 main (package:compiler/src/dart2js.dart:1226:3)

Command: C:\flutter\bin\cache\dart-sdk\bin\dart.exe C:\flutter\bin\cache\dart-sdk\bin\snapshots\dart2js.dart.snapshot --platform-binaries=C:\flutter\bin\cache\flutter_web_sdk\kernel --invoker=flutter_tool -Ddart.vm.profile=true -Dflutter.inspector.structuredErrors=true -DFLUTTER_WEB_AUTO_DETECT=false -DFLUTTER_WEB_USE_SKIA=true -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/e672b006cb34c921db85b8e2f482ed3144a4574b/ --native-null-assertions -o C:\Users\svbko\Documents\Flutter Practice\first_app.dart_tool\flutter_build\36546c92cb41e23420f74db738b20b08\app.dill --packages=C:\Users\svbko\Documents\Flutter Practice\first_app.dart_tool\package_config.json --cfe-only C:\Users\svbko\Documents\Flutter Practice\first_app.dart_tool\flutter_build\36546c92cb41e23420f74db738b20b08\main.dart
#0 RunResult.throwException (package:flutter_tools/src/base/process.dart:122:5)
#1 _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart:389:19)

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

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

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

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

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

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

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

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

#10 ResidentWebRunner.run. (package:flutter_tools/src/isolated/resident_web_runner.dart:349:11)

#11 asyncGuard. (package:flutter_tools/src/base/async_guard.dart:111:24)

Finished with error: Error: Failed to compile application for the Web.

@dart-github-bot
Copy link
Collaborator

Summary: Dart2js compiler crashed with exit code 253 due to an unexpected kernel SDK version mismatch. The error points to a problem in the compiler, not the user's code.

@dart-github-bot dart-github-bot added area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Feb 5, 2025
@nshahan
Copy link
Contributor

nshahan commented Feb 11, 2025

Are you able to reproduce this issue reliably?

This error points to some mismatch of the versions for assets used to perform the compile so it seems like perhaps there was a stale build cache?

@lrhn lrhn added needs-info We need additional information from the issue author (auto-closed after 14 days if no response) and removed triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. labels Feb 12, 2025
Copy link

Without additional information we're not able to resolve this issue. Feel free to add more info or respond to any questions above and we can reopen the case. Thanks for your contribution!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2025
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 needs-info We need additional information from the issue author (auto-closed after 14 days if no response) type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) web-dart2js
Projects
None yet
Development

No branches or pull requests

4 participants