'webdev daemon' doesn't serve DartAngular sample project until some file is edited
- Dominant language
- Dart
- Stars
- 224
- Forks
- 94
- Avg merge
- 7h 14m
- Merged PRs (30d)
- 2
Description
Windows 10, Dart SDK 2.6.0-dev.8.1, stagehand 3.3.4, webdev 2.5.3, Chrome 77.0.3865.120
Steps:
- pub global activate stagehand
- pub global run stagehand web-angular
- pub get
- pub global activate webdev
- pub global run webdev daemon
Expected: Chrome runs the app.
Actual result: Chrome starts but the app doesn't run. The page that opens up shows `Loading...` placeholder. No errors in Chrome dev console. Here are the last lines of the `webdev daemon` output:
```
[{"event":"daemon.log","params":{"log":"[INFO] 1m 6s elapsed, 12226/12226 actions completed."}}]
[{"event":"daemon.log","params":{"log":"[INFO] Running build completed, took 1m 6s\n"}}]
[{"event":"daemon.log","params":{"log":"[INFO] Caching finalized dependency graph..."}}]
[{"event":"daemon.log","params":{"log":"[INFO] Caching finalized dependency graph completed, took 493ms\n"}}]
[{"event":"daemon.log","params":{"log":"[INFO] Succeeded after 1m 7s with 5773 outputs (12820 actions)\n"}}]
[{"event":"daemon.log","params":{"log":"[INFO] ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n"}}]
```
Note that there's no "app.started" message and no "appId" or "wsUri".
Now, edit any file (for example add a non-meaningful space to web/main.dart file and save. this forces rebuild, which succeeds, and finally the app loads successfully in Chrome! The following lines appear in the `webdev daemon` console:
```
[{"event":"daemon.log","params":{"log":"[INFO] About to build [web]..."}}]
[{"event":"daemon.log","params":{"log":"[INFO] Updating asset graph..."}}]
[{"event":"daemon.log","params":{"log":"[INFO] Updating asset graph completed, took 18ms\n"}}]
[{"event":"daemon.log","params":{"log":"[INFO] Running build..."}}]
[{"event":"daemon.log","params":{"log":"[INFO] Running build completed, took 955ms\n"}}]
[{"event":"daemon.log","params":{"log":"[INFO] Caching finalized dependency graph..."}}]
[{"event":"daemon.log","params":{"log":"[INFO] Caching finalized dependency graph completed, took 307ms\n"}}]
[{"event":"daemon.log","params":{"log":"[INFO] Succeeded after 1.3s with 7 outputs (5 actions)\n"}}]
[{"event":"daemon.log","params":{"log":"[INFO] ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n"}}]
[{"event":"daemon.log","params":{"log":"[INFO] Debug service listening on ws://127.0.0.1:53116/Gs2bJdnH4_4=\n"}}]
[{"event":"app.start","params":{"appId":"yeJMfnpaTmxFjhoc5S1hjg==","directory":"C:\\Users\\alexander.doroshko\\WebstormProjects\\dart-angular","deviceId":"chrome","launchMode":"run"}}]
[{"event":"app.started","params":{"appId":"yeJMfnpaTmxFjhoc5S1hjg=="}}]
[{"event":"app.debugPort","params":{"appId":"yeJMfnpaTmxFjhoc5S1hjg==","port":53116,"wsUri":"ws://127.0.0.1:53116/Gs2bJdnH4_4="}}]
```
Contributor guide
Research direction
Reproduce the issue with the listed stagehand, pub, and `webdev daemon` commands on the DartAngular sample, then compare the initial build with the rebuild triggered by editing `web/main.dart`. Inspect the daemon output for the missing `app.started`, `appId`, and `wsUri` events. Done means the unedited sample launches in Chrome and emits the expected startup events.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100