Catch Webview failures and hide component

Webview is a great component - really slick and cool…when it works. In my testing, I find that most sites are not allowing themselves to be embedded. The error handling is also not great. It says “This site may not allow itself to be embedded”…which is fine. But then it says “Try Again”…so we’re basically telling the user to keep at it and keep failing. I also understand that it may say try again because the url was entered improperly.

I suggest a better way to handle webview failure, if possible, is this;

I assume the error is rendered by Glide? If so, then just don’t show the component. When another component, like video player - is on the page, and the video field is blank, the component doesn’t show. And that’s really the right way. I realize this is not an exact scenario because the webview field in this scenario is Not blank, but nevertheless, if Glide is catching the failure, I would rather you not show the component to the user than to display the error.

For me, for now, webview is out and that’s really disappointing because it’s AWESOME. I simply don’t use any component that relies on user generated data if it isn’t providing a consistent and reliable user experience. Again, I know Glide can’t control the ability to embed sites, but perhaps CAN control how we handle the sites that won’t embed.

Yes, I know this isn’t technically a bug - but close enough! :innocent:

4 Likes

Really the component is fantastic, but it is frustrating, I now needed to use it and the site just doesn’t open, would there be a way around this?

While trying at my end, one thing I noticed that it does not capture http URL in almost all cases whereas it works when you enter HTTPS url (in most of the cases, with few reputed sites not allowing like Twitter etc)

Has there been any fixes for this? I am getting the two errors mentioned.

2 Likes