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

Sometimes project keeps reloading on Meteor 1.6-beta.15 #8988

Closed
SimonSimCity opened this issue Aug 7, 2017 · 2 comments · Fixed by #9007
Closed

Sometimes project keeps reloading on Meteor 1.6-beta.15 #8988

SimonSimCity opened this issue Aug 7, 2017 · 2 comments · Fixed by #9007
Assignees
Milestone

Comments

@SimonSimCity
Copy link
Contributor

SimonSimCity commented Aug 7, 2017

I sadly can't say that much about this problem, but maybe someone who also had this can step in:

I've updated Meteor to 1.6-beta.15 in the hope I could escape from #8648. It also works quite well ... just once a day (maybe after the 50th reload for testing) I suddenly see that the project keeps rebuilding itself and doesn't finish until I again change a file.

Here's exactly what I do and see:

  1. I start the test environment of meteor (meteor test --settings settings-test.json --driver-package practicalmeteor:mocha --port 3100 --verbose)
  2. After the app is initialized, I open http://localhost:3100/ in my browser, which reloads every time I change the code and the app is rebuilt.
  3. After a couple of changes (have now worked 3h without any problem) - maybe 50 changes - I change a file and see that the site for running the tests loads abnormally long.
  4. Watching the console I just see Local package version is up-to-date: '[...] running over the screen. In order to get more output (since the meteor-tool often overwrites it's last line on the console) I hold down the ENTER key to get a better overview over what happens.

Here I see the following (after removing duplicated and empty lines):

     Downloading missing packages              \
  Local package version is up-to-date: xolvio:backdoor@0.2.1
  Local package version is up-to-date: xolvio:cleaner@0.3.1
     Building the application                  /
     Building for web.browser                  -
     Building the application                  /
     Building for os.osx.x86_64                -
     Building the application                  \
     Reading project metadata                  -
     Scanning local packages                   \
     Preparing project                         \
  Local package version is up-to-date: accounts-base@1.4.0-beta.15
  Local package version is up-to-date: accounts-password@1.5.0-beta.15
     Downloading missing packages              \

To me it now seems that something either in os.osx.x86_64 or Building the application fails, because if I stop meteor and start it into test-mode I get the following order:

$ meteor test --settings settings-test.json --driver-package practicalmeteor:mocha --port 3100 --verbose
     Selecting package versions                /
  [[[[[ Tests ]]]]]                             
  => Started proxy.                             
  Local package version is up-to-date: accounts-base@1.4.0-beta.15
  Local package version is up-to-date: accounts-password@1.5.0-beta.15
  Local package version is up-to-date: [...]
  Local package version is up-to-date: xolvio:backdoor@0.2.1
  Local package version is up-to-date: xolvio:cleaner@0.3.1
     Downloading missing packages              -
     Building local packages                   \
     Determining active plugins                -
     Building the application                  \
     Building for web.browser                  -
     Building for os.osx.x86_64                |
     Starting your app                         \
  => Started MongoDB.                           
     Starting your app                         |

Anyone having an idea of how to go on debugging? I'm quite assured this error will come again in a few hours.

An interesting fact though:

If I now change a file (and thereby cause a new project-build), the current attempt is aborted and the next one will get through.

@SimonSimCity
Copy link
Contributor Author

Sounds related to #8942, but the fix for this was already in Meteor 1.6-beta.15 ...

@benjamn benjamn added this to the Release 1.5.2 milestone Aug 11, 2017
@benjamn benjamn self-assigned this Aug 11, 2017
benjamn pushed a commit that referenced this issue Aug 11, 2017
Should fix #8988 and #8942.

Now that #8866 is the default behavior, it can take up to 5000ms for
changes to files modified during the build process to be noticed.

Before #8866, when we called e.g. files.writeFile(path), a native file
watcher would notice the change immediately, almost always before the
build process read the file again. This was definitely racy, but we were
getting away with it consistently... until #8866.

I was able to reproduce the problem in #8988 by running

  echo some-local-package-name >> .meteor/packages

in an app with a local package of the given name. After debugging the
endless rebuild cycle, I found that .meteor/versions was being rewritten
by files.writeFile during the build process, but the file watching system
was not noticing the change in time to prevent watch.isUpToDate from
returning true. The change was finally detected when restarting the
Watcher responsible for .meteor/versions, which of course triggered
another rebuild, so the same problem kept happening again and again.
@crapthings
Copy link

i've found this still happend with METEOR@1.6-beta.23

the process is running, and i just meteor npm i -S a module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants