dart-lang / webdev

A CLI for Dart web development.
https://pub.dev/packages/webdev
212 stars 75 forks source link

an error while running the default app #2464

Open AgentCreator opened 3 months ago

AgentCreator commented 3 months ago

Hi! I was trying to use dart webdev for a quick website, but I ran into some issues regarding the webpage.

When I run webdev serve and go to the page 127.0.0.1:8080, i get an empty page.

Знімок екрана 2024-07-26 о 11 32 34

After that, I look at my terminal, and see dart spamming this:

[WARNING] Error serving requestsSocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 54), address = 127.0.0.1, port = 8080

What does it mean???

Then I think that something is wrong with loading the JS files, like main.dart.js, but again, no. I get no network errors, no browser console errors, nothing except these cryptic warnings in the terminal!

And also when I build it (webdev build) and run the HTML page in the browser - it is completely fine and working!

recreation

I use MacOS Sonoma 14.4\ webdev V3.5.0\ Dart SDK version: 3.4.1 (stable) (Tue May 21 15:46:25 2024 +0000) on "macos_arm64" (installed using homebrew)\ PyCharm 2024.1.4 (Professional Edition)

to get this empty website, i ran dart create -t web . --force and later wedev serve

bkonyi commented 3 months ago

Could you try reloading the page with the "Network" tool open in Chrome DevTools? Connection reset by peer being printed by the webdev process seems to imply that the browser is killing the connection. It'd also be useful to run webdev serve with the --verbose flag to see if there's any additional information there.

AgentCreator commented 3 months ago

no, as i said, "no network errors"