502 error from browsersync

I can’t get browsersync to work whenever I go to the URL I get a 502 error.
There is nothing in /var/log/nginx/error.log or /srv/www/halsey44.com/logs/error.log when I run it. Does browsesync log error somewhere else?
I’ve tried everything suggested here again, no change

what’s the course of action here?

Browsersync is simply a proxy to your WP site. If your local development site is returning a 502 then it shouldn’t be related to Browsersync.

Do you have any hints for deeper investigation? I’m getting nothing from the logs.

Not sure. Shouldn’t happen on a clean install so try removing plugins/code you’ve written?

Might be some info in these threads? https://discourse.roots.io/search?q=trellis%20502

This only happens when I run yarn start not in my local dev. That works fine. Just to make sure I deactivated every plugin and switched to twenty nineteen theme to make sure that I wasn’t introducing something. Trying to access http://localhost:3000 always return a 502 error. I have tried increasing nginx buffers as suggested in one of the posts, even though local dev works fine no change. Also increased max_execution_time, nada.

Also looked at this post since this is a browserSync issue:

I increased the delay in webpack.config.watch.js as well as commenting out my js in case that was a problem. Still same error, with no logging anywhere as to direct me to what’s happening.

So if you run yarn start in your local development directory, everything works fine? Generally local development is the only context in which you should be running yarn start. What other context are you trying to run it it? On a production server?

yarn start doesn’t work. That’s where I get the 502 errors. If I got to halsey44.test (local dev domain) everything is peachy.

Have you checked the settings in your config.json? https://github.com/roots/sage/blob/master/resources/assets/config.json Double check those, especially the publicPath and the devUrl. As Ben said, browsersync is just proxying your site: if you can visit the dev URL fine, then the problem probably isn’t with Sage. Are you using Trellis for your dev environment, or something else?

my config.json:

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

It’s a trellis/bedrock/sage dev environment. Which is why this is perplexing me. I’ll try another clean install later when I get time.