Closed ychin closed 7 months ago
Hello @ychin, we will take a look.
Hello @ychin . As workaround you can add step bellow to your workflow for granting access to microphone .
- name: Grant microphone access
run: |
sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
I used it with provided repro, and looks like everything finishes without errors.
Oh cool. Thanks, I will give that a try.
Did workaround help so far? :)
Yes, it did! See https://github.com/vim/vim/pull/14032
Good to know! Closing for now as we do not have plans to add this to tccdb by default just yet (might be in the future we will if we see more problems like this), if you have more questions feel free to reach us out again :)
Ok. Thanks. I still find it really curious why macOS requests a microphone permission while we are just playing a sound. It seems like an odd macOS quirk at least because I don't think it happens locally on my MacBook Pro. Either way probably not a big deal as there's a way to just grant the permission.
@ychin it happens to macOS quite naturally between releases, check your local tccdb, most likely it has the kTCCServiceMicrophone
permissions set accordingly
@mikhailkoliada I am also running into this issue. Is there any possibility to reconsider fixing this in the base image?
I think it affects all Playwright (end-to-end testing framework which uses) who are using Chromium or Firefox to play audio or video.
This also impacts the Ladybird Browser's Audio tests on macOS 14. We use AudioUnit for setting up Audio output streams. https://github.com/SerenityOS/serenity/commit/a447b9bffd2d0740816c399f3a1f3cc1745c6686
@mikhailkoliada this also affects Electron's test suites - we're working around the issue for now but i'd be happy to open a PR if it'd be considered at this point.
Element is having to employ similar workarounds for Playwright testing of Electron, worked around in https://github.com/element-hq/element-desktop/blob/aa5d8e9e06fcd4e93b6ec736eefcf8027194003b/.github/workflows/build_and_test.yaml#L131-L135
Description
The new macos-14 runner seems to have problems playing audio. When attempting to play a sound, a microphone permission dialog would come up, preventing the task from completing. Interestingly this doesn't happen in macos-12 or macos-13. I also couldn't reproduce this issue locally on a MacBook Pro, so I wonder if it has to do with the way the audio device is set up on the GitHub Actions image. Searching this on Google didn't yield much results.
Platforms affected
Runner images affected
Image version and build link
GitHub Actions:
Is it regression?
no
Expected behavior
The task completes after playing a sound.
Actual behavior
The task hangs in macos-14, and then pops up a microphone permission dialog box. Below is dumped from taking a screenshot in the CI environment:
Repro steps
Add the following in a GitHub Actions yaml:
afplay
is supposed to play a sound file and complete. Thescreencapture
is there to take a screenshot only to debug the issue.