I put the webviewer in visible at a normal size it displays all pages correctly but if I put a hosted page for example index.html with this 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>
when I send the message via thunkable nothing happens I have a blank page yet before the updates all worked perfectly, so the perfect example is this post
<html>
<head>
<script src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js" type="text/javascript"></script>
<title>Facture</title>
</head>
<body>
<script>
// when we get a message from the app, display it on the page
ThunkableWebviewerExtension.receiveMessage(function(message) {
document.body.innerHTML = message;
});
</script>
</body>
</html>
It doesn’t work for me have you tried the script? On android
Local files like test.html or index.html inserted in the project files do not work in the webviewer. I have the impression to be the only one to have this problem.
Can you try to insert an html file to your project and try to read it with the webviewer ?
Sorry you’re experiencing this issue. Could you DM me a project link and I’ll take a closer look for you! Be sure to provide answer to the questions below if you do send the link. It’ll help me diagnose the issue here.
A few questions:
is the device you’re testing this online at the time of testing?
What is the success rate on other devices using the same app?
The app works fine if the HTML is referenced by URL. But if you add the HTML file to the project assets then the file will work and receive the parameters passed and can pass back any thing you give it but will not show text on the HTML page.
Here is a link to the project page. Oddly enough, the issue doesnt exist on the project page preview. Only in the ‘in editor’ preview and the companion app preview.
The bug is occurring when the HTML is packaged with the app. Although the HTML is displayed, it would seem that the scripts are not being ran on the page.
I have prepared this simplified example of this issue.
On screen 1, the label on the screen does not react to the button press from within the webviewer.
On screen 2, the label will change when a message is received from the webviewer.
the same HTML file is used in both screens but 1 is a local asset and the other is hosted on Github pages.
I am using an exact replica of the code provided on the Github page. I created a local copy by copy/pasting into VS code and loading the file into the app assets. I then uploaded a copy here to reference in the app as a comparison of local vs hosted HTML page.
They are super busy these days. I’m sure they are attending to this behind the scenes. In the meantime, i have made a copy of this issue in the appropriate place over at GitHub.
Follow along below. When the bug is verified/fixed, we can update this forum post accordingly.