Running into a strange 'error' to do with routing when deploying a Meteor app, both on meteor.com and on heroku. When the application is running locally, everything works fine. However, when the app is deployed - and I've tried this both on meteor.com's simple hosting and on Heroku - I get the default Iron Router setup page with instructions on how to set up my first route, even though the routes are defined correctly and work locally (screenshot below). This happens on all pages in the app.
Here's a screenshot of the page: http://i.stack.imgur.com/GlNd9.png
I ran into this recently may be able to shed some light on the issue.
If you are working fine in development but not in production then the first thing to do is run your development/local version like so:
meteor --production
This runs the local development version in production mode, as it does when deployed to Modulus, Heroku etc.
If you now get the iron router splash page locally you can be sure the issue is due to running in production mode.
Open up your site in Chrome (or your favourite browser) and look in the browser javascript console for errors... I had one in my client events javascript which I had recently changed.
If you have an error fix it then see whether your Meteor app now runs with the --production flag without showing the Iron Router page.
The splash page in my case was a red herring, masking the real error under the hood.
I haven't looked in depth into the difference between the development and production modes but it obviously handles errors differently so you get different behavior in the two modes.
Related
Basically i deployed a new AdonisJS app to Heroku, and the app itself works fine, all the migrations and functions of each controller, model and view work fine, the issue is that the style of the page, the size and the CSS are not showing or working properly. From what i searched, i need to use something called CDN and upload my styles there, but im kinda new in deploying apps, so i wondered if there was any other way to make the styles of the page show properly? I'll annex below the comparisson between the app running locally and the app deployed in heroku.
The first screenshot is from the app runnig locally on my laptop, the one below it is the app deployed on heroku
Any help or insight would be very appreciated, thanks for your time.
I am getting this error on the client side in browser web application.
Unexpected error.
This appears in a totally white blank page in the browser on the top left corner when I access my web application.
It appears occasionally. There is no error in the Meteor Server Console or in the browser console. It can't be reproduced either.
Whenever this error appears, none of my client apps (Android, iOS, web app) work, when they are connected to this specific server. The server shows that it's running but it does not. When I restart Meteor Server, then it starts working fine, I get this error once in about two weeks, I don’t know what is causing this error, or how to debug this.
Any idea what is causing this issue? This is really critical, I have my Live Application running, and it should not crash like this. Please provide me with some solution or a way to debug. Thanks
Also are there any logs on my Meteor App which I can check? Plus I am running this App on staging with --production flag.
I'm new to Meteor and made a very simple meteor-based ios app for personal use and interest, which read data from MongoDB provided by Meteor. I have a quick question and I just want to make sure that I am not spending time on meaningless work.
What I have done is "meteor run ios-device", and it works pretty well that under the same network (wifi) the app on ios could read data from the localhost:3000 on laptop (Mac). Also, I have learned that it is easy to deploy a meteor app on my own server, just run "meteor build /path/to/buildFile --architecture..." and move the bundle to the server to set up; however, then I got confused about this: after the app is deployed to a server, is it possible that the app on ios also able to access to that server?
In short words, app ios works fine with localhost, so is there a way to make it works fine with web hosting so that the app does not need to connect to the same network as the host?
Note that I didn't purchase Apple developer account that could release app to AppStore, so I can only use "real machine debugging". Will this disallow me to make app on ios access the data from my own server?
Thanks for any advance!
Update:
I have successfully deployed my project on my own OpenShift server so that I could access it within any networks in browsers. So my point is how do I build an ios app for this project so that I can also access it in iPhone within any network. I have tired run "meteor run ios-device --mobile-server=[my own openshift server]:8000", and when I build the app for deploying I ran this "meteor build ~/some/path --server=[my own openshift server]:8000". This seems does not works. Still waiting for advance!
You are describing one of the main use case of Meteor.
Refer to:
Meteor Guide > Mobile > Configuring your server
Meteor Guide > Mobile > Building for production
To summarize:
When building your Meteor project, if you have ios and/or android platform(s), Meteor will require you to specify the --server option with the URL of the server where your Meteor server bundle will be deployed.
That way, your app will know where to connect to.
Note that you may not need to go through Apple App Store, as long as you do not need to distribute your app. You can simply use the Xcode project (generated by meteor build) to install your app directly on your iPhone.
I have a basic MVC project which I have published to a remote server. It loads correctly but for some reason there is a seemingly random issue regarding logging in, using the default mvc identity system.
Yesterday when I tested it on Firefox/Chrome/Edge it logged in fine on Chrome but took forever to login on Firefox and Edge and eventually timed out. Later I tried it at home on a different computer and all 3 browsers worked fine. Today I try it and Chrome has the issue but Edge and Firefox work. Today when I try it on my friends computer it works in Chrome but not Edge or Firefox.
I don't understand what could be the problem. The database is on one server, the site is hosted on another. If I run the project locally but with the connection to the remote server it works just fine on all browsers all of the time.
The server uses iis 8, I presume I must have configured something incorrectly. Can anyone shed any light on what I might be doing wrong?
Worth noting that I am using Applicationdbcontext for all of my models, one context in one database.
Also, project is running in release mode.
I used Meteor Up (MUP) to deploy my meteor app to a Digital Ocean droplet. I had some problems with deploying it the first time but I solved all of them and I got it working. I then made some updates to my app but when I deployed it again the page says "This webpage is not available". I have tried re-deploying the app on new droplets with different IP addresses but the same happens. I have run mup setup on each new droplet. It always says success for the setup and for the deployment but nothing shows up.
Can anybody tell me what I have done wrong?
It's likely there is some kind of error with your app, probably not related to deployment if it the issue occurs in the way your describe it.
You'll have to check your app's server side logs for a bit more info:
mup logs -f