# Browsersync not working on external device

**URL:** https://discourse.roots.io/t/browsersync-not-working-on-external-device/18678
**Category:** sage
**Tags:** browsersync
**Created:** 2020-07-16T14:16:45Z
**Posts:** 10

## Post 1 by @Bhanu_Kumar_Singh — 2020-07-16T14:16:45Z

I’m using [Local by Flywheel](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwifgouJ-NHqAhXtzTgGHVzTB-sQFjAAegQIAxAB&url=https%3A%2F%2Flocalwp.com%2F&usg=AOvVaw3D-NTtb02IqtA0GZeWkkcM) for my local setup and have installed sage starter theme using composer. I have setup everything as said in the installation documentation.

The address of my local setup is : `https://theme.local/`

The following is the content of my `config.json` file

```
{
  "entry": {
    "main": [
      "./scripts/main.js",
      "./styles/main.scss"
    ],
    "customizer": [
      "./scripts/customizer.js"
    ]
  },
  "publicPath": "/wp-content/themes/cfi",
  "devUrl": "https://theme.local",
  "proxyUrl": "http://localhost:3000",
  "cacheBusting": "[name]_[hash:8]",
  "watch": [
    "app/**/*.php",
    "config/**/*.php",
    "resources/views/**/*.php"
  ]
}
```

I have only changed `publicPath` and `devUrl` which I believe is set correctly.

But I am still unable to load page on external device. :disappointed:  
I visit `192.168.1.103:3000` from my mobile I get `ERR_EMPTY_RESPONSE`

 ![image](https://discourse.roots.io/uploads/default/original/2X/6/6c1588e9358ec33d09568ddeeae461f9adeb07f2.png)

When I visit `192.168.1.103:3001` I get the following:

 ![image](https://discourse.roots.io/uploads/default/original/2X/5/528f7047afb7628d7813c9306f934ebaed226ad4.png)

I would really love this to work as it would immensely improve the development workflow.

Thanks

---

## Post 2 by @strarsis — 2020-07-16T15:47:40Z

Apparently the flywheel setup routes by HTTP host. Just the IP address alone doesn’t match anything, hence the empty HTTP response.  
The easiest way would be configuring your local router to resolve to the localhost IP., so the smartphone also uses it.

---

## Post 3 by @Bhanu_Kumar_Singh — 2020-07-16T15:50:22Z

How can I go about it ? Can you share any link ?

Thanks

---

## Post 4 by @strarsis — 2020-07-16T16:08:36Z

The smartphone and your workstation are probably in the same network that is managed by a router device, right? So you log into your router device and a new DNS A record that points from `theme.local` to `192.168.1.103`. Then it should work when you visit `theme.local` with your smartphone. Even better if you can set up a static workstation IP so you don’t have to update it all the time.

---

## Post 5 by @Bhanu_Kumar_Singh — 2020-07-16T19:00:24Z

Thanks for the reply. :smile:

It just asks for IP ? Nowehere to add A record.

 ![image](https://discourse.roots.io/uploads/default/original/2X/5/5776124a4a04c6f4e7221c566f250538b33f15d9.png)

Should I consider switching to laragon instead ?

---

## Post 6 by @strarsis — 2020-07-16T19:08:54Z

Hm, Flywheel offers a “Live Link” feature, can your smartphone access the local site using that Live link?

---

## Post 7 by @Bhanu_Kumar_Singh — 2020-07-16T19:14:21Z

Yes it does.

But sadly using it gets exhausted too soon.

 ![image](https://discourse.roots.io/uploads/default/original/2X/2/26289f5b7c2897710dd5de539b2aad38ecf1c3a2.jpeg)

This was triggered just after one click.

---

## Post 8 by @strarsis — 2020-07-16T19:54:32Z

So when your router doesn’t support custom DNS records, set up a local DNS router with passthrough (dnsmasq for example) and let the router use it instead.

---

## Post 9 by @Bhanu_Kumar_Singh — 2020-07-16T20:56:50Z

I tried installing multiple software in my windows system.

1. [YogaDNS - The Most Advanced DNS Client for Windows](https://www.yogadns.com/)
2. [Technitium DNS Server | An Open Source Tool For Privacy & Security](https://technitium.com/dns/)

But it all looked too intmidating for me :face_with_thermometer: and I couldn’t set it up correctly.

Thats why I switched to laragon local server.

Now I have set up my projetct and it loads on my phone. But with other issues.

1. CSS is not loading
2. JS is not Loading
3. and there is a an error message `(node:2116) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated`

I am trying to get this working because I don’t mind usign laragon and http setup for my development.

My new Config file looks like.

```
{
  "entry": {
    "main": [
      "./scripts/main.js",
      "./styles/main.scss"
    ],
    "customizer": [
      "./scripts/customizer.js"
    ]
  },
  "publicPath": "/wp-content/themes/[theme folder name]/dist",
  "devUrl": "http://theme.test",
  "proxyUrl": "http://localhost:3000",
  "cacheBusting": "[name]_[hash:8]",
  "watch": [
    "app/**/*.php",
    "config/**/*.php",
    "resources/views/**/*.php"
  ]
}
```

---

## Post 10 by @Bhanu_Kumar_Singh — 2020-07-17T11:34:30Z

I fixed this by using bedrock with Laragon.

I followed [this article](https://ewebdesigns.com.au/how-to-add-bedrock-to-your-wordpress-work-environment/) to set up my local environment on laragon.

Then I cloned my old theme repository.  
Ran  
`yarn`  
`yarn build`  
`composer install`

I updated the devUrl and then

`yarn start`

---

## Post 11 by @system — 2020-08-27T14:16:48Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
