Heroku CLI throws an error whenever I try to do anything: "Please specify a version along with Heroku's API MIME type"
Asked Answered
C

5

14

As of this morning, without having change anything in my Heroku CLI setup, I received the following error when I tried to run: heroku logs -t -app <app_name>

! Please specify a version along with Heroku's API MIME type. For example, Accept: application/vnd.heroku+json; version=3.

I have since tried updating both heroku and heroku-toolbelt via brew upgrade heroku and brew upgrade heroku-toolbelt, but this did not solve the issue.

I get this error essentially whenever I try to do anything with heroku CLI, including heroku logs, heroku apps, heroku login, and heroku auth:login.

I am running MacOS, and the error posted is the only information that I am getting back from Heroku.

This discussion here: How can I specify heroku's MIME type? pertains to upgrading Heroku in Ubuntu and does not solve my issue.

Countermeasure answered 24/7, 2017 at 16:15 Comment(7)
I would also be open to any suggestions for fixing my current Heroku installation .Countermeasure
UPDATE: I was able to fix this issue by uninstalling an old version of the Heroku gem that was interfering with heroku-toolbelt. Hopefully this might help someone in the future.Countermeasure
What is the name of Heroku gem you unintalled? I just installed rails, and I am having the same problem, but I don't see a heroku gem in my gemlist.Freon
@user1023110: You may need to uninstall pgbackups-archive or any other gem that includes heroku as a dependency (look in your Gemfile.lock)Countermeasure
Doesn't look like I have any gems with heroku as a dependency unfortunately. at least there is no pgbackups or any other gem that is called "heroku" in gemfile.lock. I think is some kind of issue with RubyMine which is the dev environment I use.Freon
I'm getting this same error in my attempt to push to heroku using the paratrooper gem (recent occurrence of this problem). So to avoid this error for now, I'm bypassing paratrooper and just using git push origin master and git push staging master. I don't have the CLI installed on my machine.Papen
ah, @matt clued me in. I had to update paratrooper to v3.0.2 and the error went away and deployed as usual.Hatten
R
10

I had the same problem -- but installing the new Toolbelt did not work at first. There was one other step I needed to do.

from: https://devcenter.heroku.com/articles/heroku-cli

It has instructions for each platform on installing the new cli -- and says you need to run: which heroku in order to verify the proper version is running. In my case I also needed to do a gem uninstall heroku in order to get everything working, as it was running the gem binary instead of the newly installed heroku-cli binary.

Road answered 1/8, 2017 at 23:23 Comment(0)
D
2

If you were using heroko Plugin for intellij

I tried alot to make it work !

From here official response

@emzeidan thanks for the report. This plugin is deprecated, and uses an old version of the Heroku API that has been shut down. Please recommend to your users that they use one of the alternative deployment mechanisms described in our DevCenter article on WAR deployment. If you can remove from the plugin from any Bamboo marketplace (or similar thing) that would be helpful too. Thanks.

This was on Sept-2017

Despiteful answered 30/11, 2017 at 15:23 Comment(0)
S
1

I run the 'heroku --version' command and the toolbelt automatically updates the client. After that the login was ok.

Shipman answered 28/7, 2017 at 6:38 Comment(2)
Hmm. Interesting. I tried updating Heroku / Heroku Toolbelt through homebrew, but it didn't help the situation. I am surprised that heroku --version automatically updated the client. I'll have to look into that.Countermeasure
Yes, weird, I still had warnings when downloading source code with 'heroku git clone'. I noticed that I had the toolbelt installed twice, with and without brew, so uninstalled the toolbelt with: rm -rf ~/.heroku and sudo rm -rf /usr/local/heroku/usr/bin/heroku And after that I did a brew link heroku to link the brew installation to the path. Maybe is this happening to you?Shipman
G
1

I had the same problem on macOS Sierra 10.12.3 when I installed heroku via brew.

To get round it I ran brew uninstall heroku-toolbelt then installed via the Mac installer at https://devcenter.heroku.com/articles/heroku-cli#macos and it works fine now.

Groundless answered 14/8, 2017 at 21:39 Comment(0)
S
0

Have you specified the heroku gem in your Gemfile? If yes, then remove it.

And then, install Heroku CLI for https://devcenter.heroku.com/articles/getting-started-with-ruby#set-up and run your command.

Stinko answered 5/5, 2018 at 11:23 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.