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.

oktober
  • 153
  • 2
  • 8
  • I would also be open to any suggestions for fixing my current Heroku installation . – oktober Jul 24 '17 at 16:19
  • 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. – oktober Jul 24 '17 at 16:46
  • 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. – GGizmos Jul 25 '17 at 07:07
  • @user1023110: You may need to uninstall `pgbackups-archive` or any other gem that includes heroku as a dependency (look in your Gemfile.lock) – oktober Jul 25 '17 at 15:18
  • 1
    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. – GGizmos Jul 25 '17 at 20:03
  • 1
    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. – Matt Aug 03 '17 at 21:13
  • 2
    ah, @matt clued me in. I had to update `paratrooper` to `v3.0.2` and the error went away and deployed as usual. – CoderDave Aug 14 '17 at 01:25

5 Answers5

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.

Kem Mason
  • 1,548
  • 17
  • 26
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

shareef
  • 9,255
  • 13
  • 58
  • 89
1

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

  • 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. – oktober Jul 30 '17 at 01:03
  • 1
    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? – arturo.galan Jul 31 '17 at 06:36
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.

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.

Neeraj Kumar
  • 6,045
  • 2
  • 31
  • 23