-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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 keeps refreshing #8275
Comments
Do you mean it reloads "normally", and at some points it gets out of control? I've never experienced this, it might depend on the OS (as BrowserSync looks at the modified files to know when to reload), which OS are you using? |
thanks. sometimes it reloads normally but often it keeps reloading just when it is ready, before i can do anything, it reloads again and again and again. it worked fine some weeks ago but it seems to get worse (or i lose my patience). i think it worked before i upgraded to from 4.* to 5.* My os is ubuntu 18.04 and it happens on both firefox and chrome (chromium). it seems to go away when i close the tab and reopen it. |
We use the browsersync-webpack-plugin to use browsersync and we do not have access to the browsersync configuration... @tibistibi does this happen on a big project ? Are you stuck in an infinite loop or it just reloads "too much" ? |
I also experienced the same thing, The browser has infinite refresh. The solution is to downgrade webpack-dev-server to version 3.1.4 and browser-sync to 2.24.4 |
thanks for the info i see in package,json
so i will look into this line to find some solution. |
following @eapriansyah advise i changed in package.json this:
than run just did a quick test and it seems better now. will keep an eye. strange only some of us have this problem |
@tibistibi @eapriansyah : it probably depends on how big your project is. That's why feedbacks like you did, are very very important for the project. Thank you very much. As downgrading resolves the issue, I think we should do more tests and why not doing a PR. |
thanks! i will test it tomorrow and will give feedback. |
@pascalgrimaud, For projects with entities less than 50, the configuration in version 5.3.1 is not problematic. |
Thanks so much for all this, as @pascalgrimaud wrote we can't do this without all this help!!! |
I have seen this issue. May be it happens only in Linux, its definitely
browsersync and not webpack dev server. It happens a lot especially if you
are debugging. I was mostly using webpack dev server directly and forgot
about this.
…On Tue, 11 Sep 2018, 11:03 pm Julien Dubois, ***@***.***> wrote:
Thanks so much for all this, as @pascalgrimaud
<https://github.com/pascalgrimaud> wrote we can't do this without all
this help!!!
As soon as this is solved I'll do an emergency patch release, as I guess
this affects many people.
@tibistibi <https://github.com/tibistibi> do you want to do the PR so you
are the author?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8275 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABDlF6k9fiiS3rQiJO-Pv9_cmWaXah0bks5uaCUOgaJpZM4WjMxu>
.
|
i can but will check tomorrow if it is resolved it @eapriansyah wants to be owner that is offcourse fine too 😄 |
it happens to me that it reloads serval times and I just reload it manually after a few times, haven't take the time to wait to see how many reloads it does. I'm using mac. I'll try it today and check if it loops |
it seems more people have this issue than i expected. package.json this:
than run i will changed today and make a PR. the problem is how do we make sure it will not happen again, we can not make a test for it. probably just have to remember this issue.... (first bring kids to school ;) ) |
i have changed both angular and react package.json files i only use angular so react is a guess but think it is wise to keep them in sync. |
instead of downgrading, can you try the resolution provided on BrowserSync/browser-sync#1595 to see if that fixes your issue. If yes, then, you can update PR to add those configurations. |
@vishal423 i wanted to get the problem out of the way first. i'm now testing 3.1.8 to see if that works and will check if there is an newer browser-sync as well |
@vishal423 check your link, but jhipster does not seem to have any config (or i'm not aware of it). do you know how it could be configed? |
can you try configuring in below block present under
|
@vishal423 thats already in. the problem for me now is i can not get the reload loop back. so testing anything is unreliable. |
do you mean that resolution provided in that ticket doesn't fix your issue? Above block shows current configurations and you need to append below configuration to check if that fixes your issue (default timeout is 5 second):
|
no i can't get the issue back so i can not test it |
maybe the rerunning |
and now it was back again. i had webpack-dec-server 3.1.8 and browser-sync 2.24.7 |
@vishal423, the change in webpack.dev.js, resolves the infinite refresh problem in the browser-sync version 2.24.6 and above. |
Fixed: Browsersync keeps refreshing #8275
I merged #8298 so I'm closing this ticket, as the solution to downgrade the lib works for you. But if someone has better solution, don't hesitate to do another PR, or comment this ticket. |
@pascalgrimaud, I think you should revert the merge as that's not the right fix. If you follow above comments, then, I have suggested the solution, which seems to work for @eapriansyah |
Ok sorry, I merged so quickly. |
This reverts commit 0486fcf
i will test it with the unreferted version |
@vishal423 i noticed when you referted angular and react have different versions of: "webpack-dev-server": "3.1.6", i think it is best to set them both to 3.1.6 |
or even set it to:
(i have that) |
@tibistibi , I only reverted your commit, which means they are now set to previous tested/working versions. Upgrade of individual dependencies can be taken as separate PR |
@vishal423 true for anyone stumbling by: in the example from eapriansyah there are spaces in the url which do not work, take them away if you want to use his example. do we need a separate issue for the different version in webpack-dev-server? the fix seems to work on my system, maybe a minute is a bit long but it works 👍 |
This reverts commit c2f3649.
I've stumbled upon this issue just now and have found a solution while reading it. It's caching problem. I've had this problem with, lets say Chromium. After switching to Firefox it went away but after a while I had it in both browser. Simple solution is to refresh with Ctrl+F5. |
I was facing same issue. When the project size was small it was't appearing, but as project grew, it started happening very often. @realcgslav I tried with hard refresh, browser cache clearing etc., but no luck. So it's not totally cache issue. As suggested by @tibistibi I did downgraded the webpack-dev and browserSync and it worked. Cheers for that! As @eapriansyah correctly said, for less entities it's not a problem, but for larger project, this indeed is the case. |
This solutions helped me, thank you guys! |
Same problem here! I have Thanks in advance. |
@anreig I think it's in the webpack config, we should have the BrowsersyncWebpackPlugin, you just have to remove it |
Yes, I just remove it and it takes a lot time too over 9060 port now. Each time I refresh it takes more or less 2 min. Any idea to solve this? I'm on a big anguar project. |
We did some improvements on the build time, do you use the latest JHipster version ? |
Overview of the issue
When starting the application with yarn start and editing some files often Browsersync keeps reloading.
Reproduce the error
run
yarn start
ornpm start
i think it gets worse after some changes.
Suggest a Fix
There seems some suggestions here:
https://stackoverflow.com/questions/37315302/gulp-browsersync-causing-multiple-reloads-with-each-filechange:
browserSync.stream({once: true})
or
But i'm unclear where i could find the browsersync configuration in jhipster. Maybe someone has some pointers. Or solved this problem already.
Browsers and Operating System
Ubuntu 18.04 Firfox and Chrome
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.18.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
git version 2.17.1
node: v8.11.3
npm: 6.2.0
yeoman: 2.0.5
yarn: 1.9.4
Congratulations, JHipster execution is complete!
The text was updated successfully, but these errors were encountered: