release-please-action icon indicating copy to clipboard operation
release-please-action copied to clipboard

Unhandled promise rejection: HttpError: Server Error

Open rauno56 opened this issue 3 years ago • 0 comments

TL;DR

I'll try to be as helpful as I can, but the release-please output cuts some of it and I'm not familiar with it's internal logic.

We've been successfully using it in opentelemetry-js-contrib but the last release failed with errors I'm unable to decipher exactly:

 (node:1547) UnhandledPromiseRejectionWarning: HttpError: Server Error
    at /home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:14510:21
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async /home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:80188:26
    at async GitHub.commentOnIssue (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:80856:20)
    at async Manifest.createRelease (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:81521:9)
(node:1547) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

Expected behavior

A successful build or an more or less helpful error message.

Observed behavior

Number of warnings and a server error ending the CI process.

Action YAML

on:
  push:
    branches:
      - main

name: Run Release Please
jobs:
  release-please:
    runs-on: ubuntu-latest
    steps:
      - uses: google-github-actions/release-please-action@v3
        id: release
        with:
          command: manifest
          token: ${{secrets.RELEASE_PR_TOKEN}}
          default-branch: main

      # The logic below handles the npm publication:
      - name: Checkout Repository
        if: ${{ steps.release.outputs.releases_created }}
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Setup Node
        uses: actions/setup-node@v3
        if: ${{ steps.release.outputs.releases_created }}
        with:
          node-version: 14
          registry-url: 'https://registry.npmjs.org'

      - name: Cache Dependencies
        if: ${{ steps.release.outputs.releases_created }}
        uses: actions/cache@v3
        with:
          path: |
            node_modules
            package-lock.json
            detectors/node/*/node_modules
            metapackages/*/node_modules
            packages/*/node_modules
            plugins/node/*/node_modules
            plugins/web/*/node_modules
            propagators/*/node_modules
          key: release-${{ runner.os }}-${{ matrix.container }}-${{ hashFiles('**/package.json') }}

      - name: Build Packages
        if: ${{ steps.release.outputs.releases_created }}
        run: |
          npm install
          npx lerna bootstrap --no-ci

      # Release Please has already incremented versions and published tags, so we just
      # need to publish all unpublished versions to npm here
      # See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package
      - name: Publish to npm
        if: ${{ steps.release.outputs.releases_created }}
        env:
          NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
        run: npx lerna publish from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes

Log output

Full log output here.

Additional information

No response

rauno56 avatar May 18 '22 09:05 rauno56