Skip to content

Axios Post Request fails behind HTTP Proxy #131

@EHitchcockIAG

Description

@EHitchcockIAG

Description

Describe your issue here.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

When Axios POSTs the request to HTTPS webhook (to trigger Slack Workflow) on a Github Runner acting behind a HTTP proxy, the request will hang forever. This is due to an outstanding Axios bug which hasn't been fixed.

Reproducible in:

package version: 1.22.0

node version: 16.14.2

OS version(s): Amazon Linux 2

Steps to reproduce:

  1. Configure Slack workflow and add SLACK_WEBHOOK_URL to Github Secrets.
  2. Trigger slackapi/slack-github-action in Github Agent running an HTTP proxy configured with the HTTPS_PROXY environment variable.
    steps:
      - name: Send GitHub Action trigger data to Slack workflow
        id: slack
        uses: slackapi/slack-github-action@v1.22.0
        with:
          payload: |
            {
              "version": "1.0.0",
              "message": "This came from Github!"
            }
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

Expected result:

Github Workflow passes and Webhook triggers Slack Workflow.

Actual result:

slackapi/slack-github-action runs forever in Github Workflow.

Attachments:

image

I was able to resolve this by configuring an https-proxy-agent when the request webhook uses HTTPS and the proxy uses HTTP. Link to PR in fork https://github.com/EHitchcockIAG/slack-github-action-debug/pull/2/files. Currently we are using the tag v1.23.0-alpha from the fork in our Github Workflows.

image

I'm not sure if this is an adequate solution by the team's standards. If this looks okay, I can add some tests and open a PR to main.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions