Snaacky / theindex

The frontend, editor panel, and API of TheIndex.moe

Home Page:https://theindex.moe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Ping system for checking site status fails and doesn't report error to the user

devcutler opened this issue · comments

When looking at the root, the ping indicator remains pulsing yellow. Users have no indication that it is not simply waiting.

What I believe is the error
Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at sa (framework-4556c45dd113b893.js:1:48561)
    at xi (framework-4556c45dd113b893.js:1:122126)
    at bs (framework-4556c45dd113b893.js:1:109368)
    at gs (framework-4556c45dd113b893.js:1:109296)
    at vs (framework-4556c45dd113b893.js:1:109159)
    at ls (framework-4556c45dd113b893.js:1:104263)
    at S (framework-4556c45dd113b893.js:1:138450)
    at MessagePort.T (framework-4556c45dd113b893.js:1:138984)

React's page explains this as "Hydration failed because the initial UI does not match what was rendered on the server."

Full page log after 10s execution: theindex.moe-1696827382218.log

Quick fix: add try/catch block and update the UI to reflect that there was a caught Javascript error. There already exists an error state for the display, can simply update that in the catch block and properly fix later if necessary.

Thank you for your report I was able to fix this bug :D