Getting started with HTML5

Thank you, thank you, thank you!

Hello!

I got an error, when has checked my application on the iphone 4s.

Error: Faile to mount IDBFS abort(“Assertion failed: IDBFS used, but indexedDB not supported”)
at jsStackTrace@blob:http://probel.su/56fc9a50-c5ca-4a3a-a09f-9a0a0d14b5f6:1:23238

Link to app http://probel.su/mobh5/scrtest/index.html

Code of my Application

    for i=1,17 do
        for j=1,27 do
            local box = display.newRect( 0,0 , 20, 20 );
            box:setFillColor( 1, 0, 0 );
            box:setStrokeColor( 0, 0, 1 );
            box.strokeWidth = 1;
            box.x = 20*(i-1);
            box.y = 20*(j-1);
            function onTouch( event )
                if event.phase == “began” then
                    event.target:setFillColor( 0, 1, 0 );
                end;
            end;
            box:addEventListener( “touch”, onTouch );
        end;    
    end;
    
version ios 9.3.5 (13G36)

browser Google Chrome last version

Corona Simulator 2018.3340 (2018.8.2)

HTML5 apps use IDBFS file system to keep permanent data. Iphone 4s does not support it. We are working on the issue.

Build 3345 should fix the issue.

hello guys,

i’m having a slight problem with Firefox

if you open any HTML5 app created with corona you get the attached error message (FireFox.png)

there is a solution for it … but it is not logical to ask users to do it by running command line and stuff like that

after you follow the solution it works…but happens again if you clear Fire Fox history

in Internet Explorer i had an error message for running audio (a simple wav file that plays on click)

Chrome is not giving any problems on anything

Regrads,

Tariq

@kakula Can you share URL to the app ?

this is the live link

http://jac.jo/doing-business-with-us/lands-at-queen-alia-airport/maps/

if the link above gives you trouble (as the client might be updating it because i just sent him an update without the audio to make it run in IE) please try this one … it is exactly the same package but hosted elsewhere

http://fruits-001-site1.gtempurl.com/bridge/index.html

please try it with IE and FireFox and Chrome

As related to “if you open any HTML5 app created with corona you get the attached error message (FireFox.png)”

I could not reproduce the issue. My FF 61.0.2 opens the URL without any popup windows. The message you see is not error message and I believe it not related to html5 app. Here’s a thread about “firefox asking to choose user profile”: https://support.mozilla.org/en-US/questions/1046209

As related to “in Internet Explorer i had an error message for running audio”

IE does not support modern JavaScript audio API used by html5 apps. And so for now our html5 apps is not fully compatible with IE.

for internet explorer i removed the audio … it is not really important …just the sound of a mouse click

as for FireFox … i didn’t have the problem just like you initially

but when i cleared history and site data and ran it again the problem started to show

i have the same version of firefox as yours

Regards,

Tariq

The screenshot shows it’s a IDBFS thing. Perhaps you’re running in private browsing mode?

My understanding is that you cannot run in private mode, as it doesn’t let you access cache data:

"Cached Web Content and Offline Web Content and User Data : No temporary Internet files (cached files) or files that websites save for offline use will be saved."

from: https://support.mozilla.org/en-US/kb/private-browsing-use-firefox-without-history#w_what-does-private-browsing-not-save

I have made a small game on Corona sdk.
In the simulator everything works very quickly.
The game begins working slowly after exporting into HTML5 .
Please adwise how to correct it?

make sure you have the recent corona update installed  2018.3366 …  use this link to get there

https://developer.coronalabs.com/downloads/coronasdk

if it is still slow share the code somewhere perhaps someone can assist you

The version of my Corona Simulator is 2018.3366 ( 2018.9.7 )

There are many things which can affect on app performance. Check images sizes, they should not be too big. Check loops, what actions are executed in them. Try to disable some parts of the app and see how it affects on performance. 

Can you share a link? That would give all of us much more to base our input on.

Also, think about how much pixels you’re filling each frame. Small sprites (like just rectangles) can take a big hit on drawing time if they cover large areas of the screen.

Thanks for your answers.
Link of the game is http://probel.su/blines/
Everything works fast on the PC.
The game begins working slowly on the mobile devices.
This problem appears approximately after 30 steps
The function collectgarbage(“count”) shows the same values  every step.
The quantity of variables in _G remains approximately the same.
If someone is ready to help with the game code, I’ll send it on email.

I tested the game on the mobile devices: Asus MemoPad 7, Xiaomi remdi 4x, Xiaomi remdi 6.
The version of my Corona Simulator is 2018.3366 ( 2018.9.7 )

I think that the event “touch: moved” generates every time with the increasing delay.

The version of my Corona Simulator is 2018.3368 ( 2018.9.12 )

I clicked on the link on my MacBook Pro in Chrome and clicking on the balls changed a number, but I didn’t see anything else happening. I didn’t see anything in the console log (after running the …/index-debug.html version.

How should this be working? Where should I see the results of your collectgarbage(“count”)? What leads you to believe that you’re getting excessive “moved” phases?

Rob

Thanks.
I’ve solved this problem.
The event handlers stood on every ball.
I’ve deleted them and put one event handler on the game field.

Everything worked quickly only in the Corona Simulator earlier .
Now it works quickly in version HTTL5.

Hello
I use this example in the Firefox browser:
https://coronalabs.com/blog/2018/03/22/making-html5-plugins-for-corona/

I receive the following mistake:
ERROR: Runtime error
?:0: attempt to call field ‘addEventListener’ (a nil value)
stack traceback:
    ?: in main chunk

How can I correct it?

Link: http://probel.su/mobh5/test2/index.html