Repository navigation
[No QA] Catch rejected AudioContext.resume() calls in howler - #102795
Conversation
Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
Co-authored-by: Eskalifer1 <Eskalifer1@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
@MelvinBot please set the PR body to the content in the details section below. Additionally add to title [No QA] at the beginning DetailsExplanation of ChangeSentry
iOS Safari rejects Behavior is otherwise unchanged. Howler only sets Fixed Issues$ #102744 TestsN/A
Offline testsN/A QA Steps// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
PR Author Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safari |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
I updated the PR as you asked:
|
|
@MelvinBot Mark this PR as ready for review |
|
I couldn't mark this PR as ready for review. My environment blocked the The PR is still a draft. You can mark it ready yourself with the Ready for review button at the bottom of the PR page, since you're the assignee. |
|
@Eskalifer1 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.2-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.5.2-4 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Sentry
APP-T6reportsInvalidStateError: Failed to start the audio deviceas an unhandled promise rejection on iOS Safari. Howler 2.2.4 callsAudioContext.resume()in two places and never handles a rejected promise:touchstart/touchend/click/keydown_autoResume(), which runs when a sound plays after Howler auto-suspended the context (after 30 seconds of silence)iOS Safari rejects
resume()when it can't start the audio session (for example, during a phone call or while another app holds the audio session). This PR adds apatch-packagepatch forhowler2.2.4 that attaches no-op rejection handlers to both calls, and documents it inpatches/howler/details.md.Behavior is otherwise unchanged. Howler only sets
state = 'running'inside.then(), so after a rejection the state stays'suspended'and the nextplay()tries to resume again. The patch targetsdist/howler.js, which is the package'smainentry. The same bug is tracked upstream in goldfire/howler.js#1743 with an open fix in goldfire/howler.js#1764.Fixed Issues
$ #102744
PROPOSAL: #102744 (comment)
Tests
N/A
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
N/A
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do they need to test for regressions.
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari