Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-18715

"missing_version" errors on Heroku Deploy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Answered
    • Icon: Low Low
    • 6.3.0
    • 6.1.1, 6.2.1
    • Plugins
    • None

      Summary

      When deploying using the Heroku plugin, a 400 error is received with the following message:

      com.heroku.api.exception.RequestFailedException: Failed to create app statuscode:400 responseBody:{"id":"missing_version","error":"Please specify a version along with Heroku's API MIME type. For example, `Accept: application/vnd.heroku+json; version=3`.\n"}

      Steps to Reproduce

      1. Create a Heroku deployment task
      2. Run your deployment

      Expected Results

      App is successfully deployed

      Actual Results

      The below exception is thrown in the build log:

      error	27-Sep-2017 14:00:03	Unknown error creating app '<app-name>'Failed to create app statuscode:400 responseBody:{"id":"missing_version","error":"Please specify a version along with Heroku's API MIME type. For example, `Accept: application/vnd.heroku+json; version=3`.\n"}
      error	27-Sep-2017 14:00:03	Error occurred while running Task '<task name>' of type com.heroku.bamboo.heroku-bamboo-plugin:com.heroku.bamboo.WarDeploymentTask.
      error	27-Sep-2017 14:00:03	com.heroku.api.exception.RequestFailedException: Failed to create app statuscode:400 responseBody:{"id":"missing_version","error":"Please specify a version along with Heroku's API MIME type. For example, `Accept: application/vnd.heroku+json; version=3`.\n"}
      error	27-Sep-2017 14:00:03		at com.heroku.api.request.app.AppCreate.getResponse(AppCreate.java:66)
      error	27-Sep-2017 14:00:03		at com.heroku.api.request.app.AppCreate.getResponse(AppCreate.java:20)
      ...
      

      Workaround

      If you are able to use the Heroku CLI, you could work around this issue adding a script task with the following inline contents:

      export HEROKU_API_KEY=<your heroku api key>
      heroku plugins:install heroku-cli-deploy
      heroku war:deploy <path to your war> --app <your app name>
      

      Notes from Atlassian

      We reached out to Heroku for this issue, and they advised us of the API deprecation as well:
      "missing_version" errors on Deploy · Issue #10 · heroku/heroku-bamboo-plugin

              Unassigned Unassigned
              ezeidan Ellie Z
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: