coverallsapp / coverallsapp/github-action

Random error: `Error: Parallel webhook error:TypeError: Cannot read property 'done' of undefined, undefined`

Open
#91 5 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
520
Forks
78
PR merge metrics
No merged PRs in 30d

Description

We are seeing this error randomly happening more today:

/home/runner/work/_actions/coverallsapp/github-action/master/lib/run.js:97
                        throw new Error('Parallel webhook error:' + err + ', ' + JSON.stringify(data));
                        ^

Error: Parallel webhook error:TypeError: Cannot read property 'done' of undefined, undefined
    at Request._callback (/home/runner/work/_actions/coverallsapp/github-action/master/lib/run.js:97:31)
    at Request.self.callback (/home/runner/work/_actions/coverallsapp/github-action/master/node_modules/request/request.js:185:22)
    at Request.emit (events.js:210:5)
    at Request.<anonymous> (/home/runner/work/_actions/coverallsapp/github-action/master/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:210:5)
    at IncomingMessage.<anonymous> (/home/runner/work/_actions/coverallsapp/github-action/master/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:299:28)
    at IncomingMessage.emit (events.js:215:7)
    at endReadableNT (_stream_readable.js:1184:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

Is there some error on coveralls app that might correlate?
The error is happening in the code_coverage run - see config below.

Out workflow file is as follows:

...
  backend_test:
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        # Set N number of parallel jobs you want to run tests on.
        # Use higher number if you have slow tests to split them on more parallel jobs.
        # Remember to update ci_node_index below to 0..N-1
        ci_node_total: [5]
        # set N-1 indexes for parallel jobs
        # When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc
        ci_node_index: [0, 1, 2, 3, 4]

    steps:
    ...
    - name: Run Rspec
      run: bundle exec parallel_test -n $PARALLEL_TESTS_CONCURRENCY -e './bin/parallel_tests'

    - name: Coveralls Parallel
      uses: coverallsapp/github-action@master
      continue-on-error: true
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        git-commit: ${{ github.event.pull_request.head.sha || github.sha }}
        flag-name: run-${{ matrix.ci_node_index }}-${{ github.run_id }}
        path-to-lcov: ${{ env.COVERAGE_LCOV_FILE_PATH }}
        parallel: true

  code_coverage:
    needs: backend_test
    runs-on: ubuntu-latest
    steps:
    - name: Coveralls Finished
      uses: coverallsapp/github-action@master
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        git-commit: ${{ github.event.pull_request.head.sha || github.sha }}
        parallel-finished: true
...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at lib/run.js:97, where the parallel webhook error is raised, and compare it with the provided workflow's parallel and parallel-finished steps. Reproduce or inspect the failing callback data around the Coveralls parallel submission, then determine what behavior should be considered successful or erroneous. The issue is resolved when the intermittent TypeError is explained and the parallel workflow no longer fails unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript, node.js
Domain
ci-cd, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.