I’m trying to use Browsersync (in proxy mode) with either Gulp or Webpack. (Have tried both repeatedly and on several sites). Configurations that used to work now will not open the localhost site. The new window opens up on start, but is completely blank (no source code) and nothing in the console.
Seems to be similar to the following issues -
I’ve tried several of the tweaks that I’ve found suggested here and in other forums to no avail. Is anyone else experiencing this?
Troubleshooting Questions
Does this happen for all sites in Local, or just one in particular?
All
Are you able to create a new, plain WordPress site in Local and access it in a Browser?
Yes
Replication
Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!
System Details
Which version of Local is being used?
6.6.0+6231
What Operating System (OS) and OS version is being used?
macOS Monterey
Attach the Local Log. See this Help Doc for instructions on how to do so:
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
It definitely worked as late as last August '22, and I believe it worked in November '22 as well… (Looking back at the git repo for this particular project). Unfortunately, work on this site is fairly intermittent so I can’t pin it down to a specific Local or OS version.
I’ve attached the local logs. Let me know what else would be helpful! local-logs2.zip (124.9 KB)
Thank you for the follow-up and logs. I checked with the dev team on this, and in order to troubleshoot further they asked if you could provide some screenshots and sample commands. Essentially we need a bit more information to be able to replicate what you’re seeing and what may be causing trouble. Let us know if you can share more of those details and we’ll be happy to take a look and try to figure out any points of conflict.
It’s hard to know for sure what’s going on without seeing actual errors within the Browser console, but one thing I notice is that the gulpfile.js config is using https as opposed to regular http. My guess is that Browsersync is having issues connecting over HTTPS to the Local site.
I know that it’s possible to get Browsersync to work with an HTTPS backend, but I’ve always felt that it’s been finicky and more trouble than it’s worth. As a start, I would try making the site in Local be served over regular HTTP and then change the proxy value to use the regular HTTP protocol, like this:
Thank you for this! I was able to get it working using the regular HTTP protocol. It’s not a perfect solution, since sometimes there’s a need to work on HTTPS, but should be workable for now. Thank you!