-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
"Docs markdown link couldn't be resolved" infinite loop on build or start #3652
Comments
Hi, I'm not sure what's the error that you are reporting here? As far as I understand it is a cosmetic terminal issue, and is not blocking you from building your site right? Note: I'm working on proper i18n support right now, will soon look for early adopters to onboard |
The page on localhost never loads, but if I pipe output to a file, it works fine. I think it's detecting if it's writing to a TTY and if it is, redrawing the entire terminal because normally there's a progress bar for the client and server build. Here's a video: https://i.imgur.com/NhLGNZs.mp4 Notice how the scroll bar starts to grow just for this progress, each render adds more lines to the terminal: As soon as the 404 errors start to print, the buffer starts to fill up. If I leave it running, it just does this constantly. It might not actually be an "infinite loop" though, it might just be the constant writes to stdout slowing down the process so it just takes an insanely long time to actually build and serve content. On the topic of translations, we'll be very interested in trialing that new feature, we've been anticipating its release! We have about 700 pages in each language and our number of languages is growing constantly so it's a big test-base! |
Not working for me, running wiki locally makes loop for 3 hours straight. |
Can you both share your env? |
I'm on windows.
What do you mean? |
Anything useful to share. But knowing you are both on windows is a good first step 👍 Unfortunately, I don't have windows, but if someone can help figure this problem out that would be nice |
What is the status here? I keep getting the same infinite loop and the local development server is not reachable due to this infinite loop warning. I am on Windows too and I tried to implement another documentation section for my API documentation. Inside the api docs I got cross-references to other markdown files and my sidebar js file is set to |
@Cankar001 We are looking for a contributor on Windows to look into this, because neither @slorber nor I have a Windows device. Unless you can point us to where the culprit is in our source code, this issue remains unactionable. |
I'd love to help figure this one out but we moved off Docusaurus and wrote our own with next.js due to this issue and some others (I think the sheer size of our site caused issues, including translations there were somewhere near 10,000 pages) The original repo I posted should still work though, and if anyone else does try to repro this it's probably worth updating Docusaurus first as the bug may not be present any more. |
@Southclaws Thanks for the info! I am working on a large project as well, we probably will have a similar documentation size, I will discuss to move off docusaurus with the team then, thanks for your information! 👍 |
Indeed, I'd recommend finding alternatives to Docusaurus if you have 10,000 pages since we are not very memory/time efficient at this point. Would be interesting to see any benchmark of Docusaurus vs Next.js vs Gatsby etc. Maybe this problem itself is uniquely with large documentation sites then? |
@Josh-Cena I don't think so, our documentation is very small at this point, we are still at the beginning of the project (we only have one blog post and about 10 documentation pages now). The problem occurred when I tried to integrate an api documentation section of a larger c++ code base (about 130 000 lines now) with many cross references (I generated the api documentation with doxygen using the XML output and then converted the XML output with Moxygen to Markdown. I placed all markdown files into a docs-api folder and followed the instructions on the official docusaurus site to integrate another documentation. That's when I got the infinite loop warning mentioned before. I also tried following this answer https://stackoverflow.com/a/68162605/12873837, but I got the same infinite loop warning. |
So, in the end, you still have a lot of Markdown files to build, despite they being all autogenerated, right? |
Yes that is correct, currently we have 264 auto-generated markdown files |
Are you (and @Southclaws) using Windows when that error manifests itself? Two people reporting are using windows, and two people are building large documentations (although 264 doesn't sound terribly large—wonder how long they are and how many links they have though!). I wonder what's the intersection of the two sets. |
@Cankar001 that would be helpful if you can provide a small repro of the problem. If you generate your content and then remove a lot of pages progressively until you reach an empty site, maybe you could identify which page exactly is triggering this problem? I believe a newly initialized site works fine for you right? So this dichotomy debugging technique might be useful 🤪 |
@slorber Hi, sorry for not responding, I had a lot to do in the last days in university. I added the not working version to the public github repository: https://github.com/HighLo-Engine/docs-old The github action failed with the mentioned infinite loop warning. I hope these information help you, if you need anything else, just let me know :) |
@Cankar001 the github action does not fail due to the mentioned infinite loop: it fails due to the error printed in that github action: And locally, the dev server does not have an infinite loop, it has the exact same error. This is just one page of your site that seems to have a syntax error due to using The fix is easy: - usability improvement:we currently have duplicated usage, you can achieve the same result with either: std::vector<int32> arr; arr.push_back(10); arr.push_back(42);
+ usability improvement:we currently have duplicated usage, you can achieve the same result with either: `std::vector<int32>` arr; arr.push_back(10); arr.push_back(42); Now regarding the warnings
Both files are in the exact same folder so you should not use a - `class `[`highlo::Event`](docs-api/api-highlo--Event.md#classhighlo_1_1_event) |
+ `class `[`highlo::Event`](./api-highlo--Event.md#classhighlo_1_1_event) | Indeed you can see Docusaurus is 100% right to report this warning, because your linking is bad. http://localhost:3000/api/api-highlo links to http://localhost:3000/api/docs-api/api-highlo--Event.md#classhighlo_1_1_event (which does not exist => 404) Try to click here and see for yourself: Now I can't tell if there's an infinite loop or not on Windows, but this repro is not really acceptable because it contains a lot of errors. We'll need someone to be able to produce a better repro, preferably smaller too and without such errors Here, all the produced warnings are real problems reported by Docusaurus, not meant to be ignored Maybe an infinite loop happens on Windows, only when such errors are printed. In this case please make sure that it works with 0 warning and starts failing when we introduce 1-n linking warning |
@slorber Thank you very much! I will try to fix the mentioned issues and come back to you if the infinite loop warning still remains :) |
Closing again due to inactivity |
I'm getting this same error now but it's happening in my node-modules. The site builds fine and I can run it locally, but when I go to deploy it on Vercel, it doesn't work consistently. Sometimes it throws these errors other times it doesn't. It throws these warnings:
then later on in the log lines throws this error:
Since it's in our node_modules, I'm not exactly sure how to resolve this? |
@evisdrenova Your error is unrelated. It's because your Docusaurus is trying to load node_modules as part of your docs. Please start a discussion and provide a reproduction. |
@Josh-Cena sure will do! |
🐛 Bug Report
I upgraded to 66 recently for our docs site and since we're doing translations that are in-progress, there are a lot of broken links (because translators copy the english, change the text and keep the markdown - so links and images, etc) which is fine, I don't want translators to remove links then re-add them later it'll just get confusing. I have set
onBrokenLink
toignore
but the warning messages still appear.The issue is whenever I do a build or run the dev server the console just gets inundated with:
I thought there were just a lot of links so I left it running for 10 minutes and it's still printing! It seems to be stuck in an infinite loop as it prints the same thing over and over. It opens the browser but the page never loads.
I'm thinking it's related to the type of TTY though because on Vercel it builds fine (ignoring the other error) https://vercel.com/openmultiplayer/wiki/4wphzsm3e could it be related to that progress bar graphic that appears in the terminal?
It seems to be TTY related, if I pipe the output to a file then the server starts up fine:
And it stops printing there, the browser opens as expected and I can browse/edit the site and it reloads live.
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
I think just having a ton of 404s triggers it, clone this and build it: https://github.com/openmultiplayer/wiki/
Your Environment
Does not occur on Vercel but occurs locally on Windows.
The text was updated successfully, but these errors were encountered: