Webviewer is not able to display html file from ASD anymore in Fenix 1.5.4

@bodymindpower can you please test this again on Android 12 using the companion app in Kodular 1.5.4…
I get ERR_ACCESS_DENIED…
reading from assets works fine…

here is my test project
ReadHtmlFromASD.aia (43.5 KB)

Taifun

1 Like

Yes, this is a bug (same result on a Pixel 4 XL, Android 12, API 32).
Works fine with AI2.

thank you for your tests… did you try again on older devices? does it still work there?
just to find out, if it is an Android 12 issue or a general Kodular 1.5.4 issue…

Taifun

Perhaps a workaround is to create an html file that will display the generated image, fed by a webviewstring, then place the html file in the same directory as the generated image. No file path needed just the file name. Would this work ?

Example html (courtesy of @SHUBHAMR69 )

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, user-scalable=yes">
    
	<title>Image</title>
	<style type="text/css">
	      img {
	         object-fit: contain;
	      } 
	</style>
</head>
<body style = "background:#ffffff">
    <div id="within"></div>
</body>
<script type="text/javascript">
var base = document.getElementById("within");
var img = document.createElement('img');
img.src = window.AppInventor.getWebViewString();
img.style.width = "100%";
img.style.height = "100vh";
base.appendChild(img);
</script>
</html>
1 Like

Same result on Android 12, 11, 10, 9, …

1 Like

thank you for trying to help… this is the original concept… however even a simpler version, which uses a fix image does not work… and btw. the issue is not the image… it does not display the html file at all from the ASD, it works from the assets…

this is my test html file from here (actually it is a very old snippet)

<!doctype html>
<head>
 <meta charset="utf-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 <title>Hello World</title>
</head>
<body>
 <h1><a name="top"></a>Hello World</h1>
 <p>
  <img src="logo.png" width="48" height="48" alt="" title="">
 </p>
</body>
</html>

thank you @bodymindpower !
I now moved this thread into the #feedback:bugs category…
hopefully it helps to get the attention of the sleepy @Kodular team…

Taifun

2 Likes

Ahh, OK :wink: bug time then …

there was a display error in version 1.5.3, I wrote this a long time ago

@Groza95 this seems to be related…
what was the solution for you? you marked that thread as solved… did you use @TimAi2’s extension?

Taifun

everything worked fine with the extension.

1 Like

Maybe try copying that file to the directory of the image, or provide an abosolute path. Also, remember that this requires WebViewString.

Welcome to the community
Sorry, this does unfortunately not work

Also to display an image, it is not necessary to use a webviewstring, see again my example project

This is a Kodular bug
It works fine in App Inventor
as workaround, @TimAi2 's extension can be used

Taifun