iOS WKWebView (XDK) music crash "servers already up" error

0 favourites
From the Asset Store
7 Errors
$15 USD
7 Errors is a game where you have to find the 7 mistakes before time runs out. Can you find all 7? Have fun looking.
  • I've already emailed you but it should be filed here too so that others who may experience this issue knows about it. Also, perhaps you could give an update to the situation. I suspect it is the previous work-around for audio/music in iOS 8/9 (play music as sound etc) no longer compatible with iOS10.

    Problem Description

    My game (https://itunes.apple.com/app/id1088622798) compiled on r238 and exported to XDK WKWebView, on the latest version for the required Cordova plugins works for the most part, but there's random crashes and it is related to music being played or looping in a new track. The error message is always the same "servers already up", white screens and game hangs requiring force close.

    Attach a Capx

    You have the CAPX already.

    Description of Capx

    Full game, iOS build.

    Steps to Reproduce Bug

    • Export Cordova, using XDK & WKWebView
    • Compile with XDK
    • Test on iDevice, fly around, going to and from planets to system. It's a random crash.

    Observed Result

    After playing for 5 to 30 minutes, sometimes sooner, a random crash occurs. This does NOT happen if Music is turned off (set to 0) in the options menu. It only happens with Music on.

    Expected Result

    Expect music to work without crashing the game.

    Affected Browsers

    • WKWebView export

    Operating System and Service Pack

    iOS 10 (10.0.2 and 10.1)

    Construct 2 Version ID

    r238

  • I went to the c2runtime.js file and found this line:

    if (this.runtime.isWKWebView)

    playMusicAsSoundWorkaround = true;

    I changed that to false;

    Re-compiled with XDK and tested it. No more crashes after playing an hour.

    However, audio volume via tags no longer function, it plays at full.

    This isn't a huge deal, since at least there's no more crashing and there's music!

  • I went to the c2runtime.js file and found this line:

    if (this.runtime.isWKWebView)

    playMusicAsSoundWorkaround = true;

    I changed that to false;

    Re-compiled with XDK and tested it. No more crashes after playing an hour.

    However, audio volume via tags no longer function, it plays at full.

    This isn't a huge deal, since at least there's no more crashing and there's music!

    i will test this on my game and see if its works, i export with phonegapp

    update: couldnt find that line of code in mine file.

  • i will test this on my game and see if its works, i export with phonegapp

    update: couldnt find that line of code in mine file.

    Do you set to use WKWebView when you do the Cordova export?

  • >

    > i will test this on my game and see if its works, i export with phonegapp

    > update: couldnt find that line of code in mine file.

    >

    Do you set to use WKWebView when you do the Cordova export?

    yes but it may be because you export for XDK :s

  • So you have no "playMusicAsSoundWorkaround" variable in your runtime at all?

    Strange!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So you have no "playMusicAsSoundWorkaround" variable in your runtime at all?

    Strange!

    exactly

  • weird thing is that my c2runtime is all messed up and weird :/

    it maybe because of the "minify script"?

  • weird thing is that my c2runtime is all messed up and weird :/

    it maybe because of the "minify script"?

    I don't minify. In fact, minifying script leads to major issues with Cordova/XDK in my experience...

  • > weird thing is that my c2runtime is all messed up and weird :/

    >

    > it maybe because of the "minify script"?

    >

    I don't minify. In fact, minifying script leads to major issues with Cordova/XDK in my experience...

    lol i didnt knew that, ok i will test it without minifying...

  • Ok, it works, doing that works but the sound is now really really loud and there is no background music, just effects, well, at least thats better that having no music...hehe thanks a lot man!!!!

    Ashley look, its a construct2 error

    i think apple changed the way they use sounds on safari or something, i will do some experiments on why does the sound effects works but not the music.

  • C2 had a workaround for sound and music to get it compatible with Safari based export (Cordova on iOS) due to changes in iOS8 and 9. It's just now no longer compatible with iOS10.

    IJCT

    Music works for me. Make sure it's in the right format, not .ogg in your iOS export else it won't play. What does not work with this "hack" of the workarounds is the volume controls. Everything plays full blast and users have to control the volume via their main device master volume.

  • C2 had a workaround for sound and music to get it compatible with Safari based export (Cordova on iOS) due to changes in iOS8 and 9. It's just now no longer compatible with iOS10.

    IJCT

    Music works for me. Make sure it's in the right format, not .ogg in your iOS export else it won't play. What does not work with this "hack" of the workarounds is the volume controls. Everything plays full blast and users have to control the volume via their main device master volume.

    yes is m4a, do you put your music on the music folder or in the sounds folder on c2??? maybe is that

    UPDATE: YES!! IS THE FOLDER!!! the music folder doesnt work anymore on ios10, i changed my music from the music folder to the sounds folder on c2 and now is fixed!!!

  • Hi all!

    I have same issue in iOS with WKWebView (XDK). But crash and error message "servers already up" and white screens after closing video ads with sound.

    Ashley what you think about it?

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