CircleCI-Public/slack-orb

Hard-to-debug failure with exit code 23

Closed this issue · 2 comments

Orb version:

4.12.5

What happened:

Slack - Sending Notification step output (with debug: true)

#!/bin/bash -eo pipefail
#!/usr/bin/env sh

# Workaround for Windows Support
# For details, see: https://github.com/CircleCI-Public/slack-orb/pull/380
# shellcheck source=/dev/null
eval printf '%s' "$SLACK_SCRIPT_NOTIFY"

Posting Status
BASH_ENV file: /tmp/.bash_env-649969d20f309336d2db9ebb-0-build
Exists. Sourcing into ENV
Checking For JQ + CURL

Exited with code exit status 23
CircleCI received exit code 23

This seems very close to the report in #380 (comment), but I couldn't find a new issue posted at that time.

We don't have an executor specified (except for a different job which doesn't happen in this workflow).

Expected behavior:

See the actual script, and get to debug it.

Additional Information:

I expect the underlying job does fail, since it was failing under the old orb version, too. I just want to be able to see how.

The reason in this particular case seems likely to be

Can you check that you have write access to /usr/local/bin, the script seems to want to use curl to download a copy of jq and place it at /usr/local/bin/jq via curl’s -o setting. As this can throw error 23 due to access issues it would be a good place to start.

(from https://discuss.circleci.com/t/using-circleci-slack-4-12-with-custom-base-image/47910/5)

Can a different path be used (by default or making JQ_PATH modifiable)?

Are you running on a CircleCI executor, or you are using your own host?
You can set -x in the shell configuration to enable bash debugging and get more details.