Failed to Connect error: Local Preview


I have a problem. I want to preview an app locally. But if I start the local preview, I’ll receive an error.

Failed to connect

Please check that this device is connected to the same network as your computer.

Failed to connect to simulator host:

Result for ping -c 1 $(hostname)

64 bytes from icmp_seq=0 ttl=64 time=0.098 ms

How can I fix that error?

It works…

After a unwanted restart (crash -.-) of my computer the preview is working…

How can I mark this post as solved?