Can't get Web Viewer to show raw HTML (using URL) or Web Viewer Extension (using POST) in Thunkable Live

Hi All,

I don’t think I’ve seen a recent question or solution for this. My app creates raw HTML code for a table (with e.g. insulin doses), and the cell values are calculated in app (so I can’t use an HTML asset file). When I send to the WebViewer (via a URL block) and to the WebViewer Extension (via a POST block and an external website), these work perfectly in Thunkable online (which I assume means the HTML is fine). But with both Thunkable Live (for Android and iOS) and in TestFlight and with an APK, I just get a white screen. If I cut-and-paste the HTML into a Chrome browser, it also works fine.

Are there security issues with the devices that are blocking this, or any other solutions?

Thanks for your collective wisdom.

Thunkable online

Thunkable Live (Android)

Since the same HTML works in the online preview and in Chrome but gives a white screen on devices, it may help to narrow it down in two steps.

First, send a tiny test string to the Web Viewer on the phone, such as one heading and a one-row table. If that appears, the problem is probably the size or characters in the generated HTML (unescaped quotes, special characters or a very long string), and you can add rows gradually to find the point where it breaks.

If even the small test stays white, check how the HTML is being passed. A URL block normally expects an address, so on a device the HTML may need to go in as a data URL with the content properly URL-encoded, or, if your Web Viewer component has an HTML property, set that instead. For the POST approach, also confirm the external page is served over https, since Android blocks plain http traffic in many cases.

It would be useful to hear what the small test does on the phone.

A white screen on devices while the same HTML works in a desktop browser usually points to how the content is being loaded rather than the HTML itself. A few things worth testing:

First, try a minimal page such as a heading and a one-row table. If that renders on the device, build up to your full table to find the part that breaks it. Large inline HTML strings or special characters (quotes, percent signs, unescaped ampersands) can fail silently when passed through a URL or a data URI.

Second, if you are loading from an external website, make sure it is served over HTTPS and that nothing inside the page (scripts, fonts, images) is requested over plain HTTP, since mobile web views often block mixed content.

Third, avoid depending on external scripts or CDNs for rendering a simple table. Inline CSS and plain HTML tend to be the most reliable in mobile web views.

If you can share the first few lines of the generated HTML, it may be easier to spot what the device is rejecting.

Thanks for all this. It’s taken me a while to test this. So, even sending this simple URL to the Web Viewer:

data:text/html, (html)(body)(p)Hi there!(/p)(/body)(/html)

The < and > replaced with ( and ) to keep the HTML from executing in this reply.

I get the “Hi there” just fine in Thunkable online and in a Chrome browser, but only a white screen in Thunkable Live iOS and Android.

Even data:text/html, (p)Hi there!(/p) doesn’t work.

Tried preceding the HTML with (!DOCTYPE html) and that made no difference.

So it seems to be something very basic that the device can’t accept this simple string.

Thoughts?