Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrowserSync hangs #855

Closed
miohtama opened this issue Jan 13, 2020 · 8 comments
Closed

BrowserSync hangs #855

miohtama opened this issue Jan 13, 2020 · 8 comments
Labels
bug: dependency A problem in one of Eleventy’s dependencies

Comments

@miohtama
Copy link

miohtama commented Jan 13, 2020

Describe the bug

After editing the files, BrowserSync kicks in. However, it hangs on "Reloading Browsers...."

Even CTRL+C does not terminate npx process and it has to be externally killed.

kill %1

or sometimes even

pkill -SIGKILL -f npx

To Reproduce

I am starting serving with npx eleventy --serve

This is not 100% reproducible. It happens regularly on one specific OSX installation I have.

Expected behavior

BrowserSync does not hang the process.

Screenshots

image

Environment:

  • macOS 10.14
  • Eleventy Version 0.10.0
  • Chrome, version: 79.0.3945.117
│ ├─┬ browser-sync@2.26.7
│ │ ├─┬ browser-sync-client@2.26.6
│ │ ├─┬ browser-sync-ui@2.26.4

Additional context

BrowserSync usually hangs after 2-10 loads. The first load is good.

Using configuration from https://github.com/11ty/eleventy-base-blog

I suspect this is system/configuration issue, as I have not yet encountered the issue on my another Mac.

With BrowserSync log level setting to debut you get one additional line of info before hang

[Browsersync] Reloading Browsers...
[Browsersync] Browser Connected: Chrome, version: 79.0.3945.117
^C^C^C^C^C^C^C^C
@miohtama
Copy link
Author

As a workaround I run npx eleventy --watch, then start a Python server python -m http.server in dist older. The downside is that I need to manually hit reload in Chome every time I want to see updates.

@zachleat
Copy link
Member

Hmm, does browser-sync do this independently? A quick look at their issue tracker reveals a few related issues https://github.com/BrowserSync/browser-sync/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+hang

Dunno if this will be an Eleventy issue or a BrowserSync issue

@zachleat zachleat added bug: dependency A problem in one of Eleventy’s dependencies and removed needs-triage labels Jan 18, 2020
@miohtama
Copy link
Author

I have new information. I noticed that Karma tests that were firing up Chrome hung on the same computer in a totally unrelated project.

I suspect this is a Chrome-based issue. I will try to get lucky and guess the dependency or condition causing this.

@mvolkmann
Copy link

I am able to use ctrl-c to kill the server, but the browser never reloads on its own after changes. I can see that the site gets rebuilt automatically, but I have to manually refresh the browser. It seems Browsersync isn't working.

@jasonday
Copy link

jasonday commented May 13, 2021

I get this same issue. Browsersync will load 2-10 times, and then hangs...stuck. I've tried passing in additional options such as reloadDebounce and changing the browser to Firefox, but it persists.

Note: Occurring on both MacOS and Windows. In my case, I'm using it with 11ty and axios to pull data in.

@alex-bukach
Copy link

I face the same issue.

@robinrendle
Copy link

Getting the same problem, too. Except mine hangs on Watching... and 11ty is definitely doing its job of building the site.

@zachleat
Copy link
Member

Because this is a third-party dependency issue, superseded by #1305 in Eleventy 2.0, I’m going to unfortunately close this one. If it’s still a problem with the new @11ty/eleventy-dev-server, please open a new issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: dependency A problem in one of Eleventy’s dependencies
Projects
None yet
Development

No branches or pull requests

6 participants