Skip to content

Hot reload on the web (Experimental) with wasm throws no option named "--dartdevc-canary" #60779

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

Open
AbhiTheModder opened this issue May 22, 2025 · 1 comment
Assignees
Labels
area-dart2wasm Issues for the dart2wasm compiler. web-dev-compiler web-hot-reload Issues related to stateful hot reload on the web

Comments

@AbhiTheModder
Copy link

Steps to reproduce

Run with --wasm flag:

  1. flutter run -d chrome --web-experimental-hot-reload --wasm

Throws Could not find an option named "--dartdevc-canary".

Code sample

Target dart2wasm failed: ProcessException: Process exited abnormally with exit code 64:
Could not find an option named "--dartdevc-canary".

Usage: dart compile wasm [arguments] <dart entry point>
-h, --help                  Print this usage information.
-o, --output                Write the output to <file name>.
                            This can be an absolute or relative path.
-v, --verbose               Print debug output during compilation
    --enable-asserts        Enable assert statements.
    --[no-]source-maps      Generate a source map file.
                            (defaults to on)
-D, --define=<key=value>    Define an environment declaration. To specify multiple declarations, use
multiple options or use commas to separate key-value pairs.
                            For example: dart compile wasm -Da=1,b=2 main.dart

Run "dart help" to see global options.
  Command: C:\Users\user\flutter\bin\cache\dart-sdk\bin\dart.exe compile wasm
  --packages=C:\Users\user\app\.dart_tool\package_config.json
  --extra-compiler-option=--platform=C:\Users\user\flutter\bin\cache\flutter_web_sdk\kernel\dart2wa
  sm_platform.dill -Ddart.vm.profile=false -Ddart.vm.product=false
  --extra-compiler-option=--import-shared-memory
  --extra-compiler-option=--shared-memory-max-pages=32768 --dartdevc-canary
  --dartdevc-module-format=ddc -DFLUTTER_VERSION=3.32.0 -DFLUTTER_CHANNEL=stable
  -DFLUTTER_GIT_URL=https://github.com/flutter/flutter.git -DFLUTTER_FRAMEWORK_REVISION=be698c48a6  
  -DFLUTTER_ENGINE_REVISION=1881800949 -DFLUTTER_DART_VERSION=3.8.0 -DFLUTTER_WEB_USE_SKIA=false    
  -DFLUTTER_WEB_USE_SKWASM=true
  -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/18818009497c581ede5d8a3b8b83
  3b81d00cebb7/
  --extra-compiler-option=--depfile=C:\Users\user\app\.dart_tool\flutter_build\40cc68700f34d96c
  0809eab908b03279\dart2wasm.d -O0 --no-strip-wasm --extra-compiler-option=--enable-asserts -o      
  C:\Users\user\app\.dart_tool\flutter_build\40cc68700f34d96c0809eab908b03279\main.dart.wasm   
  C:\Users\user\app\.dart_tool\flutter_build\40cc68700f34d96c0809eab908b03279\main.dart        
#0      RunResult.throwException (package:flutter_tools/src/base/process.dart:118:5)
#1      _DefaultProcessUtils.run (package:flutter_tools/src/base/process.dart:344:19)
<asynchronous suspension>
#2      Dart2WasmTarget.build (package:flutter_tools/src/build_system/targets/web.dart:352:5)       
<asynchronous suspension>
#3      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:873:9)
<asynchronous suspension>
#4      Future.wait.<anonymous closure> (dart:async/future.dart:525:21)
<asynchronous suspension>
#5      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:811:32)
<asynchronous suspension>
#6      Future.wait.<anonymous closure> (dart:async/future.dart:525:21)
<asynchronous suspension>
#7      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:811:32)
<asynchronous suspension>
#8      FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:629:16)  
<asynchronous suspension>
#9      WebBuilder.buildWeb (package:flutter_tools/src/web/compile.dart:91:34)
<asynchronous suspension>
#10     ResidentWebRunner.run.<anonymous closure> (package:flutter_tools/src/isolated/resident_web_runner.dart:354:11)
<asynchronous suspension>
#11     asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:109:26)     
<asynchronous suspension>

Compiling lib\main.dart for the Web...                           1,523ms
Error: Failed to compile application for the Web.

Flutter version

Flutter 3.32.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision be698c48a6 (3 days ago) • 2025-05-19 12:59:14 -0700
Engine • revision 1881800949 (3 days ago) • 2025-05-19 10:54:07 -0700
Tools • Dart 3.8.0 • DevTools 2.45.
@AbhiTheModder AbhiTheModder added web-dev-compiler web-hot-reload Issues related to stateful hot reload on the web labels May 22, 2025
@AbhiTheModder AbhiTheModder changed the title Hot reload on the web (Experimental) with wasm Hot reload on the web (Experimental) with wasm throws no option named "--dartdevc-canary" May 22, 2025
@nshahan
Copy link
Contributor

nshahan commented May 22, 2025

Thanks for the bug, that could be cleaner. It is an invalid combination of flags because the wasm compile is used for production deployment. There is no hot reload support for wasm compiled output at this time.

@lrhn lrhn added the area-dart2wasm Issues for the dart2wasm compiler. label May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart2wasm Issues for the dart2wasm compiler. web-dev-compiler web-hot-reload Issues related to stateful hot reload on the web
Projects
Status: No status
Development

No branches or pull requests

4 participants