Reputation: 720
I set up my Flutter on the master channel for web development with Chrome and when I go to launch it, sometimes it's opening chrome at http://localhost:8080/ with the browser showing ERR_CONNECTION_REFUSED
, other times it's opening something like http://localhost:51043/#/, the debug console actually starts outputting and the app loads. There doesn't seem to be any obvious factor influencing this behavior, but I would like to get it to run every time, if possible.
Here's how the good doctor is looking:
[√] Flutter (Channel master, 1.21.0-6.0.pre.150, on Microsoft Windows [Version 10.0.18362.900], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Android Studio (version 3.1)
[√] VS Code (version 1.47.3)
[√] Connected device (2 available)
And here's my launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
Upvotes: 1
Views: 1195
Reputation: 1771
@DeanVillamia 's comment fixed the issue for me in Visual Studio, posting a answer to make it more visible. After updating many files in my project and integrating Firebase I could no longer launch. I deleted launch.json
then my project launched normally.
Upvotes: 4