Skip to content

False positives with v1.10.1? #511

@julien-deramond

Description

@julien-deramond

Since few hours we observe errors with Run JustinBeckwith/linkinator-action@v1. Maybe that come from the new v1.10.1 release.
Nothing changed on our side, the error began to appear after having rebased some of our PRs.

Example of errors in https://github.com/twbs/bootstrap/runs/7268820877?check_suite_focus=true.

In order to have more details, I have enabled verbosity: debug in my fork and created a fake PR. The result with more details can be found in https://github.com/julien-deramond/bootstrap/runs/7269113811?check_suite_focus=true.

If we consider those two errors:

Error: [404] _site/docs/5.2/assets/img/bootstrap-icons.png,
Error: [404] _site/docs/5.2/assets/img/bootstrap-themes.png,

When launching the corresponding website locally, all the images in error exist at those URLs.
When deployed by Netlify (using this _site directory) they also exists:

Other images in this same img directory (not at the same level) are not detected as 404 errors:

[200] _site/docs/5.2/assets/img/favicons/apple-touch-icon.png
[200] _site/docs/5.2/assets/img/favicons/favicon-32x32.png

Something seems weird in this extract; the tested URL contains a comma at the end.

[
  {
    "config": {
      "method": "GET",
      "url": "http://localhost:33887/docs/5.2/assets/img/bootstrap-icons.png,",
      "headers": {
        "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36"
      },
      "responseType": "stream",
      "timeout": 0
    },
    // ...
  }
]

Our GitHub workflow: https://github.com/twbs/bootstrap/blob/main/.github/workflows/docs.yml

Seems to be reproductible as well by doing the following:

git clone git@github.com:twbs/bootstrap.git
cd bootstrap
npm i
npm run start

## In an other terminal
npx linkinator http://localhost:9001 --verbosity debug

There are not much modifications in your repo since the last version except in src/action.js. Maybe it comes from some bumped dependencies.

I'm still trying to go further in my analysis.

Edit: By running npm linkinator@4.0.0 http://localhost:9001 --verbosity debug I don't see any errors.
So this regression seems to be observed in the new 4.0.1 version (I can move this issue in the linkinator repo if needed :) ).

Just saying that by reading the code so it is just a hunch, but in 9a8a83c in src/links.ts there was a .split(',') that doesn't seem to be there anymore and could maybe explain the presence of comma in some of the 404 URLs 🤷

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions