Serious Audio Bug on iOS 14 - Existing Appstore Game Now Unplayable

From the Asset Store
126 audio files divided in: music, radio voices, SFX
  • I’m having a huge problem with audio in iOS 14.5.1 and 14.6 which is making both the current app store version of my game built in 2016, and the new version I’ve been building to replace this unplayable. In the console on Xcode, this is the error I receive whenever any audio plays:

    [ProcessSuspension] 0x101cdf060 - ProcessAssertion: Failed to acquire RBS MediaPlayback assertion 'WebKit Media Playback' for process with PID 1126, error: Error Domain=RBSAssertionErrorDomain Code=3 "Required client entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"MediaPlayback" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Required client entitlement is missing}

    The important clues seem to be 'WebKit Media Playback' , "Required client entitlement is missing", "com.apple.webkit" and :"MediaPlayback"

    The audio still plays but crackles with every sound effect, then half way through the second scene as a song is playing the sound deteriorates completely, crackling more and more until it is pure white noise. When I exit back to the main menu, and start a new game, or even click the options which plays a small sound effect, the sound is still crackling, and has not reset itself after getting progressively worse as the errors piled up.

    The current App store version of my game built in 2016 still works perfectly on iOS 12.5.1 on my iPad mini, and so does the new version I’m testing.

    iOS 14.5.1 and 14.6 also create audio bugs on the 2016 version: whenever a sound plays the game lags big time – I imagine because of the entitlement error. The 2016 version also displays some strange behaviour in the second scene of my game, whereby a “Touch to Start” screen (I put at the start of each scene back when iOS needed a touch input to start audio) stays on the screen after you touch, making the entire scene play out beneath a black layer. This is how I became aware that anything was even wrong – a customer emailed me to tell me they were stuck at this point, and sure enough the same thing happened to me. I can tell the scene is playing out as the music and sounds play out once you touch, and after a couple of minutes, the next scene starts.

    This is obviously a new thing as people have been playing this build for 5 years and this is the first time it’s been reported, and any google search to do with this error on other engines that use webkit date only from last year. I've seen reports of it in both the apple developer forums and webkit bug reports. I've tried creating a new project with just a button that plays a sound, and the error still appears.

    Here's everything I've tried

    • Building the old Construct 2 project with the C3 export manager
    • Building with C3 and C2 runtime
    • Using only .m4a audio
    • Using only .mp3 audio
    • Using only .webmd audio
    • Adding entitlements/capabilities that seem like they might include this in both xcode and the provisioning profile
    • Preloading/not preloading sound
    • Putting music in sounds folder to preload all sounds
    • Using/not using worker
    • Setting audio to Play in Background
    • Searching high and low all over forums where there is any mention of this bug for solutions.
    • I purchased an iPod Touch 7th gen so I could test on the latest iOS.
    • This occurs on both a physical iPod Touch and Apple simulated devices

    So my best guess is that this is a problem with at least iOS 14.5.1 and 14.6 and webkit. I’m guessing that iOS 14 requires this entitlement to play any kind of audio or media, and that this has been affecting projects since it was released. I’m not sure it has anything to do with the new version of Cordova, as my old app still has trouble on the new iOS.

    I’ve been working solidly to fix this for 4 days now and am at my wits end, I’m not one to ask for help as you can see by how long it’s taken, but I’m not sure what else to do. My game is currently #78 in Role Playing in the UK and I hate the thought of people trying to play it and being disappointed, so working around the clock to fix it.

    Ashley your help would be highly appreciated, I imagine this is affecting all iOS releases.

    Tagged:

  • I'm not aware of any intentional change regarding how audio playback works on iOS. If an iOS update breaks something, you need to report it to Apple - we can't fix bugs in iOS, only Apple can.

  • I'm not aware of any intentional change regarding how audio playback works on iOS. If an iOS update breaks something, you need to report it to Apple - we can't fix bugs in iOS, only Apple can.

    Hey Ashley, this isn't really an acceptable reply. I'm aware only apple/webkit can fix this bug, but presume you'd have some inkling as to the cause of this, and failing that, I'd expect Scirra to have an existing relationship with iOS support built over the years you've been in operation, and a more efficient way of contacting apple than I have. I shouldn't have to point out that this is potentially affecting all games published on your engine, and is therefore your responsibility to chase up and fix as otherwise it's not currently fit for purpose on iOS as advertised.

    You're no longer programmers making hobbyist software, you're a company which I and hundreds of others are paying subscriptions for, I would expect an issue of this magnitude to be investigated, I don't expect you to have the resources of Unity/Epic, but expect there to be some procedures in place when something like this happens. It doesn't fill me with confidence that my games can be rendered unplayable at a moment's notice, and that Scirra will attempt to do nothing about it, that's not long term support.

  • I'm aware only apple/webkit can fix this bug, but presume you'd have some inkling as to the cause of this

    I'm afraid I have no inkling whatsoever. Apple regularly break things with iOS updates, and they often break in bizarre and unpredictable ways. It's their code which is broken, and I can't predict how or why it's gone wrong.

    I'd expect Scirra to have an existing relationship with iOS support built over the years you've been in operation, and a more efficient way of contacting apple than I have.

    I'm afraid no such relationship exists at all. I'd love to have such a close relationship with Apple. But they are an incredibly opaque company who rarely seem to talk to anyone on the outside at all.

    I shouldn't have to point out that this is potentially affecting all games published on your engine

    It's not yet clear that is actually the case. If only games that are 5 years old are broken, it's possible it was something we already fixed a long time ago, and thus the impact should be pretty limited. If all games are affected, we could potentially have a big problem, but even then what can we do? We can't fix iOS, only Apple can. It's often extremely difficult to find workarounds as we have to rely on sheer guesswork. If you can reproduce the problem in a new Construct 3 project, that would signify a wider problem. If you then share that project I could try testing this further myself, but once again, I can't guarantee that anything can be done until Apple fix the problem.

  • FWIW I just tried exporting Space Blaster to iOS and running it via Xcode on an iPhone with iOS 14.6. Audio playback worked just fine. So there doesn't seem to be any kind of fundamental issue with audio playback on iOS 14.6, at least as far as I can tell from that test. Xcode did log a message about "Required client entitlement is missing", but it did not seem to affect anything, and all audio playback worked fine regardless. Frankly I don't know what that message means or why it would appear, but it doesn't seem to cause any problem in my test.

  • I updated my phone to 14.6 now and tried my C3 app, which was released previously. No issues.

  • I'm afraid no such relationship exists at all. I'd love to have such a close relationship with Apple. But they are an incredibly opaque company who rarely seem to talk to anyone on the outside at all.

    I appreciate that this is generally the case with apple and they are not forthcoming at all.

    It's not yet clear that is actually the case. If only games that are 5 years old are broken, it's possible it was something we already fixed a long time ago, and thus the impact should be pretty limited. If all games are affected, we could potentially have a big problem, but even then what can we do? We can't fix iOS, only Apple can. It's often extremely difficult to find workarounds as we have to rely on sheer guesswork. If you can reproduce the problem in a new Construct 3 project, that would signify a wider problem. If you then share that project I could try testing this further myself, but once again, I can't guarantee that anything can be done until Apple fix the problem.

    I should reiterate this is happening in the new version which is built in Construct 3, using the C3 runtime. It's worse in the C3 version, as while the C2 version has serious lag when a sound effect is played (and that layer staying visible problem), the C3 version's audio quickly deteriorates to white noise.

    FWIW I just tried exporting Space Blaster to iOS and running it via Xcode on an iPhone with iOS 14.6. Audio playback worked just fine. So there doesn't seem to be any kind of fundamental issue with audio playback on iOS 14.6, at least as far as I can tell from that test. Xcode did log a message about "Required client entitlement is missing", but it did not seem to affect anything, and all audio playback worked fine regardless. Frankly I don't know what that message means or why it would appear, but it doesn't seem to cause any problem in my test.

    I can't imagine space blaster would show any noticeable effect from this bug. My game is abound 3 hours long, and the audio breaks down completely in the second scene, about 8 mins into gameplay. A song is playing, while two sound effects (a horse trotting, and a wheel turning) are playing on loop throughout. The sound completely breaks down about 20 secs into this scene. I imagine this is due to the error being thrown every time the two sound effects, which are a couple of seconds long, loop.

  • I would avoid speculating on what causes issues until it is proven. Bugs are often very complicated and falsely correlate with irrelevant things.

    Given that, I'm afraid it's not clear what the problem could be. This is pretty much always the case with forum posts that just describe problems, because there's too little evidence to work with. This is exactly the thing our bug report guidelines are aimed at solving, by requiring that you provide enough information that we can actually help, so I would advise to follow those and file an issue accordingly if you think we should investigate this further. However if something works in iOS 14.5 and is broken in iOS 14.6, that is very good evidence that the iOS update broke it, since nothing else has changed. In that case, it's probably better to just get in touch with Apple directly.

  • Given that, I'm afraid it's not clear what the problem could be. This is pretty much always the case with forum posts that just describe problems, because there's too little evidence to work with. This is exactly the thing our bug report guidelines are aimed at solving, by requiring that you provide enough information that we can actually help, so I would advise to follow those and file an issue accordingly if you think we should investigate this further. However if something works in iOS 14.5 and is broken in iOS 14.6, that is very good evidence that the iOS update broke it, since nothing else has changed. In that case, it's probably better to just get in touch with Apple directly.

    To clarify; the results are the same on iOS 14.5.1 and 14.6. The person reporting the initial bug was using 14.5.1. I picked up an iPod Touch which was running 14.5.1 and the error was present both in the c2 and c3 build. I then updated it to 14.6 and the error was still present. People seem to have had this error since 14.0 on the WebKit Bugzilla, I would post a bug report there but I don't feel remotely qualified to as I'm not working directly with WebKit, and have no idea how C3 utilises it, just that the error refers to it.

    I'm going to try and recreate the behaviour in a brand new project, if I am able to, I will post a bug report.

  • I am having audio issues on iOS as well. My project was a C2 project I imported to C3. Is there an audio format that is required now to work on iOS? This project has worked on iOS previously until I brought it into C3. I need to push an update but with non-functioning audio that is not possible.

  • Some good news! After another hectic night and morning of trying to trace this bug, including setting all audio to the same bitrate which didn't help, I found the cause:

    It seems positioned audio is to blame. I had the thought, then googled to see if anything came up, and found this C3 bug report.

    It seems SnipG was right about how serious the bug is and I share their frustrations, while it might not be something that is evident on PC, on iOS it's hugely amplified. It's especially frustrating that they created a perfect reproduction of the bug which can be accessed from the browser, and yet it was not taken seriously. If it had been, whether through a disclaimer on the Scirra site, or in the positioned audio description in C3, or even by removing it altogether, then I'd have been aware of this much earlier.

    It's worth noting there are some new abnormalities, like looped sound effects continuing into the next scene, but that's easily fixed by stopping at the end of a scene.

    I'd imagine that this will be affecting all projects using positioned audio, with different degrees of severity depending on how often the sounds are played.

  • I am having audio issues on iOS as well. My project was a C2 project I imported to C3. Is there an audio format that is required now to work on iOS? This project has worked on iOS previously until I brought it into C3. I need to push an update but with non-functioning audio that is not possible.

    I think the .m4a or .mp3 your C2 project was using should still play in the C3 export in my experience. What format is your audio?

  • It seems positioned audio is to blame. I had the thought, then googled to see if anything came up, and found this C3 bug report.

    That bug report refers only to Chrome and also only appeared to happen with unlimited framerate mode, which you shouldn't be publishing an app with, and also has different consequences to the problem you previously described. So my best guess is that is not related to your problem.

    BTW AsinineGames - unless you describe the particular problem you are having, it's also not clear if you are experiencing the same issue as described in this thread. This often happens with forum threads, where lots of people pile in with their own questions and issues, which are often unrelated, and it becomes so confusing it's impossible to make any progress on the problem. So to all involved, I would advise that you keep focused on the originally described problem, and be thorough in checking what is really relevant or not, otherwise you'll all be going on a wild goose chase and never get anywhere. Again, this is why we have bug report guidelines, to try to avoid wasting time like that.

  • That bug report refers only to Chrome and also only appeared to happen with unlimited framerate mode, which you shouldn't be publishing an app with, and also has different consequences to the problem you previously described. So my best guess is that is not related to your problem.

    I can report that changing the positioned audio to normal audio fixed this issue, and the crackling and deterioration on that demo seem to match mine exactly, seems strange for them to not be related.

    Regardless of whether it's related to mine, SnipG's bug is valid and recreatable, so it should surely be documented somewhere right?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Were you using the HRTF option? If so I wouldn't call this a bug per say...

    HRTF is a very very computationally expensive method. Back in the day PCs required specialist hardware on separate audio cards to handle it. Some modern devices like the Microsoft Hololens still have dedicated hardware for it. Sadly great positional audio somewhat died out with dedicated audio hardware, if you ever played something like Thief 2 with the hardware support, it was amazing.

    True HRTF is still relatively rare even in modern AAA games on PC/console, and often they'll only implement it for selected sounds, i.e. short sounds that are important for positional awareness, like foot steps, gun shots etc. I wouldn't think of using it on mobile. My guess is the crackling/popping is because the CPU cannot process the HRTF audio fast enough to fill the audio buffer - and this is why it's more noticeable on mobile than PC.

    If you still want to use positional audio, the equal power option should be much cheaper to process. I believe there is an even more lightweight stereo panner node in web audio but not in Construct 3, that is something I would really like to see implemented to help mobile performance.

    As to why the old iOS versions didn't display this issue, my guess is they only had limited web audio support, so maybe positional audio support was only recently added, i.e. on older iOS it probably detected it wasn't supported so reverted to normal audio.

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