Skip to content

Fix DWDS injected client loading when running webdev in AOT mode#2768

Open
Varadraj75 wants to merge 1 commit intodart-lang:mainfrom
Varadraj75:fix-dwds-injected-client-aot
Open

Fix DWDS injected client loading when running webdev in AOT mode#2768
Varadraj75 wants to merge 1 commit intodart-lang:mainfrom
Varadraj75:fix-dwds-injected-client-aot

Conversation

@Varadraj75
Copy link

This PR fixes an issue where the DWDS injected debugging client fails to load when webdev is installed and run in AOT mode (for example via dart pub global activate).

In AOT snapshots, resolving the injected client using Isolate.resolvePackageUri can fail, leading to the runtime error:
Bad state: Cannot resolve "package:dwds/src/injected/client.js"

To address this, the injected DWDS client is now served using an AOT-safe approach, avoiding runtime package URI resolution and ensuring the client is always available when serving .bootstrap.js entrypoints.

This restores correct debugging behavior for globally activated webdev without affecting existing JIT or development workflows.
closes #2761


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.

@google-cla
Copy link

google-cla bot commented Feb 1, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Varadraj75
Copy link
Author

Hey @nshahan, could you please review this PR when you get a chance?
Happy to make any changes or adjustments if needed—thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dwds] [webdev] Loading injected client script fails in aot mode.

1 participant