#How to implement Webview watchdog to detect and refresh unresponsive frontend?

1 messages · Page 1 of 1 (latest)

safe coral
#

When what becomes unresponsive? I feel it misses that info to properly suggest something

echo ermine
#

Hi @smoky sleet
I developed a cross-platform desktop app for Windows and Mac using Rust and Tauri implementing authentication, auto-updating, and other core functionalities
I think we can figure out that problem if we discuss together.

smoky sleet
safe coral
# smoky sleet For example, if anything fails on the frontend and the js code stops or becomes ...

I don’t think there is a one stop solution and it would depend on the front end framework you use. Like in react I would use a mix of error boundaries (https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) , oncaughterror and a rust side command to reload the window.
That will handle uncaught errors but reloading like this could quickly leave you in an infinite loop

smoky sleet
#

I haven't been able to find a way to refresh the webview from Rust yet. Perhaps you know how this can be done?