Skip to content

Commit 12a642e

Browse files
Merge pull request #270506 from enricohuang/patch-23
Add troubleshooting guide for Azure Communication Services Web Calling SDK - references
2 parents 4dc6313 + 038c803 commit 12a642e

27 files changed

+1069
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: References - How to collect verbose log from browsers
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to collect verbose log from browsers.
5+
author: enricohuang
6+
ms.author: enricohuang
7+
8+
services: azure-communication-services
9+
ms.date: 02/24/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# How to collect verbose log from browsers
16+
When an issue originates within the underlying layer, collecting verbose logs in addition to web logs can provide valuable information.
17+
18+
To collect the verbose log from the browser, initiate a web browser session with specific command line arguments. You open your video application within the browser and execute the scenario you're debugging.
19+
Once the scenario is executed, you can close the browser.
20+
During log collection, ensure to keep only the necessary tabs open in the browser.
21+
22+
To collect the verbose log of the Edge browser, open a command line window and execute:
23+
24+
`"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --user-data-dir=C:\edge-debug --enable-logging --v=0 --vmodule=*/webrtc/*=2,*/libjingle/*=2,*media*=4 --no-sandbox`
25+
26+
For Chrome, replace the executable path in the command with `C:\Program Files\Google\Chrome\Application\chrome.exe`.
27+
28+
Don’t omit the `--user-data-dir` argument. This argument is used to specify where the logs are saved.
29+
30+
This command enables verbose logging and saves the log to chrome\_debug.log.
31+
It's important to have only the necessary pages open in the Edge browser, such as `edge://webrtc-internals` and the application web page.
32+
Keeping only necessary pages open ensure that logs from different web applications don't mix in the same log file.
33+
34+
Log file is located at: `C:\edge-debug\chrome_debug.log`
35+
36+
The verbose log is flushed each time the browser is opened with the specified command line.
37+
Therefore, after closing the browser, you should copy the log and check its file size and modification time to confirm that it contains the verbose log.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: References - How to collect client logs
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to collect client logs.
5+
author: sloanster
6+
ms.author: micahvivion
7+
8+
services: azure-communication-services
9+
ms.date: 02/24/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# How to collect client logs
16+
The client logs can help when we want to get more details while debugging an issue.
17+
To collect client logs, you can use [@azure/logger](https://www.npmjs.com/package/@azure/logger), which is used by WebJS calling SDK internally.
18+
19+
```typescript
20+
import { setLogLevel, createClientLogger, AzureLogger } from '@azure/logger';
21+
setLogLevel('info');
22+
let logger = createClientLogger('ACS');
23+
const callClient = new CallClient({ logger });
24+
// app logging
25+
logger.info('....');
26+
27+
```
28+
29+
[@azure/logger](https://www.npmjs.com/package/@azure/logger) supports four different log levels:
30+
31+
* verbose
32+
* info
33+
* warning
34+
* error
35+
36+
For debugging purposes, `info` level logging is sufficient in most cases.
37+
38+
In the browser environment, [@azure/logger](https://www.npmjs.com/package/@azure/logger) outputs logs to the console by default.
39+
You can redirect logs by overriding `AzureLogger.log` method. For more information, see [@azure/logger](/javascript/api/overview/azure/logger-readme).
40+
41+
Your app might keep logs in memory if it has a \'download log file\' feature.
42+
If that is the case, you have to set a limit on the log size.
43+
Not setting a limit might cause memory issues on long running calls.
44+
45+
Additionally, if you send logs to a remote service, consider mechanisms such as compression and scheduling.
46+
If the client has insufficient bandwidth, sending a large amount of log data in a short period of time can affect call quality.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: References - How to collect diagnostic audio recordings
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to collect diagnostic audio recordings.
5+
author: enricohuang
6+
ms.author: enricohuang
7+
8+
services: azure-communication-services
9+
ms.date: 02/24/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# How to collect diagnostic audio recordings
16+
To debug some issue, you may need audio recordings, especially when investigating audio quality problems, such as distorted audio and echo issues.
17+
18+
To collect diagnostic audio recordings, open the chrome://webrtc-internals(Chrome) or edge://webrtc-internals(Edge) page.
19+
20+
When you click *Enable diagnostic audio recordings*, the browser prompts a dialog asking for the download file location.
21+
22+
:::image type="content" source="./media/enable-diagnostic-audio-recordings.png" alt-text="Screenshot of diagnostic audio recordings settings.":::
23+
24+
After you finish an ACS call, you should be able to see files saved in the folder you choose.
25+
26+
:::image type="content" source="./media/diagnostic-audio-recordings.png" alt-text="Screenshot of diagnostic audio recording files.":::
27+
28+
`*.output.N.wav` is the audio output sent to the speaker.
29+
30+
`*.input.M.wav` is the audio input captured from the microphone.
31+
32+
`*.aecdump` contains the necessary wav files for debugging audio after processed by the audio processing module in browsers.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: References - How to collect Windows audio event log
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Learn how to collect Windows audio event log.
5+
author: enricohuang
6+
ms.author: enricohuang
7+
8+
services: azure-communication-services
9+
ms.date: 02/24/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# How to collect Windows audio event logs
16+
The Windows audio event log provides information on the audio device state around the time when the issue we're investigating occurred.
17+
18+
To collect the audio event log:
19+
* open Windows Event Viewer
20+
* browse the logs in *Application and Services Logs > Microsoft > Windows > Audio > Operational*
21+
* you can either
22+
* select logs within time range, right click and choose *Save Selected Events*.
23+
* right click on Operational, and choose *Save All Events As*.
24+
25+
:::image type="content" source="./media/windows-audio-event-log.png" alt-text="Screenshot of Windows Audio Event Log.":::
Loading
Loading
Loading
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Understanding cameraFreeze UFD - User Facing Diagnostics
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Overview and details reference for understanding cameraFreeze UFD.
5+
author: sloanster
6+
ms.author: micahvivion
7+
8+
services: azure-communication-services
9+
ms.date: 03/27/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# cameraFreeze UFD
16+
A `cameraFreeze` UFD event with a `true` value occurs when the SDK detects that the input framerate goes down to zero, causing the video output to appear frozen or not changing.
17+
18+
The underlying issue may suggest problems with the user's video camera, or in certain instances, the device may cease sending video frames.
19+
For example, on certain Android device models, you may see a `cameraFreeze` UFD event when the user locks the screen or puts the browser in the background.
20+
In this situation, the Android operating system stops sending video frames, and thus on the other end of the call a user may see a `cameraFreeze` UFD event.
21+
22+
| cameraFreeze | Details |
23+
| --------------------------------------|------------------------|
24+
| UFD type | MediaDiagnostics |
25+
| value type | DiagnosticFlag |
26+
| possible values | true, false |
27+
28+
## Example code to catch a cameraFreeze UFD event
29+
```typescript
30+
call.feature(Features.UserFacingDiagnostics).media.on('diagnosticChanged', (diagnosticInfo) => {
31+
if (diagnosticInfo.diagnostic === 'cameraFreeze') {
32+
if (diagnosticInfo.value === true) {
33+
// show a warning message on UI
34+
} else {
35+
// The cameraFreeze UFD recovered, notify the user
36+
}
37+
}
38+
});
39+
```
40+
41+
## How to mitigate or resolve
42+
Your calling application should subscribe to events from the User Facing Diagnostics.
43+
You should also consider displaying a message on your user interface to alert users of potential camera issues.
44+
The user can try to stop and start the video again, switch to other cameras or switch calling devices to resolve the issue.
45+
46+
## Next steps
47+
* Learn more about [User Facing Diagnostics feature](../../../../../concepts/voice-video-calling/user-facing-diagnostics.md?pivots=platform-web).
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Understanding cameraPermissionDenied UFD - User Facing Diagnostics
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Overview and details reference for understanding cameraPermissionDenied UFD.
5+
author: sloanster
6+
ms.author: micahvivion
7+
8+
services: azure-communication-services
9+
ms.date: 03/27/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# cameraPermissionDenied UFD
16+
The `cameraPermissionDenied` UFD event with a `true` value occurs when the SDK detects that the camera permission was denied either at browser layer or at Operating System level.
17+
18+
| cameraPermissionDenied | Details |
19+
| --------------------------------------|------------------------|
20+
| UFD type | MediaDiagnostics |
21+
| value type | DiagnosticFlag |
22+
| possible values | true, false |
23+
24+
## Example code to catch a cameraPermissionDenided UFD event
25+
```typescript
26+
call.feature(Features.UserFacingDiagnostics).media.on('diagnosticChanged', (diagnosticInfo) => {
27+
if (diagnosticInfo.diagnostic === 'cameraPermissionDenied') {
28+
if (diagnosticInfo.value === true) {
29+
// show a warning message on UI
30+
} else {
31+
// The cameraPermissionDenied UFD recovered, notify the user
32+
}
33+
}
34+
});
35+
```
36+
## How to mitigate or resolve
37+
Your application should invoke `DeviceManager.askDevicePermission` before the call starts to check whether the permission was granted or not.
38+
If the permission to use the camera is denied, the application should display a message on your user interface.
39+
Additionally, your application should acquire camera browser permission before listing the available camera devices.
40+
If there's no permission granted, the application is unable to get the detailed information of the camera devices on the user's system.
41+
42+
The camera permission can also be revoked during a call, so your application should also subscribe to events from the User Facing Diagnostics events to display a message on the user interface.
43+
Users can then take steps to resolve the issue on their own, such as enabling the browser permission or checking whether they disabled the camera access at OS level.
44+
45+
> [!NOTE]
46+
> Some browser platforms cache the permission results.
47+
48+
If a user denied the permission at browser layer previously, invoking `askDevicePermission` API doesn't trigger the permission UI prompt, but it can know the permission was denied.
49+
Your application should show instructions and ask the user to reset or grant the browser camera permission manually.
50+
51+
## Next steps
52+
* Learn more about [User Facing Diagnostics feature](../../../../../concepts/voice-video-calling/user-facing-diagnostics.md?pivots=platform-web).
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Understanding cameraStartFailed UFD - User Facing Diagnostics
3+
titleSuffix: Azure Communication Services - Troubleshooting Guide
4+
description: Overview and detailed reference of cameraStartFailed UFD
5+
author: sloanster
6+
ms.author: micahvivion
7+
8+
services: azure-communication-services
9+
ms.date: 03/27/2024
10+
ms.topic: troubleshooting
11+
ms.service: azure-communication-services
12+
ms.subservice: calling
13+
---
14+
15+
# cameraStartFailed UFD
16+
The `cameraStartFailed` UFD event with a `true` value occurs when the SDK is unable to acquire the camera stream because the source is unavailable.
17+
This error typically happens when the specified video device is being used by another process.
18+
For example, the user may see this `cameraStartFailed` UFD event when they attempt to join a call with video on a browser such as Chrome while another Edge browser has been using the same camera.
19+
20+
| cameraStartFailed | Details |
21+
| --------------------------------------|------------------------|
22+
| UFD type | MediaDiagnostics |
23+
| value type | DiagnosticFlag |
24+
| possible values | true, false |
25+
26+
## Example
27+
```typescript
28+
call.feature(Features.UserFacingDiagnostics).media.on('diagnosticChanged', (diagnosticInfo) => {
29+
if (diagnosticInfo.diagnostic === 'cameraStartFailed') {
30+
if (diagnosticInfo.value === true) {
31+
// show a warning message on UI
32+
} else {
33+
// cameraStartFailed UFD recovered, notify the user
34+
}
35+
}
36+
});
37+
```
38+
## How to mitigate or resolve
39+
The `cameraStartFailed` UFD event is due to external reasons, so your application should subscribe to events from the User Facing Diagnostics and display a message on the UI to alert users of camera start failures. To resolve this issue, users can check if there are other processes using the same camera and close them if necessary.
40+
41+
## Next steps
42+
* Learn more about [User Facing Diagnostics feature](../../../../../concepts/voice-video-calling/user-facing-diagnostics.md?pivots=platform-web).

0 commit comments

Comments
 (0)