Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when starting a deployment workflow fails with: HttpError: invalid json response body #153

Open
airtonix opened this issue Jun 29, 2023 · 2 comments

Comments

@airtonix
Copy link

airtonix commented Jun 29, 2023

below is a typical implementation for us :

We start a deployment:

    - name: start deployment
      uses: bobheadxi/deployments@v1
      if: inputs.DeployStage != ''
      id: deployment
      with:
        step: start
        token: ${{inputs.GithubToken}}
        env: ${{inputs.DeployStage}}/netlify/${{inputs.DeploymentName}}
        desc: ${{inputs.DeployMessage}}

then when done, we mark the deployment as done:

    - name: update deployment status
      uses: bobheadxi/deployments@v1
      if: inputs.DeployStage != ''
      with:
        step: finish
        token: ${{inputs.GithubToken}}
        status: ${{job.status}}
        env: ${{steps.deployment.outputs.env}}
        env_url: ${{steps.netlify.outputs.deploy_url}}
        deployment_id: ${{steps.deployment.outputs.deployment_id}}

We've now had to put in some esscape hatches into our workflows while we wait for your resposne (viz if: inputs.DeployStage != ''), otherwise we get the following error everytime.

Run bobheadxi/deployments@v1
  with:
    step: start
    token: ***
    env: pr/1123/netlify/AppStorybook
    desc: Deploy preview pr/1123
    debug: false
    auto_inactive: false
  env:
    NODE_OPTIONS: --max-old-space-size=8096
targeting REDACTED-ORG/REDACTED-REPO
initializing new deployment for pr/1123/netlify/AppStorybook @ refs/pull/1123/merge
created deployment REDACTED-ID for pr/1123/netlify/AppStorybook @ refs/pull/1123/merge
unexpected error encountered: HttpError: invalid json response body at https://api.github.com/repos/REDACTED-ORG/REDACTED-REPO/deployments/REDACTED-ID/statuses reason: Unexpected end of JSON input
Error: unexpected error encountered: HttpError: invalid json response body at https://api.github.com/repos/REDACTED-ORG/REDACTED-REPO/deployments/REDACTED-ID/statuses reason: Unexpected end of JSON input - see logs for more information
@abivolmv
Copy link

abivolmv commented Jun 29, 2023

This started happening for us in 1.3.0 now and we tried to update to 1.4.0 and it has the same error.

@re-taro

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants