How to stop meteor.js app refreshing constantly - meteor

My relatively simple meteor app has got into the state where it refreshes constantly on load. This means you can't use the app at all. I have tried the following:
meteor reset
meteor update
reinstall meteor
restart computer
reverting to old versions of my code that are known to be good
In all cases, navigating to localhost:3000 will show the page and then immediately start a page refresh loop.
Since even very old versions show this behaviour, I am guessing it is something about meteor, not about my code but I have no idea where to start looking.
So my question is, what things might cause a meteor (1.4.1.2 and 1.4.1.3 both tried) app to get into a constant page-refresh loop?

Related

Unless I use ModernHttp, my app is always deadlocked at the end.(Xamain.Forms-iOS)

I'm making app with using Xamarin.forms pcl.
Unless I use ModernHttp, my app is always deadlocked at the end.(Xamain.Forms-iOS).
It works fine for a while, but few hours later, every 'await' call does not back to its place.
This is a deadlock, isn't it?
My app has tons of http request call and it could be called at the same time sometimes.
This is very weird and serious problem for my app.
The problem is ModernHttp is out of date, which means the creator doesn't update library anymore.
Maybe because of that, I'm experienced some problem with using ModernHttp. For example, UriImageSource sometimes does not load the image from web. (Works fine with built-in HttpClient)
Any tip for me?

Stuck at "Client modified--refreshing" on Terminal after Code Refresh

I installed Meteor (p.s I'm new to app developement) onto my laptop (running Windows 10) and have created an app for which I have downloaded packages for (materialize, accounts-ui and passwords). The problem that I'm facing is that whenever I make changes to the html,css or js files, I get "client-modified" on my terminal, but it never actually refreshes. It's just stuck there in a loop after no matter how many modifications I make. Is this due to the current Meteor version I have installed (1.2.1)?
=> Client modified -- refreshing
This happened to me also, yesterday and today, that's how I found this question.
My observations are:
check if the app is running and working despite the apparent hang. If it does, try making a simple change in a html or template file and see if the app auto-updates. It did for me, but your mileage may vary.
If it gets too annoying, you can always just kill and restart the app. Shouldn't take too long. Check if this improves the situation.
If 2. does not help you may try "meteor reset" to clean things up, but ONLY if you just started developing your app and don't care about losing any app data (MongoDB get's wiped along with the rest of the /.meteor/local folder)
Hope the above helps...
Norbert

Meteor File Change Watcher is taking too long to recognize changes

My Meteor file change watcher is taking forever to detect my file changes and refresh the browser, sometimes even longer than a minute. This makes developing a real pain.
My Meteor is running inside an Ubuntu-VM. The projects folder lies in my OSX and is mounted inside the VM. So I'm aware that inotify/kqueue won't work, so Meteor should fallback to stat polling.
I even set the environment variables according to this post, but the behavior is still the same.
METEOR_WATCH_FORCE_POLLING=true
METEOR_WATCH_POLLING_INTERVAL_MS=500
Is there any way to fix this annoying behavior?
The folder from OSX is mounted as a nfs share btw.
Update:
I did some testing and there is no difference if the application has a big amount of packages or is taking long to build, even with the very basic app you get after meteor create I still get the same behavior.
If I change a file in the VM (so that inotify works) the refresh is happening instantly.
I've have apps in production that incrementally become slower when adding packages, both 3rd party and private packages. I also discovered that adding 3rd libs directly on the client/lib increases the reloading time.
I'm not sure if Meteor 1.0.2 actually solved the problem of watching the directory efficiently.
What version of Meteor are you using?
Much of this lag-reloading issue was addressed on Meteor 1.0.2. While it still takes some time, I would say was ~5x faster on my experience.

Meteor app "breaks" when deployed (wrong login parameters, gets stuck in requests)

I have created my first meteor app today and am kind of stuck. Everything works extremely well on localhost:3000, very responsive etc. It is a simple task app, where users can post tasks to a feed that displays all tasks an then claim those tasks, removing them from the general feed and putting them into their personal feed. But when I deploy it to a meteor.com server, everything breaks.
This is the js file
https://github.com/valentin-zambelli/brokenjs/blob/master/mvp.js
Accounts.ui.config({
passwordSignupFields: "USERNAME_ONLY"
});
gets ignored and whenever I try to post a new task the page reloads, getting stuck on app.meteor.com/?text=some+new+task and doesnt display the task in the general taskfeed.
I have removed the insecure and autopublish package. Is there anything I am missing here? It kind of seems as if it uses an older, broken build. I also get the ReferenceError: Can't find variable: require when deploying, but I can't really figure out where this is coming from.
I hope someone can help me.
Ok, it was an insanely stupid mistake on my part: The mongodb was still in an older state and caused a conflict. If you have problems deploying your meteor app try
meteor deploy myapp.meteor.com -- delete
This will delete all resources on the server, including the database. Then do a simple
meteor deploy myapp.meteor.com

Meteor.js - randomly everything is 'undefined' -- why?

So I'm working on my Meteor project and all of a sudden everything stops working and my console reports that everything is 'undefined'. See screenshot. Why does this happen? Usually things will just randomly start working again after I reboot my machine or go get lunch.
This can happen if you have a hot code reload during when the page is loading from a previous hot code reload.
Your browser will eventually reconnect to the server, reconnect & refresh the page. In the case above it looks the the bit of Js that connects to the server doesn't get loaded to begin with (the DDP bit) so it doesn't behave as normal. If it reconnects it can fix it self by refreshing.
It's very hard to tell what exactly is causing it from the information you've given. I'd look at custom packages that replace core packages or some kind of of package you have that runs early on in your code that would stop the normal loading of a project.
If you're using meteor on windows there are a couple of bugs that do this too. I'm not sure how to get past those besides doing Ctrl+C to stop and then using meteor to start the project again.

Resources