ChartMakerPlus extension not working in Fenix 1.5.2 Release

After Fenix 1.5.2 update the extension refuse to work on the WebView component. Works perfect in Fenix 1.5.0 and in AI2 actually.
Kodular Companion 1.5.2 same error, too.

Describe your issue

Looks like the html page created in cache in the ASD has write or read issue.

Steps to reproduce the issue

Complie or try with Companion the ChartMakerPlusDemo.
ChartMakerPlus.aia (44.0 KB)

Expected Behaviour

Draw Charts on a webview component.

Actual Behaviour

net::ERR_ACCESS_DENIED

Show your Blocks

Attached ChartMakerPlusDemo blocks on a Kodular .aia

Android version

Same error tested on Android 11, 10 and 9.

2 Likes

You Contact To Extension developer this is not kodular problem thanks

mmm Sure Tech_Developer1 ?
the same aia demo works on AI2 actually with SDK 30

Thanks, reported to staff!

2 Likes

I’m not sure whether it is actually intended by the extension to store the HTML in the privateDir's cache. Can you clarify this please. → @TimAi2

Following your excellent storage graphic on Android, Anke, is not a bad place for creating a cache file, this path is ASD and dont need special permissions, or something has chaged in SDK30 about this ?

thansk for your support

Yes, but it seems @TimAi2 saved in the privateDir (and I wonder about that).
Btw, please do not just post something that you did not create yourself, but link to it. (I’ll remove the image.)

This was a carry over from the original extension by Mills College. I actually modified things so that the html was deleted after use.


File file = File.createTempFile("display", ".html");
            filePath = file.getAbsolutePath();
            FileWriter filewriter = new FileWriter(file);
            filewriter.write(htmlCode);
            filewriter.close();

            if(webViewer instanceof WebViewer){
                ((WebViewer) webViewer).GoToUrl("file://" + filePath);
            } else {
                ((WebView) webViewer).loadUrl("file://" + filePath);
            }
            file.deleteOnExit();

Ok, that wasn’t my question, but whether it is (was) cached in the privateDir.

Blockquote
Btw, please do not just post something that you did not create yourself, but link to it. (I’ll remove the image.)

Sorry, you are right, corrected now

See here:

Ok, but there are different temporary-file directories.
(e.g. in the ASD or in the privateDir)

Not sure why the temporary saving of files is an issue?

The extension was targeted at AI2 and it works on AI2 companion and compiled. It was never expressly stated or intended necessarily for the extension to work on Kodular…

Hi, more test if this helps Kodular s developers with this issue:
Looks like the cached files exist in this privateDir 's cache path, take a look:

127|zeroflte:/data/user/0/io.kodular.xmanugu.graficas/cache # ls -la
total 48
drwxrws–x 3 u0_a112 u0_a112_cache 4096 2021-09-16 19:05 .
drwx------ 9 u0_a112 u0_a112 4096 2021-09-16 19:05 …
drwx–S— 6 u0_a112 u0_a112_cache 4096 2021-09-16 19:05 WebView
-rw------- 1 u0_a112 u0_a112_cache 8817 2021-09-16 19:05 display128664618634447521.html
-rw------- 1 u0_a112 u0_a112_cache 1492 2021-09-16 19:05 display5206458307154928921.html
-rw------- 1 u0_a112 u0_a112_cache 1416 2021-09-16 19:05 display5546864585329534640.html
-rw------- 1 u0_a112 u0_a112_cache 1416 2021-09-16 19:05 display5983164455948344007.html
-rw------- 1 u0_a112 u0_a112_cache 1416 2021-09-16 19:05 display8588231194088243416.html
-rw------- 1 u0_a112 u0_a112_cache 1509 2021-09-16 19:05 display955531362873014061.html
zeroflte:/data/user/0/io.kodular.xmanugu.graficas/cache #

Looks like the extension create and write the file in this path, but later the webview component can not read inside, I guess.

Hope this helps Kodular 's developers, and thanks for your support.

1 Like

Hi, looking for workaround, knowing that the issue is more related with WebView component, I found this great extension from Profile - lukegackle - Kodular Community, the:
http://thunkableblocks.blogspot.com/2017/06/webviewtools-extension-for-app-inventor.html

using only 2 blocks on the screen init to allow the webview file access give a workaround, thus solve the error access in Fenix 1.5.2.

If moderators consider, change the Thread tittle to something like “Webview error accesing cache dir in Fenix 1.5.2 Release”, maybe is more exact, nothing really related with ChartMakerPlus.
Thanks for your support.

2 Likes

The extension has now been updated to provide for file access in Kodular.

Please report if still not working…

2 Likes

What am i doing wrong?

It doesn’t show anything.

Go to project settings and make sure Show Lists as json is checked. If it is not then check it, refresh creator and you will be able to see the chart

See also

2 Likes