Need help with a white screen on Android/iOS exports

1 favourites
  • 14 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello everyone,

    I need your help with a strange behaviour when exporting to Android (signed APK) and iOS (XCode project).

    When running my game in Construct 3 in Google Chrome, everything works fine and as expected.

    Sometimes I want to try to install the game directly onto my mobile devices, which are:

    - Samsung Galaxy S6

    - iPhone 8

    - iPad Air 2

    (more devices to follow when the beta starts.)

    But if I export my app to Android (signed or debug APK) or iOS (Xcode project -> build .ipa), the game is sometimes showing a white screen; sometimes it is running as expected.

    So I tried different things, like

    - exporting in another browser

    - transferring the debug APK with ADB (Android Debug Bridge)

    - transferring the file on other ways and install it locally

    - publish the app as internal test versions via Google Play and the Apple App Store (TestFlight)

    - playing with the export options like minifying etc.

    The result does not change. In most cases, the app starts with a white screen and does not play any music. After some time, it is crashing with the error "The connection to the server was unsuccessful. (file:///android_asset/www/index.html)". When I install a debug APK and check with "chrome://inspect/#devices", it shows this information, which is pretty strange, I think:

    While doing this, the APP HTML looks like this:

    Sometimes (about 20% of the time), the game starts nearly instantly. Checking the debug data then, I see this error message in main.js:1 : "Failed to load resource: net::ERR_ADDRESS_UNREACHABLE". The game is functioning normally though.

    I really hope for your help in this case as my game is nearly finished and ready to beta test, but it does not start up everytime...

    Please ask me anything you need.

    As this is a commercial project, I cannot publish the project file here. I can hand it out to Ashley privately, though.

    Thank you for your support in advance!

    Best regards,

    teha

  • Small update:

    When I start the game when the device is offline, it starts instantly without any problems. Do apps built with Construct 3 always connect to the Internet? Any way to stop this?

    Thank you.

    teha

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Same problem :(

  • I tried different options ... nothing helps ...

  • You should look in the console tab in dev tools. That's where any errors that occur are logged.

    We have important fixes for both iOS and Android in the next beta release, so it should be worth checking there once that's out.

  • Emperor

    What helped really good but NOT 100% of the times is exporting the project on another computer. It seems my installed Kaspersky is adding some JavaScript into every called website (which you see in the second screenshot in my first post). My game isn't starting always yet, but about 80% (which is much more than before).

    Ashley

    Thank you for your answer. Are you talking about R139?

    Best regards,

    teha

  • Small update:

    When I start the game when the device is offline, it starts instantly without any problems. Do apps built with Construct 3 always connect to the Internet? Any way to stop this?

    Thank you.

    teha

    Hey teha, i have the exact same problem and it is just as you said, it's working OFFLINE, but with internet connection it goes white screen. webgl doesn't have anything to do with it. Internet connection does.

    Did you manage to fix the issue?

  • I deleted Kaspersky antivirus and it all worked.

  • I deleted Kaspersky antivirus and it all worked.

    yes you're right, i fixed it yesterday

    Kaspersky was the cause, i didn't delete it, just disabled its "Inject script into web traffic to interact with web pages" from the Network settings

    the fix is:

    1) Kaspersky Settings > Network settings > disable "Inject script into web traffic to interact with web pages" from the

    2) Clear cache in the browser

    3) You may have to reinstall construct 3 in the process and clear cache

    4) export your apk and enjoy

    now everything works normally, with webgl enabled even.

    Ashley this is most likely the solution to the error message "The connection to the server was unsuccessful. (file:///android_asset/www/index.html)". antiviruses injecting scripts

    same bugs in Github bug reports: #1337 #865 #854 #842 and other forum bug reports

  • Can you identify where it's injecting a script, what it's injecting, and why it's breaking the Android export? If so we may be able to harden Construct against antivirus software that is breaking things. Otherwise I think it would be best to report it to Kaspersky as some overzealous injection that breaks things.

  • The script is injected in index.html.

    Once the script for Kaspersky is deleted it all works.

    Same issue in Phonegap build and developer.

  • Can you post a link to the HTML code that is added and the contents of any JavaScript?

  • Actually it seems that it's just line 9 in the second screenshot in my first post ("<script type...>").

  • Note since my last reply we've added warnings in both the editor and runtime if Kaspersky intervenes in the export.

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