Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link check crashes for MSDN Blog URLs #260

Open
nex3 opened this issue Apr 22, 2023 · 1 comment
Open

Link check crashes for MSDN Blog URLs #260

nex3 opened this issue Apr 22, 2023 · 1 comment

Comments

@nex3
Copy link

nex3 commented Apr 22, 2023

Although the markdownLinkCheck() function completes, when one of these URLs is checked, it will keep the process alive for a long time and then eventually crash with the following error:

/home/nweiz/goog/sass/language/node_modules/async/dist/async.js:327
              throw new Error("Callback was already called.");
              ^

Error: Callback was already called.
    at /home/nweiz/goog/sass/language/node_modules/async/dist/async.js:327:21
    at /home/nweiz/goog/sass/language/node_modules/async/dist/async.js:248:17
    at /home/nweiz/goog/sass/language/node_modules/markdown-link-check/index.js:132:13
    at /home/nweiz/goog/sass/language/node_modules/link-check/lib/proto/http.js:117:21
    at done (/home/nweiz/goog/sass/language/node_modules/needle/lib/needle.js:463:14)
    at PassThrough.<anonymous> (/home/nweiz/goog/sass/language/node_modules/needle/lib/needle.js:717:9)                                                                               
    at PassThrough.emit (node:events:524:35)
    at endReadableNT (node:internal/streams/readable:1359:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Here's a simple reproduction:

const markdownLinkCheck = require('markdown-link-check');

markdownLinkCheck(
  '[link](https://blogs.msdn.microsoft.com/)',
  (error, results) => console.log({error, results}),
);
nex3 added a commit to sass/sass that referenced this issue Apr 22, 2023
@nschonni
Copy link
Contributor

I wonder if it's because they have weird redirects setup? The base URL redirects to https://learn.microsoft.com/en-ca/archive/blogs/, but has a delay

nex3 added a commit to sass/sass that referenced this issue Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants