Xmanu
(Xmanu)
September 17, 2021, 8:31am
#1
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.
1. Introduction The original and popular Chartmaker extension has been in use by AI2 developers for years, and has provided a quick method to generate simple charts for pie, bar or line. This extension is a complete rewrite of the original, builds...
Reading time: 5 mins 🕑
Likes: 67 ❤
2 Likes
Anil_M
(Codal Inc.)
September 17, 2021, 8:33am
#2
You Contact To Extension developer this is not kodular problem thanks
Xmanu
(Xmanu)
September 17, 2021, 8:46am
#3
mmm Sure Tech_Developer1 ?
the same aia demo works on AI2 actually with SDK 30
Boban
(Boban Stojmenovic)
September 17, 2021, 9:04am
#4
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
Xmanu
(Xmanu)
September 17, 2021, 9:50am
#6
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 ?
I have added another detail to my overview (top right, see pink box) and thus completed the overview.
(I hope. )
[grafik]
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.)
TimAi2
(metricrat)
September 17, 2021, 10:03am
#8
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
.
Xmanu
(Xmanu)
September 17, 2021, 10:18am
#10
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
Ok, but there are different temporary-file directories
.
(e.g. in the ASD
or in the privateDir
)
TimAi2
(metricrat)
September 17, 2021, 6:52pm
#13
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…
Xmanu
(Xmanu)
September 19, 2021, 11:42am
#14
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
Xmanu
(Xmanu)
September 19, 2021, 3:32pm
#15
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
TimAi2
(metricrat)
October 26, 2021, 2:51pm
#16
The extension has now been updated to provide for file access in Kodular.
1. Introduction The original and popular Chartmaker extension has been in use by AI2 developers for years, and has provided a quick method to generate simple charts for pie, bar or line. This extension is a complete rewrite of the original, builds...
Reading time: 6 mins 🕑
Likes: 88 ❤
Please report if still not working…
2 Likes
What am i doing wrong?
It doesn’t show anything.
dora_paz
(Dora)
April 23, 2022, 6:33am
#18
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