k1LoW / tbls

tbls is a CI-Friendly tool for document a database, written in Go.
MIT License
3.34k stars 164 forks source link

[setup-tbls] `Error: unsupport content types: [ text/plain; charset=utf-8]` #460

Closed FelixZY closed 1 year ago

FelixZY commented 1 year ago

This is a bug report for https://github.com/k1LoW/setup-tbls (but it seems I cannot open issues there).

What happened

Error: unsupport content types: [ text/plain; charset=utf-8]

What you expected to happened

No error

What stack trace or error message from tbls did you see?

https://github.com/dansdata-se/portal/actions/runs/4522502669/jobs/7965017061 ``` Run k1low/setup-tbls@v1 with: version: 1.64.0 github-token: *** env: DEBIAN_FRONTEND: noninteractive NODE_VERSION: 18 FLUTTER_VERSION: 3.7.8 FLUTTER_CHANNEL: stable SUPABASE_CLI_VERSION: 1.45.[2](https://github.com/dansdata-se/portal/actions/runs/4522502669/jobs/7965017061#step:7:2) POSTGRES_VERSION: 14 TBLS_VERSION: 1.64.0 GIT_COMMIT_REF: fzy/login-etc/1 GIT_COMMIT_SHA: 96b05166ab816342fdac332df272bb3d7b0b4328 FLUTTER_ROOT: /opt/hostedtoolcache/flutter/stable-3.7.8-x64 PUB_CACHE: /opt/hostedtoolcache/flutter/stable-3.7.8-x64/.pub-cache Run k1LoW/gh-setup@v1 with: repo: github.com/k1LoW/tbls github-token: *** version: 1.64.0 bin-match: tbls strict: true gh-setup-version: v1.2.2 env: DEBIAN_FRONTEND: noninteractive NODE_VERSION: 18 FLUTTER_VERSION: [3](https://github.com/dansdata-se/portal/actions/runs/4522502669/jobs/7965017061#step:7:3).7.8 FLUTTER_CHANNEL: stable SUPABASE_CLI_VERSION: 1.[4](https://github.com/dansdata-se/portal/actions/runs/4522502669/jobs/7965017061#step:7:4)[5](https://github.com/dansdata-se/portal/actions/runs/4522502669/jobs/7965017061#step:7:5).2 POSTGRES_VERSION: 14 TBLS_VERSION: 1.64.0 GIT_COMMIT_REF: fzy/login-etc/1 GIT_COMMIT_SHA: 96b05166ab816342fdac332df272bb3d7b0b4328 FLUTTER_ROOT: /opt/hostedtoolcache/flutter/stable-3.7.8-x64 PUB_CACHE: /opt/hostedtoolcache/flutter/stable-3.7.8-x64/.pub-cache Run ${GITHUB_ACTION_PATH}/scripts/install-gh-setup.sh ${GITHUB_ACTION_PATH}/scripts/install-gh-setup.sh shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} env: DEBIAN_FRONTEND: noninteractive NODE_VERSION: 18 FLUTTER_VERSION: 3.7.8 FLUTTER_CHANNEL: stable SUPABASE_CLI_VERSION: 1.45.2 POSTGRES_VERSION: 14 TBLS_VERSION: 1.[6](https://github.com/dansdata-se/portal/actions/runs/4522502669/jobs/7965017061#step:7:6)4.0 GIT_COMMIT_REF: fzy/login-etc/1 GIT_COMMIT_SHA: 96b05166ab816342fdac332df272bb3d7b0b4328 FLUTTER_ROOT: /opt/hostedtoolcache/flutter/stable-3.7.8-x64 PUB_CACHE: /opt/hostedtoolcache/flutter/stable-3.7.8-x64/.pub-cache GH_SETUP_GITHUB_TOKEN: *** GH_SETUP_GH_SETUP_VERSION: v1.2.2 gh-setup version 1.2.2 Run ${GITHUB_ACTION_PATH}/scripts/run-gh-setup.sh ${GITHUB_ACTION_PATH}/scripts/run-gh-setup.sh shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} env: DEBIAN_FRONTEND: noninteractive NODE_VERSION: 18 FLUTTER_VERSION: 3.[7](https://github.com/dansdata-se/portal/actions/runs/4522502669/jobs/7965017061#step:7:7).[8](https://github.com/dansdata-se/portal/actions/runs/4522502669/jobs/7965017061#step:7:8) FLUTTER_CHANNEL: stable SUPABASE_CLI_VERSION: 1.45.2 POSTGRES_VERSION: 14 TBLS_VERSION: 1.64.0 GIT_COMMIT_REF: fzy/login-etc/1 GIT_COMMIT_SHA: [9](https://github.com/dansdata-se/portal/actions/runs/4522502669/jobs/7965017061#step:7:9)6b05166ab816342fdac332df272bb3d7b0b4328 FLUTTER_ROOT: /opt/hostedtoolcache/flutter/stable-3.7.8-x64 PUB_CACHE: /opt/hostedtoolcache/flutter/stable-3.7.8-x64/.pub-cache GH_SETUP_GITHUB_TOKEN: *** GH_SETUP_REPO: github.com/k1LoW/tbls GH_SETUP_VERSION: 1.[64](https://github.com/dansdata-se/portal/actions/runs/4522502669/jobs/7965017061#step:7:67).0 GH_SETUP_OS: GH_SETUP_ARCH: GH_SETUP_MATCH: GH_SETUP_BIN_DIR: GH_SETUP_BIN_MATCH: tbls GH_SETUP_FORCE: GH_SETUP_STRICT: true GH_SETUP_BIN: /tmp/gh-setup Error: unsupport content types: [ text/plain; charset=utf-8] Usage: gh-setup [flags] Flags: -A, --arch string specify arch of asset --bin-dir string bin directory for setup --bin-match string regexp to match bin path in asset -f, --force enable force setup -h, --help help for gh-setup --match string regexp to match asset name -O, --os string specify OS of asset -R, --repo string repository using the [HOST/]OWNER/REPO format --strict require strict match --verbose show verbose log -v, --version string release version Error: Process completed with exit code 1. ```

Environment

k1LoW commented 1 year ago

@FelixZY Thank you for your report!

k1LoW commented 1 year ago

Is it still an error? I did not get an error in my environment.

If you don't mind, I would like to see a log of when you used setup-tbls with DEBUG=1.

https://github.com/k1LoW/setup-tbls/blob/56ae92beee11547e9e4c57631a264c5dbc568be1/.github/workflows/integration.yml#L13-L14

FelixZY commented 1 year ago

AFAIK, yes; though it'll be a few days before I can run the workflow again with the debug flag.

One difference I'm able to tell in our environments from my phone though: I'm explicitly passing a fixed version, rather than using the implicit latest

See https://github.com/dansdata-se/portal/blob/0824075423748ccfbfc3c711dfb22fca2dc1bf91/.github/workflows/ci.yaml#L52

k1LoW commented 1 year ago

@FelixZY Thank you.

Maybe you should use v1.6.4 instead of 1.64.0.

$ gh-setup --repo k1LoW/tbls --version 1.64.0
Error: GET https://api.github.com/repos/k1LoW/tbls/releases/tags/1.64.0: 404 Not Found []
Usage:
  gh-setup [flags]

Flags:
  -A, --arch string      specify arch of asset
      --bin-dir string   bin directory for setup
  -f, --force            enable force setup
  -h, --help             help for gh-setup
      --match string     match string for asset
  -O, --os string        specify OS of asset
  -R, --repo string      repository using the [HOST/]OWNER/REPO format
  -v, --version string   release version

$ gh-setup --repo k1LoW/tbls --version v1.64.0
Use tbls_v1.64.0_darwin_arm64.zip
Setup binaries to executable path (PATH):
  tbls -> /Users/k1low/.krew/bin/tbls
$
FelixZY commented 1 year ago

@k1LoW Confirmed, using the v prefix solves the issue. As usual, thank you for quick and helpful assistance!