-
Notifications
You must be signed in to change notification settings - Fork 133
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
Background build crashes if I visit another page soon after #1619
Comments
Hmm, I wasn't able to replicate this (the crash). Seems to be working fine for me. Perhaps others can try replicating this. |
Couldn't reproduce this as well, but so far I have only tried it in one run. My current guess that this is probably an intermittent issue caused by the asynchronous nature of the page generation. We can still investigate this further by trying multiple runs or reading from the provided stack trace. @damithc have you experienced this error/crash quite consistently or is it just a one-off so far? |
Turns out it has nothing to do with clicking. The the command fails on its own (without any clicking) after a while with the given error. And it seems to happen almost every time (happened 5/5 most recent tries). |
I tried to run the background build without interruption and it still cleanly finishes... it's a tricky problem here, I would need to make do with just the error trace (I don't want to readily say there's nothing we can do for this). Here is my investigation on this:
TL;DR - The crash is likely because of the unhandled rejections. The catalyst of the rejections is probably overwhelming requests to write siteData after each page build, which causes FS error, and the error-handling calls a utility function that deletes the whole output folder's contents, hence why page generation callbacks throws file not found errors and rejects. This is just my speculation, but it's a good start. I have a trial PR to test whether this is the case. In it, I just disabled the "write to siteData" call after each page build, handle rejections when it happens, and fix an error message so that it properly outputs the filepath. I also added an extra As unfortunately you are the only one we know that can reproduce the errors reliably, I might need to ask your help in checking whether the cause is correct (not ideal I know... :/). If you have the time, can you please check out the trial PR and try to do the background build from there, see if the error persists? If you have the MarkBind repo cloned, you can checkout the trial PR by:
|
Thanks for the follow up work @ryoarmanda |
@ryoarmanda here's the error message I got from this version.
|
Just to confirm, are you working on the
Thanks for the suggestion, I added some changes to the PR, now we can identify whether the trial is used by looking at the logged version (should be To update the trial PR branch, you need to check out to some other branch before updating it.
Regarding the error log you provided, not sure if the trial is properly linked. The unhandled rejection error still says
|
I'm using Yes, It's possible that the new version wasn't linked properly before. There was an error from the After linking properly (I hope), I'm getting this error for
The error goes away after I unlink and go back to the production version. |
BTW, i'm using this method to link https://markbind.org/devdocs/devGuide/settingUp.html#setting-up-the-dev-environment The error I get for
|
Can you try running Aside: I did try to run the usual |
Hi, I have tried to replicate this issue but I cannot seem to reproduce or get any errors? Seems to be working fine on my end. |
Thanks for checking @ong6 |
@damithc Yep, I tried it and there were no errors for me. Perhaps the error is specific to your computer? |
Seems like something specific to my local setup. This is when working on https://github.com/se-edu/guides |
Thanks for the screenshots @damithc I will look into this and see if I can replicate/ solve this issue |
No matter what I try I am unable to replicate this error and everything works fine with the latest release of markbind. However, I suspect it has something to do with Prof's node version and/or his markbind node modules. Perhaps a few steps to fix this issue can be:
Some other references: Do let me know if any of this helped! |
Thanks for investigating this @ong6 , and thanks for the suggestions too.
I ran the Guess what, tried twice and couldn't reproduce the problem. Not sure what fixed it but seems to be fixed now. :-) Closing this now. Will reopen if it crops up again. |
@damithc Yay! Glad my investigation yielded some results! |
Steps to reproduce locally:
cs2103
markbind serve -o -b
The error:
Let me know if you are unable to reproduce...
The text was updated successfully, but these errors were encountered: