# Web viewer stop working correctly

**URL:** <https://community.thunkable.com/t/web-viewer-stop-working-correctly/2736724>\
**Category:** Issues / Bugs\
**Tags:** webviewer\
**Created:** [December 3, 2023, 12:26pm UTC](https://community.thunkable.com/t/web-viewer-stop-working-correctly/2736724 "2023-12-03T12:26:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anubos112thez](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@anubos112thez](https://community.thunkable.com/u/anubos112thez)\
**Post date:** [December 3, 2023, 12:26pm UTC](https://community.thunkable.com/t/web-viewer-stop-working-correctly/2736724/1 "2023-12-03T12:26:28Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/4/c40544878c8e22d099d7c7f0546cdcda6a2c3a3b.png)  
and now it does not work, look at these blocks  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/8/087f33f3739cf3d55729fba8b6440281c5825070.png)  
the result was  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/0/c00c014f9b01c30217b0a681932690b626c10990.png)  
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.

---

<div class="post-metadata">

**Author:** ![anubos112thez](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@anubos112thez](https://community.thunkable.com/u/anubos112thez)\
**Post date:** [December 5, 2023, 11:33am UTC](https://community.thunkable.com/t/web-viewer-stop-working-correctly/2736724/2 "2023-12-05T11:33:08Z")

</div>

I made a simple test to be sure

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/2/c2d9c87296c0ccd073d84b4316677328148fdb6f.png)  
the result was  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/0/60894b2011011b3291b13540a28791ff628c8225.png)

but if you set at the design tab, it works

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/3/33cdf4c8c2ec0c81444dcc13f0f4ccf9676ef9e4.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/3/13a514393490348d73102eb58ddd6fac8a905740.png)

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

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [December 6, 2023, 11:56pm UTC](https://community.thunkable.com/t/web-viewer-stop-working-correctly/2736724/5 "2023-12-06T23:56:56Z")

</div>

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](https://docs.thunkable.com/app-design/ui-components/embed-components/web-viewer#web-viewer), 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](https://docs.thunkable.com/app-design/ui-components/embed-components/web-viewer#post-message)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/0/5013ce7e4afeb8dd853f9fad95ad385a716ba52f.png)

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:

```auto
<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>

```

---

<div class="post-metadata">

**Author:** ![anubos112thez](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@anubos112thez](https://community.thunkable.com/u/anubos112thez)\
**Post date:** [December 7, 2023, 8:05pm UTC](https://community.thunkable.com/t/web-viewer-stop-working-correctly/2736724/6 "2023-12-07T20:05:36Z")

</div>

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](https://x.thunkable.com/copy/3cfd0f8d9908937a7352d0615c28573d) on the other hand I attached a screen shot of block

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/7/276462b4f58fd55ccc5b63241983da6936fa6429.png)  
even thoug when you use web simulator, it works.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/7/d7cf02c60d0347581af9227fbc6b98d6087c77cf.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/7/97ecf03bbc002d44b8988006e476507eaa3e3f0c.png)

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/6/96e0a8797c88ebc866a095ede469525d769a877c.png)

Thanks for helpping me.

---

<div class="post-metadata">

**Author:** ![anubos112thez](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@anubos112thez](https://community.thunkable.com/u/anubos112thez)\
**Post date:** [December 9, 2023, 5:51pm UTC](https://community.thunkable.com/t/web-viewer-stop-working-correctly/2736724/7 "2023-12-09T17:51:25Z")

</div>

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 ??

---

<div class="post-metadata">

**Author:** ![anubos112thez](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@anubos112thez](https://community.thunkable.com/u/anubos112thez)\
**Post date:** [December 12, 2023, 12:20pm UTC](https://community.thunkable.com/t/web-viewer-stop-working-correctly/2736724/8 "2023-12-12T12:20:31Z")

</div>

Hello there!

I did the following

1. I created the HTML file  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/0/f0b7e9e6759883f8fc129349d198d7167e186372.png)
2. I tested it on my browser  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/c/5c896a6c15c4c7aac40f0075561305fa2544b246.png)
3. I attached it to my app  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/a/4adfbe4434587a5de170a73be7d46d527cfd757a.png)
4. I called it from the block function  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/2/c2eb7e6f243d0da5f227360d95afa837eb6cf71d.png)
5. It worked on the web simulator  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/1/21ea8842da707105671e91d8758c0515fbdef226.png)
6. But on live test app I did not work  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/b/3b0311f2ade7fc13d5fda6cbe2e23502bdc72d2e.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/2/e2e3c7fb0b5914b5626957c6caf92674067b6b8e.png)

1. I attach My App’s link [Thunkable](https://x.thunkable.com/copy/b6d05e5526da9567ff78eb8834c4157b)

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

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [December 15, 2023, 11:39am UTC](https://community.thunkable.com/t/web-viewer-stop-working-correctly/2736724/9 "2023-12-15T11:39:47Z")

</div>

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](https://docs.thunkable.com/app-design/ui-components/embed-components/web-viewer#url)

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/5/a579a710f75d86afc678171cf995f14c28c6ec27.png)

And then use it here:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/d/6dfadb85212170d04fa5138ed9f965fcb969df2a.png)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:33pm UTC](https://community.thunkable.com/t/web-viewer-stop-working-correctly/2736724/10 "2024-11-08T13:33:18Z")

</div>


