corona
corona copied to clipboard
[HTML5]: runtime bug
- [x] I tried searching Solar2D forums for the solution.
Describe the bug After update to the last Solar2D build (I was using 2021.3659), my HTML5 game builds don´t work. Once I run the game in the browser and the loading bar finish their path, it simply nothing more happen. Another point: Once Solar2D finishing the build and I choose 'Open in browser', it does nothing.
You can tested it following the below link: https://alecgames.github.io/games/prueba/index.html
Target platform and where build was made:
- Device: PC (Chrome browser)
- OS: Windows 10
Additional context Something that I notice strange is that when I touch F12 in the browser to see the console, it does not show up.
whole test project or build.settings
settings = { splashScreen = { enable = false, },
orientation =
{
-- Supported values for orientation:
-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight
default = "portrait",
supported = { "portrait", },
},
win32 =
{ -- Settings for Win32 apps go here
preferenceStorage = "sqlite",
singleInstance = true,
},
window = { defaultMode = "normal",
defaultViewWidth = 399,
defaultViewHeight = 600,
resizable = false,
enableCloseButton = false,
suspendWhenMinimized = true,
titleText = {
default = "Fill the Rainbow",
},
},
--
-- Project section
--
excludeFiles =
{
all = { "Icon.png", "Icon*.ico", "Icon*.icns", "no_incluir", "Thumbs.db" },
},
}
After update to the last Solar2D build .. Hmm.. HTML5 builder has not been changed.
Did you try index-debug.html ? After starting the app the loading screen appears and then www.google.com page. Do you open that google page ?
On Fri, Apr 1, 2022 at 2:53 AM AleCGames @.***> wrote:
- I tried searching Solar2D forums https://forums.solar2d.com/ for the solution.
Describe the bug After update to the last Solar2D build, my HTML5 game builds don´t work. Once I run the game in the browser and the loading bar finish their path, it simply nothing more happen.
You can tested it following the below link: https://alecgames.github.io/games/prueba/index.html
Target platform and where build was made:
- Device: PC browser (Chrome browser)
- OS: Windows 10
Additional context Something that I notice strange is that when I touch F12 to see the console, it does not show up.
whole test project or build.settings
settings = { splashScreen = { enable = false, },
orientation =
{
-- Supported values for orientation:
-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight
default = "portrait",
supported = { "portrait", },
},
win32 =
{ -- Settings for Win32 apps go here
preferenceStorage = "sqlite",
singleInstance = true,
},
window = { defaultMode = "normal",
-- Me gusta la proporción (en vertical) con ratio 2/3.
defaultViewWidth = 399,
defaultViewHeight = 600,
resizable = false,
enableCloseButton = false,
suspendWhenMinimized = true,
titleText = {
default = "Fill the Rainbow - Play it now at CoolmathGames.com",
},
},
--
-- Project section
--
excludeFiles =
{
all = { "Icon.png", "Icon*.ico", "Icon*.icns", "no_incluir", "Thumbs.db" },
},
}
— Reply to this email directly, view it on GitHub https://github.com/coronalabs/corona/issues/372, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJEWXBFRFSIFDWXLGT3VCY3FVANCNFSM5SHBPGVQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
.. and could you share a mini test case that demonstrates this bug.
On Fri, Apr 1, 2022 at 9:35 AM microslots @.***> wrote:
After update to the last Solar2D build .. Hmm.. HTML5 builder has not been changed.
Did you try index-debug.html ? After starting the app the loading screen appears and then www.google.com page. Do you open that google page ?
On Fri, Apr 1, 2022 at 2:53 AM AleCGames @.***> wrote:
- I tried searching Solar2D forums https://forums.solar2d.com/ for the solution.
Describe the bug After update to the last Solar2D build, my HTML5 game builds don´t work. Once I run the game in the browser and the loading bar finish their path, it simply nothing more happen.
You can tested it following the below link: https://alecgames.github.io/games/prueba/index.html
Target platform and where build was made:
- Device: PC browser (Chrome browser)
- OS: Windows 10
Additional context Something that I notice strange is that when I touch F12 to see the console, it does not show up.
whole test project or build.settings
settings = { splashScreen = { enable = false, },
orientation =
{
-- Supported values for orientation:
-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight
default = "portrait",
supported = { "portrait", },
},
win32 =
{ -- Settings for Win32 apps go here
preferenceStorage = "sqlite",
singleInstance = true,
},
window = { defaultMode = "normal",
-- Me gusta la proporción (en vertical) con ratio 2/3.
defaultViewWidth = 399,
defaultViewHeight = 600,
resizable = false,
enableCloseButton = false,
suspendWhenMinimized = true,
titleText = {
default = "Fill the Rainbow - Play it now at CoolmathGames.com",
},
},
--
-- Project section
--
excludeFiles =
{
all = { "Icon.png", "Icon*.ico", "Icon*.icns", "no_incluir", "Thumbs.db" },
},
}
— Reply to this email directly, view it on GitHub https://github.com/coronalabs/corona/issues/372, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJEWXBFRFSIFDWXLGT3VCY3FVANCNFSM5SHBPGVQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Ok, first of all, thank you all for your comments... I have been doing more tests:
1st: I have noticed that the new Solar2D release (2022.3666) add a '.html5' string to the resultant folder (that is formed by your project name) from html5 builds. This avoid that you can test your project in local. If you remove that '.html5' suffix for your project folder, you will be able to run your project in local in your browser.
2nd: When I'm trying to run my html5 project in the browser, after starting the loading bar, I get this error in the browser console(and nothing more happen): Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0.
Update: I've uninstalled the 2022.3666 version and installed 2021.3659 (which I was using before). Now the html5 build work fine.
Thank you for the detailed tests.
1st: I have noticed that the new Solar2D release (2022.3666) adds a '.html5' string Yes, this is by design to distinguish apps for different platforms.
2nd: my current laptop is full HD (1920x1080) resolution. Tested your app on Win10 and Linux on Chrome, Opera, Edge and Firefox.. Works for me, 1920x1080 resolution was used.
I believe the "Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0." is related to text renderer, which in turn depends on the font and language used in the OS. Can you play with text fields and buttons in the game and see what is being changed.
On Sat, Apr 2, 2022 at 2:05 AM AleCGames @.***> wrote:
Ok, I have been doing more tests:
1st: I have noticed that the new Solar2D release (2022.3666) add a '.html5' string to the resultant folder (that is formed by your project name) from html5 builds. This avoid that you can test your project in local. If you remove that '.html5' suffix for your project folder, you will be able to run your project in local in your browser.
2nd: my current laptop is full HD (1920x1080) resolution. When I'm trying to run my html5 project in the browser, after starting the loading bar, I get this error in the browser console(and nothing more happen): Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0.
Nevertheless, when I test the same project in another laptop (1366x768 resolution) with the same chrome browser version (the last version), I do not get any error and the game run ok.
Note that I emphasize the resolution of the laptop because I can't find anything else that can interfere with this error. My current laptop has Windows 10, the other 8.1. Both have the same version of the Chrome browser (the latest).
Now you can test this behaviour in a new link: https://alecgames.github.io/games/prueba/index.html http://url or https://alecgames.github.io/games/prueba/index-debug.html http://url
— Reply to this email directly, view it on GitHub https://github.com/coronalabs/corona/issues/372#issuecomment-1086401052, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJGHWBE4HRGWAJVU2XDVC56LFANCNFSM5SHBPGVQ . You are receiving this because you commented.Message ID: @.***>
I believe the "Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0." is related to text renderer, which in turn depends on the font and language used in the OS. Can you play with text fields and buttons in the game and see what is being changed.
Ok, I 'll check that ...
Thank you for the detailed tests.
1st: I have noticed that the new Solar2D release (2022.3666) adds a '.html5' string Yes, this is by design to distinguish apps for different platforms. 2nd: my current laptop is full HD (1920x1080) resolution. Tested your app on Win10 and Linux on Chrome, Opera, Edge and Firefox.. Works for me, 1920x1080 resolution was used. I believe the "Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0." is related to text renderer, which in turn depends on the font and language used in the OS. Can you play with text fields and buttons in the game and see what is being changed. … On Sat, Apr 2, 2022 at 2:05 AM AleCGames @.> wrote: Ok, I have been doing more tests: 1st: I have noticed that the new Solar2D release (2022.3666) add a '.html5' string to the resultant folder (that is formed by your project name) from html5 builds. This avoid that you can test your project in local. If you remove that '.html5' suffix for your project folder, you will be able to run your project in local in your browser. 2nd: my current laptop is full HD (1920x1080) resolution. When I'm trying to run my html5 project in the browser, after starting the loading bar, I get this error in the browser console(and nothing more happen): Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. Nevertheless, when I test the same project in another laptop (1366x768 resolution) with the same chrome browser version (the last version), I do not get any error and the game run ok. Note that I emphasize the resolution of the laptop because I can't find anything else that can interfere with this error. My current laptop has Windows 10, the other 8.1. Both have the same version of the Chrome browser (the latest). Now you can test this behaviour in a new link: https://alecgames.github.io/games/prueba/index.html http://url or https://alecgames.github.io/games/prueba/index-debug.html http://url — Reply to this email directly, view it on GitHub <#372 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJGHWBE4HRGWAJVU2XDVC56LFANCNFSM5SHBPGVQ . You are receiving this because you commented.Message ID: @.>
I've made a simple html5 project in order to confirm your theory. When I run this project on local the result is the same (in the browser console). You can download this project from: https://github.com/AleCGames/alecgames.github.io/tree/main/html5
Message from the browser console: Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. at _jsRenderText (blob:http://127.0.0.1:20605/15749d3d-3365-445b-9952-3ed629ca3c18:1:238419)
Hmm.. Weird Built html5 app from https://github.com/AleCGames/alecgames.github.io/tree/main/html5 http://url/ using the Solar 2D ver 3666. Works for me. Did you try another font file ? Did you try the default font ?
On Wed, Apr 6, 2022 at 6:06 AM AleCGames @.***> wrote:
Thank you for the detailed tests.
1st: I have noticed that the new Solar2D release (2022.3666) adds a '.html5' string Yes, this is by design to distinguish apps for different platforms. 2nd: my current laptop is full HD (1920x1080) resolution. Tested your app on Win10 and Linux on Chrome, Opera, Edge and Firefox.. Works for me, 1920x1080 resolution was used. I believe the "Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0." is related to text renderer, which in turn depends on the font and language used in the OS. Can you play with text fields and buttons in the game and see what is being changed. … <#m_7930371317768395346_> On Sat, Apr 2, 2022 at 2:05 AM AleCGames @.> wrote: Ok, I have been doing more tests: 1st: I have noticed that the new Solar2D release (2022.3666) add a '.html5' string to the resultant folder (that is formed by your project name) from html5 builds. This avoid that you can test your project in local. If you remove that '.html5' suffix for your project folder, you will be able to run your project in local in your browser. 2nd: my current laptop is full HD (1920x1080) resolution. When I'm trying to run my html5 project in the browser, after starting the loading bar, I get this error in the browser console(and nothing more happen): Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. Nevertheless, when I test the same project in another laptop (1366x768 resolution) with the same chrome browser version (the last version), I do not get any error and the game run ok. Note that I emphasize the resolution of the laptop because I can't find anything else that can interfere with this error. My current laptop has Windows 10, the other 8.1. Both have the same version of the Chrome browser (the latest). Now you can test this behaviour in a new link: https://alecgames.github.io/games/prueba/index.html https://alecgames.github.io/games/prueba/index.html http://url http://url or https://alecgames.github.io/games/prueba/index-debug.html https://alecgames.github.io/games/prueba/index-debug.html http://url http://url — Reply to this email directly, view it on GitHub <#372 (comment) https://github.com/coronalabs/corona/issues/372#issuecomment-1086401052>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJGHWBE4HRGWAJVU2XDVC56LFANCNFSM5SHBPGVQ https://github.com/notifications/unsubscribe-auth/ABI7FJGHWBE4HRGWAJVU2XDVC56LFANCNFSM5SHBPGVQ . You are receiving this because you commented.Message ID: @.>
I've made a simple html5 project in order to confirm your theory. When I run this project on local the result is the same (in the browser console). You can download this project from: https://github.com/AleCGames/alecgames.github.io/tree/main/html5 http://url
Message from the browser console: Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. at _jsRenderText (blob: http://127.0.0.1:20605/15749d3d-3365-445b-9952-3ed629ca3c18:1:238419)
— Reply to this email directly, view it on GitHub https://github.com/coronalabs/corona/issues/372#issuecomment-1089722690, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJDJRT2EHK4P4DCHNSDVDT5TNANCNFSM5SHBPGVQ . You are receiving this because you commented.Message ID: @.***>
Hmm.. Weird Built html5 app from https://github.com/AleCGames/alecgames.github.io/tree/main/html5 http://url/ using the Solar 2D ver 3666. Works for me. Did you try another font file ? Did you try the default font ? … On Wed, Apr 6, 2022 at 6:06 AM AleCGames @.> wrote: Thank you for the detailed tests. 1st: I have noticed that the new Solar2D release (2022.3666) adds a '.html5' string Yes, this is by design to distinguish apps for different platforms. 2nd: my current laptop is full HD (1920x1080) resolution. Tested your app on Win10 and Linux on Chrome, Opera, Edge and Firefox.. Works for me, 1920x1080 resolution was used. I believe the "Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0." is related to text renderer, which in turn depends on the font and language used in the OS. Can you play with text fields and buttons in the game and see what is being changed. … <#m_7930371317768395346_> On Sat, Apr 2, 2022 at 2:05 AM AleCGames @.> wrote: Ok, I have been doing more tests: 1st: I have noticed that the new Solar2D release (2022.3666) add a '.html5' string to the resultant folder (that is formed by your project name) from html5 builds. This avoid that you can test your project in local. If you remove that '.html5' suffix for your project folder, you will be able to run your project in local in your browser. 2nd: my current laptop is full HD (1920x1080) resolution. When I'm trying to run my html5 project in the browser, after starting the loading bar, I get this error in the browser console(and nothing more happen): Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. Nevertheless, when I test the same project in another laptop (1366x768 resolution) with the same chrome browser version (the last version), I do not get any error and the game run ok. Note that I emphasize the resolution of the laptop because I can't find anything else that can interfere with this error. My current laptop has Windows 10, the other 8.1. Both have the same version of the Chrome browser (the latest). Now you can test this behaviour in a new link: https://alecgames.github.io/games/prueba/index.html https://alecgames.github.io/games/prueba/index.html http://url http://url or https://alecgames.github.io/games/prueba/index-debug.html https://alecgames.github.io/games/prueba/index-debug.html http://url http://url — Reply to this email directly, view it on GitHub <#372 (comment) <#372 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJGHWBE4HRGWAJVU2XDVC56LFANCNFSM5SHBPGVQ https://github.com/notifications/unsubscribe-auth/ABI7FJGHWBE4HRGWAJVU2XDVC56LFANCNFSM5SHBPGVQ . You are receiving this because you commented.Message ID: @.> I've made a simple html5 project in order to confirm your theory. When I run this project on local the result is the same (in the browser console). You can download this project from: https://github.com/AleCGames/alecgames.github.io/tree/main/html5 http://url Message from the browser console: Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. at _jsRenderText (blob: http://127.0.0.1:20605/15749d3d-3365-445b-9952-3ed629ca3c18:1:238419) — Reply to this email directly, view it on GitHub <#372 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJDJRT2EHK4P4DCHNSDVDT5TNANCNFSM5SHBPGVQ . You are receiving this because you commented.Message ID: @.**>
Ok, I tested it with another font and the default font and the result was the same. Nevertheless I've installed two Solar2D versions on my laptop (2022.3666 and 2021.3659) and with the second one it works. What I'm missing?
For now I have no idea what has been happening. 3666 and 3659 versions use the same sources. Unlike 3659, 3666 HTML5 builder creates wasm based apps. It's the only difference. Did you try to build the app on another PC ? Did you try sample apps from https://github.com/coronalabs/samples-coronasdk ?
On Wed, Apr 6, 2022 at 6:57 PM AleCGames @.***> wrote:
Hmm.. Weird Built html5 app from https://github.com/AleCGames/alecgames.github.io/tree/main/html5 http://url/ using the Solar 2D ver 3666. Works for me. Did you try another font file ? Did you try the default font ? … <#m_3080853559777693879_> On Wed, Apr 6, 2022 at 6:06 AM AleCGames @.> wrote: Thank you for the detailed tests. 1st: I have noticed that the new Solar2D release (2022.3666) adds a '.html5' string Yes, this is by design to distinguish apps for different platforms. 2nd: my current laptop is full HD (1920x1080) resolution. Tested your app on Win10 and Linux on Chrome, Opera, Edge and Firefox.. Works for me, 1920x1080 resolution was used. I believe the "Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0." is related to text renderer, which in turn depends on the font and language used in the OS. Can you play with text fields and buttons in the game and see what is being changed. … <#m_7930371317768395346_> On Sat, Apr 2, 2022 at 2:05 AM AleCGames @.> wrote: Ok, I have been doing more tests: 1st: I have noticed that the new Solar2D release (2022.3666) add a '.html5' string to the resultant folder (that is formed by your project name) from html5 builds. This avoid that you can test your project in local. If you remove that '.html5' suffix for your project folder, you will be able to run your project in local in your browser. 2nd: my current laptop is full HD (1920x1080) resolution. When I'm trying to run my html5 project in the browser, after starting the loading bar, I get this error in the browser console(and nothing more happen): Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. Nevertheless, when I test the same project in another laptop (1366x768 resolution) with the same chrome browser version (the last version), I do not get any error and the game run ok. Note that I emphasize the resolution of the laptop because I can't find anything else that can interfere with this error. My current laptop has Windows 10, the other 8.1. Both have the same version of the Chrome browser (the latest). Now you can test this behaviour in a new link: https://alecgames.github.io/games/prueba/index.html https://alecgames.github.io/games/prueba/index.html https://alecgames.github.io/games/prueba/index.html https://alecgames.github.io/games/prueba/index.html http://url http://url http://url http://url or https://alecgames.github.io/games/prueba/index-debug.html https://alecgames.github.io/games/prueba/index-debug.html https://alecgames.github.io/games/prueba/index-debug.html https://alecgames.github.io/games/prueba/index-debug.html http://url http://url http://url http://url — Reply to this email directly, view it on GitHub <#372 https://github.com/coronalabs/corona/issues/372 (comment) <#372 (comment) https://github.com/coronalabs/corona/issues/372#issuecomment-1086401052>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJGHWBE4HRGWAJVU2XDVC56LFANCNFSM5SHBPGVQ https://github.com/notifications/unsubscribe-auth/ABI7FJGHWBE4HRGWAJVU2XDVC56LFANCNFSM5SHBPGVQ https://github.com/notifications/unsubscribe-auth/ABI7FJGHWBE4HRGWAJVU2XDVC56LFANCNFSM5SHBPGVQ https://github.com/notifications/unsubscribe-auth/ABI7FJGHWBE4HRGWAJVU2XDVC56LFANCNFSM5SHBPGVQ . You are receiving this because you commented.Message ID: @.> I've made a simple html5 project in order to confirm your theory. When I run this project on local the result is the same (in the browser console). You can download this project from: https://github.com/AleCGames/alecgames.github.io/tree/main/html5 https://github.com/AleCGames/alecgames.github.io/tree/main/html5 http://url http://url Message from the browser console: Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0. at _jsRenderText (blob: http://127.0.0.1:20605/15749d3d-3365-445b-9952-3ed629ca3c18:1:238419 http://127.0.0.1:20605/15749d3d-3365-445b-9952-3ed629ca3c18:1:238419) — Reply to this email directly, view it on GitHub <#372 (comment) https://github.com/coronalabs/corona/issues/372#issuecomment-1089722690>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJDJRT2EHK4P4DCHNSDVDT5TNANCNFSM5SHBPGVQ https://github.com/notifications/unsubscribe-auth/ABI7FJDJRT2EHK4P4DCHNSDVDT5TNANCNFSM5SHBPGVQ . You are receiving this because you commented.Message ID: @.**>
Ok, I tested it with another font and the default font and the result was the same. Nevertheless I've installed two Solar2D versions on my laptop (2022.3666 and 2021.3659) and with the second one it works. What I'm missing?
— Reply to this email directly, view it on GitHub https://github.com/coronalabs/corona/issues/372#issuecomment-1090435428, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI7FJGNCOZEJFVBU5DE3ODVDWX6HANCNFSM5SHBPGVQ . You are receiving this because you commented.Message ID: @.***>
I have a vague memory of these occurring to me as well when I updated the Playground to use the WASM builds, but that it was resolved when I swapped some image filet types.
I could be completely wrong, but I can take a look at my commit history for the Playground a bit later to see if I left some clues there.