everruler12 / roam2github

Automatic backups from Roam Research into your private GitHub repo
MIT License
151 stars 32 forks source link

Error today: Node with given id does not belong to the document #5

Closed sinoth closed 3 years ago

sinoth commented 3 years ago

After many successful runs, this error happened today:

2021-02-12 18:27:05.568 R2G GitHub Actions path found
2021-02-12 18:27:05.571 R2G Create browser
2021-02-12 18:27:06.308 R2G Login
2021-02-12 18:27:06.362 R2G - Navigating to login page
2021-02-12 18:27:07.647 R2G - Checking for email field
2021-02-12 18:27:10.035 R2G ERROR - Error: Protocol error (DOM.resolveNode): Node with given id does not belong to the document
    at /tmp/roam2github/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:208:63
    at new Promise (<anonymous>)
    at CDPSession.send (/tmp/roam2github/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:207:16)
    at ExecutionContext._adoptBackendNodeId (/tmp/roam2github/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:299:47)
    at ExecutionContext._adoptElementHandle (/tmp/roam2github/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:314:21)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Frame.waitForSelector (/tmp/roam2github/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:846:24)
    at async /tmp/roam2github/roam2github.js:173:13
R2G Exit after: 4.473s
Error: Process completed with exit code 1.

I'm hoping the next run will be fine, but figured you would want to see it anyway.

everruler12 commented 3 years ago

Hmm... That is odd. You can try re-running the job if you don't want to wait until next run. I do get occasional puppeteer errors that can't really be duplicated, because it always works when re-run. I just ran a backup successfully, so probably not a change to the Roam login page. Likely to be a fluke. Let me know if happens more often.

takaokay commented 3 years ago

Thank you for your advice! Honestly I am surprised with your kind comments as I am newbie here. I updated env in case they were wrong.

everruler12 commented 3 years ago

@takaokay You're welcome! If your Secrets were wrong, you could expect an error from this list: https://github.com/everruler12/roam2github/blob/main/documentation/Common%20error%20causes.md

The error in this GitHub issue happened when trying to locate the email field, so I don't think it's related to wrong env values

sinoth commented 3 years ago

Rerunning the action worked fine by the way. I assume that occasionally with hiccups on the Roam side we will inevitably get random failures.

This is outside of the scope of your tool, but I wish Github actions had something along the lines of "only notify of failure for two consecutive failures". I don't really care to be notified unless the job fails over and over.

everruler12 commented 3 years ago

@sinoth Thanks for following up. Yeah, I wish email notifications could be set that way, too. Theoretically, it might be possible to disable the Actions notifications, then set up another Action workflow to send an email when triggered by multiple failures in the backup workflow. If you get this same error pretty often, I could try adding an additional check and retry, instead of failing on the first time.

takaokay commented 3 years ago

Oh! This is the first time for backing up over 11 mins since the set-up. I hope this works!

takaokay commented 3 years ago

Unfortunately it failed. Not yet succeeded ever. Logs says "TimeoutError: waiting for selector .loading-astrolabe to be hidden failed: timeout 600000ms exceeded". This occurs every single time. No Idea.

takaokay commented 3 years ago

Updated graph name and it worked.