Vscode-live-server: Unable to preview project on mobile device

Created on 10 Jun 2018  路  8Comments  路  Source: ritwickdey/vscode-live-server

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[x] Other: Feature malfunction

Current behavior

Live Server works just fine to preview my project on the browser from my computer. The issue I have is that I'm unable to preview it from my mobile device (Samsung Galaxy S5, my browser is Google Chrome). I followed the instructions from the FAQ section but I didn't succeed. The preview takes so much to load. Finally, it ends up showing this message:

You can't access this site.
192.168.xx.xx took so much to reply.
Look for 192.168 5500 index in Google.
ERR_CONNECTION_TIMED_OUT

Expected behavior

Being able to preview my project on the browser from my phone.

Environment

Browser:

- Chrome (mobile) version 67.0.3396.81

For Tooling issues:

- Live Server: 4.1.0
- Desktop Platform: Windows 10
- Mobile Platform:  Android 6.0.1; SM-G900H Build/MMB29K
- Visual Studio Code: 1.24.0

Others

closed

Most helpful comment

Enable "liveServer.settings.useLocalIp": true and try again.

All 8 comments

Enable "liveServer.settings.useLocalIp": true and try again.

I've already tried that but I got nothing either

Sometimes, the firewall blocks incoming requests. Try to turn off firewall temporarily & try again.

It worked! 馃拑 I kinda dislike turning off the firewall though, but it seems it's the only way to make it work. Thank you, Ritwick.

Actually, you don't have to turn off the firewall. I never did, but it's working on my laptop.

I think you have to turn off/on any rules of the firewall. Just check on the internet.

I'll research about that. Thanks once again! 馃槂

[06/16/2020]
Thank so much. it's perfectlly woriking. :)

In my case, I encountered this issue on MacOS.

I activated "liveServer.settings.useLocalIp": true. This gave me an IP looking like http://192.168.95.1:5500/ (instead of 127.0.0.1:5500).

Still I got an error message when connecting over mobile.

Then I went into the MacOS Preferences > Network. There it showed "Wifi is connected to NetworkName with IP address 192.168.0.227.

So I entered http://192.168.0.227:5500/ on my mobile device and BAM!, it worked :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abhiinos111abhi picture abhiinos111abhi  路  5Comments

Zerotask picture Zerotask  路  4Comments

maboumra picture maboumra  路  3Comments

Stonerea656 picture Stonerea656  路  5Comments

Rakesh-webdeveloper picture Rakesh-webdeveloper  路  4Comments