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

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

Related

Error: could not handle the request comes up when I deploy firebase from my local

On firebase console, it says my files are successfully deployed but in actual web page, it is just a black page with one senetence "Error: could not handle the request"
i did not started this project i am working on, and i have no idea what to do.
BTW, no errors are loged in firebase-debug.log
All things are clear, except for the web page.
As far as i know, this is based on Next.js, if you would care to know.
I opened up the file from the root folder, used "cd (myfilename)" command to go into the actual project, and then executed firebase deploy.
I googled thousands of times, and I doubted these:
node js version problem?
os problem? (i work on Window, and the first start was from Mac)
number one i solved. number two? i dont know.
Please help me out if you have any idea or can guess why this happens.

really new to meteor, and trying to deploy website to galaxy, but its not working

So I just got into meteor like a month ago, and I just finished my first website after about 2 weeks. Its a social media website kinda like twitter. I also downloaded accounts-ui and accounts-password packages, and I implemented them in the website pretty loosely. But heres the thing, I wanna deploy the website to galaxy using the subdomain .meteorapp.com, and it just doesn't seem to work. I keep getting the same error in the logs which is: "Error: MONGO_URL must be set in environment". I looked it up, and I just dont know what to do. from what I read online you need to make a settings.json file, then add this code:
"galaxy.meteor.com": {
"env": {
"ROOT_URL": "http://blueslipgang.meteorapp.com/",
"DEPLOY_HOSTNAME":"galaxy.meteor.com"
"MONGO_URL":"mongodb://127.0.0.1:3001/meteor"
}
}
so thats what I did, and i added this file to the client file, the server file, and even inside no file. I just cant seem to get the website to deploy. I really wanna deploy this website so me and my friend's can use it, but its just not deploying.
so what am I doing wrong, and what do I need to do to fix it. Any help would be really, really appreciated, I worked pretty hard to make this app, and it would really suck if I cant even deploy it.
Thank you
Galaxy doesn't provide a MongoDB service, so you will need to sign up for a MongoDB account (Atlas has a free tier) and use that. Setting the MONGO_URL to localhost/127.0.0.1 will throw an error on launch.
Also, to use the settings.json when deploying, you will need to make sure you have the --settings flag set in your deploy command:
DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy [hostname] --settings settings.json
Also have a read through the official galaxy guide
If you have ongoing problems, I suggest posting on the Meteor forums and the community can help step by step with each issue you run into

How to stop meteor.js app refreshing constantly

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?

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 android build version

I have a strange issue. I build my Meteor app and run it on android device using -
meteor run android-device --mobile-server=<my_aws_ip>:3000
When the app deploys immediately it connects to the server (and my javascripts etc works). After a few seconds, the page refreshs and none of the javascript callbacks work. Please help me debug this issue.
More information: If I change the client (and not the server), and deploy it, for the first few seconds, the changed client gets shown on the phone. After the first few seconds, the version which is present on the server is shown. So I think Cordova or Meteor is trying to fetch the client code from the server, which is breaking the app. Is there a way to prevent this behavior?
Even more data points -
My aws code does NOT have android and ios platforms installed. Because of this, I think the cordova plugins are not installed, causing a JS break somewhere.
Easiest fix I can think of is remove cordova autoupdate. This is being added by meteor-platform package. If I clone meteor-platform and comment out the cordova autoupdate, the app doesn't load.
Is there another way of removing autoupdate?
This sounds like you have a different version of your app deployed at the mobile-server address.
The local code is run in development mode. Your AWS one is likely in production mode (and may contain a syntax error).
When you run your app it sees the code is different and fetches the new/old (different) version with a hot code reload - hence the page refresh/flash.
To fix this, you need to find the syntax error in your code. It's best to view the ADB logger or run with meteor run --verbose android-device ....
This will provide a bit more information such as an Uncaught exception: cannot read .. of null error type error.
It's hard to say what the error is. The error prevents the rest of your code from executing. In production mode the entire project is one JS file. If there is an error of any kind half way along the file, the rest of the file will not execute.
Also, try loading <my_aws_ip>:3000 in your browser and watch for JS errors in the JS console.
You can also run it locally with --production to simulate a production build environment locally.
Enabling autoupdate but without a page refresh:
Reload._reload = function (options) {
console.log("Next load will load new version");
};

Resources