Unable to troubleshoot heroku log message No web processes running - heroku

I pushed my flask app to Heroku and I'm trying to connect through my frontend for the first time. I was getting a 503 Error and did a heroku log which revealed
desc="No web processes running".
I double checked my Procfile, deleted it, saw that git was noticing the changes to the file, made sure there was no extension to the file, then recreated it and pushed it back to heroku and ran heroku ps:scale web=1 but I'm still getting
Couldn't find that formation.
Is there anything else I should try?
This is what I have inside the Procfile web: gunicorn manage:app. I'm creating the Procfile on TextEdit, could that be causing the issue?

This might be obvious to others, but it took me a while to figure it out. I was using TextEdit on my Mac to create the Procfile. I made sure to delete the extension after creating the file. Apparently, thats not good enough. I went into google drive and created a Procfile.txt then downloaded it to my apps root directory and removed the extension. Pushed the changes and ran heroku ps:scale web=1 and it worked.

Related

Heroku won't recognize Procfile in dynos at dashboard

Im trying to host my object detection api on heroku but i can't due to it not recognizing my
Procfile, which is a file and not a text file. the way its spelled is Procfile, its contents are
web:gunicorn app:app
the way i know that its the Procfile thats the problem is because when i run bash and look at the root directory of the heroku git i see Procfile but when i look at the logs i see that no web process is running and on the dashboard the dynos is completely empty.
i've tried doing
web: gunicorn app: app instead of web:gunicorn app:app
to no avail, i've made sure that gunicorn is in the requirements.txt and know that its pip installing the requirements.txt as the cmd tells me that it is when i do git push heroku master. i've tried doing echo>Procfile and then modifying the contents of the file. i've tried both echo "web:gunicorn app:app"> Procfile and echo web:gunicorn app:app>Procfile i tried doing heroku ps:scale web=1 and get Scaling web dynos... failed ! No such process type web defined in Procfile. and when i do heroku ps i get nothing

How to view heroku logs when running an app locally?

I'm running my heroku app locally using heroku local web with this being the only line in my Procfile:
web:node index.js
How can I get it to print live logs while running locally?
I found this answer, but there are some things missing from that explanation, and I'm struggling with it, since I'm new to heroku. Any help is appreciated.

Prevent Heroku from starting a web dyno

I'd like to configure a Heroku app to run a scheduled task once per day. My source tree looks like this:
bin/myScript
Procfile
package.json
When I deploy the app, I see the following error:
2017-01-11T04:31:36.660973+00:00 app[web.1]: npm ERR! missing script: start
I believe this is because Heroku tries to spin up a web dyno. I don't have a web dyno, nor do I want one. So I created a Procfile with this line:
heroku ps:scale web=0
To prevent heroku from spinning up a web dyno. That didn't work. What else can I do to prevent my app from crashing upon deployment? Does it matter if the scheduled task is going to be run in a separate one-off Dyno anyway?
You should not have the line "heroku ps:scale web=0" in your Procfile.
Doing so tells heroku to create a process type called "heroku" that attempts to run the following command on any dyno instances instantiated for it: "ps:scale web=0". That would probably generate errors, and at any rate, is not what you intended.
Instead You should run "heroku ps:scale web=0" as a Heroku toolbelt CLI command (or do the equivalent from the Resources tab of the GUI, as you already did).
I think I found a fix: in the "Resources" tab of the GUI for the web, there is a list of dynos with on/off sliders next to them. I switched the web dyno slider to off, and now when I deploy there is no crash. Still, it's unclear to me why the Procfile line was insufficient.

Brand new AngularFullstack app won't deploy to Heroku

I'm having trouble deploying my app to Heroku. I don't have this issue with an app I started several months ago so I think it must be something wrong with the lastest Angular Fullstack. After several hours of trouble shooting I decided to start from scratch just to see if AngularFullstack would deploy if you create a completely fresh app in an empty directory.
I created the app in the terminal with:
yo angular-fullstack
Without doing anything else I deployed the app to Heroku by typing this in the terminal:
yo angular-fullstack:heroku
Finally I went to the Heroku webaddress and I get the following "Application Error":
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
When I look at the Heroku logs I get the exact same error I was getting in my finished project:
Error: ENOENT, no such file or directory '/app/dist/public/favicon.ico'
I've tried putting this file everywhere in my directory structure. There is no 'dist' in directory structure of the new app. I put this directory in the old app with grunt serve:dist but that doesn't fix the problem of locating favicon.ico even though it is there in the public folder. There is no 'app' directory at the top however and it begins looking all the way in my Mac 'User' path. I think this part of the problem that I don't know how to fix.

Heroku procfile "No such process type web defined in Procfile" error

This is the first time I've used Heroku, and the fact that I can't find anyone in Google with a similar error to this means I'm likely doing something way wrong:
I'm following the basic Heroku setup guide here to get my NodeJS application deployed to the web. I'm deployed and trying to check my dynos with:
heroku ps:scale web=1
However, when I do this I get the error:
Scaling web dynos... failed
! No such process type web defined in Procfile.
When I run heroku ps I get nothing returned.
In my app's root directory, I have a file named Procfile (with no extension) which contains:
web: node app.js
The app runs locally without any issues (using foreman start).
Question is why is this occurring, how do I remedy it, should I even care?
Processes to be run on Heroku are defined in a simple text file called: Procfile
The Profile contains a line that defines how each of the processes in your application will run. This will be language specific and examples can be seen on the Heroku Devcenter Procfile article
Please note that the Procfile must be spelt exactly, with the first letter capitalized an all others lower case. There is no file extension for the Procfile. This Procfile should be placed in the root of your project and committed to your local git repository before doing a git push heroku master.
Should you mis-type the filename after it has been added to git, you can rename it using git with the command
git mv ProcFile Procfile
The renamed file will be staged so you can commit the changed file with the command
git commit -m "corrected name of Procfile"
I found the solution myself, from here: https://stackoverflow.com/a/7641259/556006
I had the same problem and I just now I found what was wrong. I first
accidently called the file ProcFile instead of Procfile. Simply
renaming that file did not get picked up by git. I had to do a git rm
ProcFile -f first and then add a new (correctly named) Procfile. After
that, it got pushed correctly by git and got picked up correctly by
Heroku.
I just had this issue myself, but in my case, I was missing a space between web: and the starting command in the Procfile.
For example, I had it wrong this way:
web:gunicorn run:app
Fixed it by adding a space after the colon:
web: gunicorn run:app
I am guessing you've never done git push heroku master -- that is, Heroku has never seen your code.

Resources