HTML export not working under Chrome

From the Asset Store
2D fighting template based in the game that defined the fighting games genre.

    I just exported a small project for a demo coder competition and ran into a pretty weird issue.

    The exported index.html works just the way it should on Firefox but on Chrome, I'm merely greeted by a black background.

    This is true for all my exports and I'm wondering why that is.

    The app works just as it should inside preview mode (even when choosing Google Chrome) and as a Node-Webkit export.

    Manually packaging Node-Webkit apps (i. e. outside of Construct 2) stopped working with Construct 1.30 HTML exports, as well. Now all that happens whenever I execute such a self-packed app is a message window popping up, telling me that I can't use the HTML offline while also retaining the black background with nothing on it.

    What does the console says when you check for errors in the browser ?

    Edit: Investing a bit more, this only happens when you try to execute the project in offline mode (locally on the computer if you will), which isn't an expected way to do.

    Host the project online and execute it, that's the intended way of executing HTML5 projects.

    What does the console says when you check for errors in the browser ?

    Edit: Investing a bit more, this only happens when you try to execute the project in offline mode (locally on the computer if you will), which isn't an expected way to do.

    Host the project online and execute it, that's the intended way of executing HTML5 projects.

    Here's the output:

    Viewport target-densitydpi is not supported. | index.html:9

    Uncaught Error: SecurityError: DOM Exception 18 | c2runtime.js:1740

    The first one is pretty normal though, since it got deprecated a few months ago.

    I do need to get this working offline, since that's what the jury asks for.

    Lastly, I see no reason why such a project wouldn't run offline on it's own (aside of Google Chrome not being able to access the appcache or something like that, which I haven't yet checked). All my manually coded HTML projects do.

    EDIT: Never mind. Found out that this is due to Google Chrome's own security policies. Can't really fix it without stripping my demo off the pathfinding Webworker. The only solution I could find is to run Google Chrome with the "--allow-file-access-from-file" Chromium flag.

    Still weird that the same would also happen with manual Node Webkit builds. The only obvious thing that has changed since the version I used previously is the inclusion of jquery 2.0 and the fact that, by default, Index.html no longer looks for Jquery on it's official website.

    You mean you're running your exported project from disk? That's never been supported. You have to upload projects before they work.

    You mean you're running your exported project from disk? That's never been supported. You have to upload projects before they work.

    It has always worked (and still does), actually. Just not under Chrome or IE.

    Firefox doesn't prohibit the use of offline cookies, so HTML exports work fine locally.

    The one thing that's still puzzling me is why manual Node-Webkit exports stopped working for me with R130. My build script is pretty simple and doesn't really do anything esoteric.

    #MakeNode.ps1
    $date = Get-date -format "dddd-dd-MMMM-yyyy_HH.mm~ms"
    
    CMD /C Sevenzip a -t7z -r "C:\users\$env:username\downloads\node-webkit-v0.5.1-win-ia32\node-webkit-v0.5.1-win-ia32\Package.7z" "C:\users\$env:username\desktop\Powershell Pr?sentation1\*.*" > C:\Log.log
    
    mkdir -p C:\users\$env:username\downloads\node-webkit-v0.5.1-win-ia32\node-webkit-v0.5.1-win-ia32\$date
    
    CMD /C Copy /b C:\users\$env:username\downloads\node-webkit-v0.5.1-win-ia32\node-webkit-v0.5.1-win-ia32\nw.exe+package.7z C:\users\$env:username\downloads\node-webkit-v0.5.1-win-ia32\node-webkit-v0.5.1-win-ia32\$date\package.exe
    

    Never mind that I still need to add a few lines, copying the rest of the Node-Webkit to the output folder. I currently do that manually (blame lazyness). Still, the script should (and, in fact, did) work properly.

    Running exported HTML5 websites from disk has never been supported. That means it may or may not work, but if it doesn't work, we are not going to fix it.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads

    Ashley i am getting black background for water effect event after uploading it online.

    https://koolgames.itch.io/cat-runner-game

    Ashley i am getting black background for water effect event after uploading it online.

    https://koolgames.itch.io/cat-runner-game

    cooltaby

    This thread is nearly 3.5 years old so it's highly doubtful your post is related to the original poster's problem.Since it is so old, thread will be locked.

    Please start your own thread with your issue and remember if you want a quick resolution, consider uploading a simple .capx that highlights your problem.

    This will allow all the helpful users - not just Ashley who is very busy - to try and help you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)