[Calling Web SDK] AudioEffects disposes raw stream twice after acquisition failure (1.43.1)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, node.js
- Lĩnh vực
- audio-video-rtc, backend
Hướng nghiên cứu
The report isolates updateAudioEffectsStatusManager in the installed @azure/communication-calling 1.43.1 bundle at node_modules/@azure/communication-calling/dist-esm/sdk.bundle.js; it also mentions the parameterized method in 1.46.1. Read that method’s catch path and common cleanup, then run the supplied reproduce.mjs scenarios. Done means an acquired client is disposed once after acquisition failure and the original acquisition diagnostic is preserved.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
In @azure/communication-calling 1.43.1, the internal AudioEffects method
updateAudioEffectsStatusManager can dispose the same raw-stream client twice
when getMediaStream() rejects. The second disposal throws:
Error: Raw stream client is already disposed
at ...checkDisposed
at ...dispose
at ...updateAudioEffectsStatusManager
This was observed during initialization in an embedded Windows Chromium test
browser when the UI reported unavailable camera/microphone access. Normal call
connection could still succeed after a browser permission response. This is not
a claim of a general call outage or a demonstrated cause of mid-call audio loss.
The original device-acquisition rejection reason/browser build was not captured.
Reproduction and scope
The following Node reproduction executes the unchanged method extracted from
the installed 1.43.1 SDK, with synthetic stream/device collaborators. The raw
stream collaborator models the SDK's non-idempotent disposal guard. This isolates
the method's cleanup control flow; it is not an end-to-end browser/media test.
In an empty directory, install @azure/[email protected], save the
following as reproduce.mjs, then run node reproduce.mjs:
import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
import vm from 'node:vm';
const source = await readFile(
'node_modules/@azure/communication-calling/dist-esm/sdk.bundle.js', 'utf8');
const start = source.indexOf('async updateAudioEffectsStatusManager(){');
const end = source.indexOf('async initializeWasmVqeInStack(', start);
assert.ok(start > 0 && end > start);
const method = source.slice(start, end);
const initialize = vm.runInNewContext(
`(${method.replace('async updateAudioEffectsStatusManager', 'async function')})`,
{
isVdi3Proxy: () => false,
getBrowserInfo: () => ({ engine: 'Chrome' }),
BrowserAudioEffectsHelper: class {},
});
for (const scenario of ['valid-stream', 'acquisition-rejected', 'no-raw-stream']) {
let disposed = false, disposeCalls = 0, settings;
const stream = {
getMediaStream: async () => {
if (scenario === 'acquisition-rejected') {
throw new Error('Synthetic device acquisition failure');
}
return { getAudioTracks: () => [{ getSettings: () => ({
autoGainControl: false, noiseSuppression: false, echoCancellation: false,
}) }] };
},
dispose: () => {
disposeCalls++;
if (disposed) throw new Error('Raw stream client is already disposed');
disposed = true;
},
};
const effects = {
on: () => {}, setActiveEffects: value => { settings = value; },
getActiveEffects: () => settings,
};
const device = {
isWBMediaClient: false, getTsDeviceManager: () => ({}),
getRawDeviceMediaStream: () => {
if (scenario === 'no-raw-stream') throw new Error('Synthetic device absent');
return stream;
},
callStackAudioEffectsStatusManager: effects,
};
let error = null;
try {
await initialize.call({
streamInstance: { canStartEffects: true, source: { deviceManager: device } },
_logger: { warn: () => {}, debug: () => {} },
});
} catch (caught) { error = caught.message; }
console.log({ scenario, disposeCalls, error });
assert.equal(disposeCalls, scenario === 'valid-stream' ? 1 :
scenario === 'acquisition-rejected' ? 2 : 0);
assert.equal(error, scenario === 'acquisition-rejected' ?
'Raw stream client is already disposed' : null);
}
Actual
| Input | Dispose calls | Error |
|---|---|---|
| Stream acquisition succeeds | 1 | None |
| Stream exists, acquisition rejects | 2 | Raw stream client is already disposed |
| Raw-stream creation throws before a stream exists | 0 | None |
The catch path disposes the client; common code later disposes it again.
Expected
The SDK should clean up each acquired raw-stream client once, preserve the
device-acquisition diagnostic, and not introduce a second cleanup exception.
Version inspection
1.43.1 was exercised as above. Integrity-verified 1.46.1 package source was also
inspected and appears to retain the catch/common duplicate-disposal pattern in
the parameterized method. 1.46.1 was not executed in this reproduction. No
claim is made about 2.x behavior, and no SDK internals have been patched.
Could you confirm the supported fix/version or workaround that does not suppress
errors or bypass browser device permissions?
Reproduction signature: acs-web-audio-effects-double-dispose-1431.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 339
- Fork
- 114
- Merge trung bình
- 36 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/Communication
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Azure/Communication#600 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Azure/Communication#599 · 4 bình luận · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Azure/Communication#598 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Azure/Communication#543 ·
-
Needs: triage :mag:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Azure/Communication#447 ·
Tất cả issue của Azure/Communication
Issue tương tự
-
speed argument is silently overridden to 0.3 for any gen_text under 10 bytesCó thể đã có người làm @li-lizhe đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
FLAC: STREAMINFO sample rates above 655350 Hz are rejected ("stream sample rate out of bounds")Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
tone-3000/tone3000-plugin#257 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage S2: major
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
manaflow-ai/cmux#22708 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày