Description
openedon Mar 11, 2021
Context:
- Playwright Version: 1.9.1
- Operating System: MacOS 11.2.1
- Node.js version: v12.18.3
- Browser: Chromium, Firefox
- Extra: Jest: 26.6.3
System:
- OS: macOS 11.2.1
- Memory: 29.23 MB / 8.00 GB
- Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
- Yarn: 1.22.5 - /usr/local/bin/yarn
- npm: 7.6.1 - ~/.nvm/versions/node/v12.18.3/bin/npm
- Bash: 3.2.57 - /bin/bash
- playwright: ^1.9.1 => 1.9.1
Describe the bug
When I try to launch my test, I get the following error message. It occurs when I try to test my microphone in the waiting room to the meeting in my application (it is similar to the waiting room in the Google Meet when you can choose your microphone and camera). The app uses Twilio for video calls. The core issue you can see in that line:
Chromium:
[29603:83715:0311/101727.631315:ERROR:audio_rtp_receiver.cc(88)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
Firefox:
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new Error("", "(unknown module)")) [err] Exiting due to channel error.
Important notice:
- This issue doesn't occur when I use a Webkit browser instead of Chromium or Firefox ones
Conclusion & Thoughts
Do you plan to implement these flags to the Playwright? They might fix my issue. What do you think?
- --use-fake-ui-for-media-stream avoids the need to grant camera/microphone permissions.
- --use-fake-device-for-media-stream feeds a test pattern to getUserMedia() instead of live camera input.
Source: https://webrtc.github.io/webrtc-org/testing/
Error logs from Chromium:
➜ yarn test:e2e:local:start
yarn run v1.22.5
$ dotenv -e .env.test -- yarn test:e2e:debug
$ PWDEBUG=1 jest --config ./jest.config.json --detectOpenHandles
FAIL e2e-tests/toDo/loginWithURL.spec.ts (65.696 s)
Login to the Front
✕ Login as a Participant (62962 ms)
● Login to the Front › Login as a Participant
page.click: Protocol error (Runtime.callFunctionOn): Browser closed.
==================== Browser output: ====================
/Users/ajelonek/Library/Caches/ms-playwright/chromium-854489/chrome-mac/Chromium.app/Contents/MacOS/Chromium --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --user-data-dir=/var/folders/px/s5r2dsjs1t3c8yvzmr32d93r0000gn/T/playwright_chromiumdev_profile-ebz2UV --remote-debugging-pipe --no-sandbox --no-startup-window
pid=29563
[err] [29603:83715:0311/101727.631315:ERROR:audio_rtp_receiver.cc(88)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[err] [29603:83715:0311/101728.440561:ERROR:audio_rtp_receiver.cc(88)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[err] [29640:84227:0311/101740.087723:ERROR:audio_rtp_receiver.cc(88)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[err] [29640:84227:0311/101740.616038:ERROR:audio_rtp_receiver.cc(88)] AudioRtpReceiver::OnSetVolume: No audio channel exists.
[err] [29647:775:0311/101747.329148:ERROR:system_services.cc(31)] SetApplicationIsDaemon: Error Domain=NSOSStatusErrorDomain Code=-50 "paramErr: error in user parameter list" (-50)
[err] [0311/101758.979066:WARNING:crash_report_exception_handler.cc(240)] UniversalExceptionRaise: (os/kern) failure (5)
=========================== logs ===========================
waiting for selector "text=My microphone is working"
============================================================
Note: use DEBUG=pw:api environment variable to capture Playwright logs.page.click: Protocol error (Runtime.callFunctionOn): Browser closed.
Code Snippet
browser = await chromium.launch({ headless: false });
const context = await browser.newContext();
context.grantPermissions(['microphone', 'camera']);
participantPage = await context.newPage();
await page.goto(process.env.TEST_BRIEFING_URL);
await page.fill('input[type="email"]', 'random@example.com');
await page.click('button[type="submit"]');
await page.fill('input[type="password"]', 'password');
await Promise.all([page.click('text=Login')]);
await participantPage.click('button:has-text("OK")');
await participantPage.click('text=My microphone is working');