Web viewer stop working correctly

I was using web viewer for displaying a text in HTML format like this


and now it does not work, look at these blocks

the result was

but it was working before.

I need to display a text in HTML format available with no internet conection, please help me.

Thanks in advance.

I made a simple test to be sure


the result was

but if you set at the design tab, it works


Why does it stop working? in the past it works from block tab.

Hello @anubos112thez
I can understand that it is frustrating and appreciate you taking the time to investigate and provide all the information.
Based on our docs, on the “Set Web Viewer’s URL” block, you can connect only a URL that begins with HTTPS://. or to type in the name of an HTML file that has been uploaded to the project to display in the Web Viewer.

The functionality you are trying to make seems that it requires the “Post Message” block

To build it this way, you need to create an HTML file and upload it to the project assets. The HTML code will receive the data and show them to the web viewer. Here is an example code:

<html><head>
<script src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js" type="text/javascript"></script>
<script type="text/javascript">
// when we get a message from the app, display it on the page
ThunkableWebviewerExtension.receiveMessage(function(message) {
 document.body.innerHTML = message;
});
</script>
<title>Facture</title>
</head>
<body>
</body>
</html>
1 Like

Hello @ioannis firts of all I wanna say thank you for you support. And I wanna know if the functionallity of web viwer was change or not, because It was working before. You say “I have to investigate and provide all the information”, so this is the project test I made Thunkable on the other hand I attached a screen shot of block


even thoug when you use web simulator, it works.

But whe you download it or use Live test on Device, it wont work ;(

Thanks for helpping me.

I was trying to do what you said: “…The HTML code will receive the data and show them to the web viewer…” but it seems internet connection is needed, isn’t it?.. because a important requierement for my app is: content will be availble with NO internet connection… how can I do this?.. do I have to upload almost 5.000 HTML files to the project assets ??

Hello there!

I did the following

  1. I created the HTML file
  2. I tested it on my browser
  3. I attached it to my app
  4. I called it from the block function
    image
  5. It worked on the web simulator
  6. But on live test app I did not work

  1. I attach My App’s link Thunkable

I don’t know what I am doing in the wrong way. I thank you for your support!

Hello @anubos112thez
Thank you for sharing more information.
I think the issue is in step 4 that you set the Web Viewer’s URL.
When you set the Web Viewer’s URL you need to use HTTPS:// URLs with this block as it is mentioned in our docs

Since you have uploaded the HTML file on your project you can get the URL from here:

And then use it here: