Has anyone figured out how to prevent the app from going to the scary error screen when crashing?

I have an app which every now and then crashes for trying to update a non-existent view but it only happens in the build when published. It never happens in the preview app and I have wrapped everything in if-statements. for months I have been trying to figure it out. There doesn’t seem to be any way to connect the tags in error message to the debugger. Is there any way we can prevent a user from seeing the default error screen which is obviously designed for developers and should never ever ever be allowed to be shown to a user. The page will unmount event for some reason fires when the page is mounted, not unmounted, so that doesn’t work. there has got to be a way, as no, and I repeat, no quality developer would ever allow an app to show the user an error screen such as the one in this system. The crashing have to have something to do with the bad linux gate and webRTC sdk playstore and firebase has been warning apppgyver about for almost a year now, as it seems to happen when the data tries to load and render the view components. It happens only spuriodically and does not seem to follow any pattern or logic.