Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Couldn't find that app." when running heroku commands in console

I'm trying to run commands for my heroku app in my console, but it keeps telling me "Couldn't find that app." even though when I run heroku apps in my console it tells me I have one app called worldofwarcraft-api

So heroku recognizes my app in the apps list, but I can't run any commands to access it. The line I want to run is

heroku ps:scale web=1 --app worldofwarcraft-api

I'm trying to troubleshoot why my API returns a 503 when I try to make a GET request to it. This is the fix the heroku faq told me to try, but it's just telling me it can't find my app.

I'm wondering if it has something to do with the fact that I deployed my API from github, rather than running the heroku setup in my console. I don't know if that would effect my ability to run heroku commands on the app in my local console.

Apologies if my formatting is off a bit. I'm still getting used to this site.

like image 792
Patrick Conboy Avatar asked Nov 30 '18 05:11

Patrick Conboy


5 Answers

In my case, someone renamed GitHub repo and I tried to find Heroku app with new GitHub name

It helps me

heroku apps
heroku git:remote -a YOUR_APP
like image 158
Yegor Zaremba Avatar answered Oct 06 '22 03:10

Yegor Zaremba


Solved it. Just sharing for future searches.

The issue was fixed by running git init and then heroku git:remote -a worldofwarcraft-api in my command line while inside my repositories folder. This initialized git in the repo and then set the heroku git remote to that repository.

Hopefully, this helps anyone else who had a similar issue.

like image 23
Patrick Conboy Avatar answered Oct 06 '22 04:10

Patrick Conboy


Just an easy way to solve this issue:

1st: Add the command into your terminal: $ heroku apps

If you already logged into your heroku account from your terminal, all your apps will appear as a list like this:

your-project-name-1
your-project-name-2  
your-project-name-3
your-project-name-4

2nd: Then chose which one you are needing to connect with the following command:

$ heroku git:remote -a your-project-name-2

If you've done the connection properly you'll receive the following output:

set git remote heroku to https://git.heroku.com/your-project-name-2.git

like image 23
Elias Prado Avatar answered Oct 06 '22 03:10

Elias Prado


For my case, I was renaming my github repository.

You can find it in your repository settings then just rename it, it appears in the first place.

Then you can continue with git init again to re-initiate your existing git repository and then set your heroku remote with your heroku apps new name heroku git:remote -a YOUR_APP_NAME

like image 30
Yodi S. Avatar answered Oct 06 '22 02:10

Yodi S.


If the app belongs to a team that you participate in, you have to specify the team option in the commands to see the app:

E.g:

heroku apps -t <team name>

or

heroku ps:scale web=1 --app worldofwarcraft-api -t <team name>
like image 31
Holger L Avatar answered Oct 06 '22 02:10

Holger L