gaurav-nelson / github-action-markdown-link-check

Check all links in markdown files if they are alive or dead. 🔗✔️
MIT License
399 stars 77 forks source link

Failing randomly with "Error: Callback was already called." #187

Open ShawnHymel opened 12 months ago

ShawnHymel commented 12 months ago

Part way through checking our files, the checker will fail with:

FILE: ./edge-impulse-studio/processing-blocks/image.md
/usr/local/lib/node_modules/markdown-link-check/node_modules/async/dist/async.js:324
            if (fn === null) throw new Error("Callback was already called.");
                             ^

Error: Callback was already called.
    at /usr/local/lib/node_modules/markdown-link-check/node_modules/async/dist/async.js:324:36
    at /usr/local/lib/node_modules/markdown-link-check/node_modules/async/dist/async.js:248:17
    at /usr/local/lib/node_modules/markdown-link-check/index.js:129:13
    at /usr/local/lib/node_modules/markdown-link-check/node_modules/link-check/lib/proto/http.js:117:21
    at done (/usr/local/lib/node_modules/markdown-link-check/node_modules/needle/lib/needle.js:463:14)
    at PassThrough.<anonymous> (/usr/local/lib/node_modules/markdown-link-check/node_modules/needle/lib/needle.js:717:9)
    at PassThrough.emit (node:events:524:35)
    at endReadableNT (node:internal/streams/readable:1378:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v20.4.0
*** ERROR: Something went wrong - see the errors above...

This seems to occur randomly on different markdown files in our repo.

Here is our job:

jobs:
  markdown-link-check:
    name: Check for dead links
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Markdown links check
        uses: ruzickap/action-my-markdown-link-checker@v1
        with:
          verbose: true
          quiet: true
  ...
gaurav-nelson commented 1 month ago

Thank you @ShawnHymel I have stopped working on this action. Please try https://github.com/UmbrellaDocs/linkspector and https://github.com/UmbrellaDocs/action-linkspector instead.