I'm trying to debug an issue that a customer is having on macOS 10.13 where the app starts with a white screen. I think it's probably something like some unsupported bit of JS. Once the webview is up and running I think Sentry will catch errors for me, but if it fails at parsing then all bets are off. Is there a way to tell Tauri (wry?) to forward browser errors to the Rust side, so I can log them somehow?
#Redirecting browser console errors to Rust?
5 messages · Page 1 of 1 (latest)
I would recommend you use the log plugin
https://github.com/tauri-apps/plugins-workspace/tree/v1/plugins/log
If you really don't wanna use the methods it exposes, you an always just do console.log = info and console.error = error which should let you run console logging as per usual but instead it'll use those new versions
oh sweet thanks, I didn't know about that plugin! that looks like just what I need
hm if my JS is failing very early, like during parsing, I'm not sure it'll catch those errors?
I mean you can set up that it loads as the first thing that happens in your app. Depending on your frontend framework this might be really easy or a bit more difficult. It's essentially just a matter of e.g. adding a script tag earlier in your index.html file than any other scripts you use