I had this issue when I changed the `etc/hosts` file to let my backend point to a domain name instead of localhost.
It was like this when I had this issue.
```sh
sudo nano /etc/hosts
```
```conf
127.0.0.1 site.local
255.255.255.255 broadcasthost
::1 localhost
```
I just changed my 127.0.0.1 address to localhost like this:
```conf
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
```
Then running `flutter run -d chrome` will be okay now.
I had this issue when I changed the `etc/hosts` file to let my backend point to a domain name instead of localhost.
It was like this when I had this issue.
```sh
sudo nano /etc/hosts
```
```conf
127.0.0.1 site.local
255.255.255.255 broadcasthost
::1 localhost
```
I just changed my 127.0.0.1 address to localhost like this:
```conf
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
```
Then running `flutter run -d chrome` will be okay now.