Skip to content

[Communication - Call Automation] BUG - Error 400 when downloading the recording #33764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 6 tasks
deivinni opened this issue Apr 10, 2025 · 1 comment
Open
1 of 6 tasks
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Communication - Call Automation customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@deivinni
Copy link

deivinni commented Apr 10, 2025

Informations

  • Package Name: @azure/communication-call-automation
  • Package Version: 1.3.1
  • Operating system: Linux (using Azure Web App)
  • nodejs
    • version: 22.14.0
  • browser
    • name/version:
  • typescript
    • version:
  • Is the bug related to documentation in

Describe the bug

I’m developing a website to enable educational teachers to communicate with students. I use call-automation to automatically record these calls (for the safety of all users) without any possibility to pause or stop the recording at any point.

Since April 3, 2025, when I attempt to download the recording in order to save it to Blob Storage, the console intermittently returns the following error:

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at ContentDownloaderImpl.download (/home/site/wwwroot/node_modules/@azure/communication-call-automation/dist/commonjs/contentDownloader.js:100:39)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async CallRecording.downloadStreaming (/home/site/wwwroot/node_modules/@azure/communication-call-automation/dist/commonjs/callRecording.js:131:34)
    at async downloadStreaming (/home/site/wwwroot/server.js:165:22)

After conducting further tests and adding some logs to the local file, I received the following:

{
  bodyAsText: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">\r\n' +
    '<HTML><HEAD><TITLE>Bad Request</TITLE>\r\n' +
    '<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>\r\n' +
    '<BODY><h2>Bad Request - Invalid Header</h2>\r\n' +
    '<hr><p>HTTP Error 400. The request has an invalid header name.</p>\r\n' +
    '</BODY></HTML>\r\n'
}

Since April 8, 2025, this error has been occurring on all calls and in all environments (previously it only occurred in production).

To Reproduce

The error occurs whenever the downloadStreaming, downloadToPath, or downloadToStream functions are executed, all of which relate to getCallRecording.

const execDownload = async () => await callAutomationClient.getCallRecording().downloadStreaming(source);

Expected behavior

The expectation was that the recording download would be completed and the upload process to Blob Storage would then continue.
After that, the Power Automate flow would execute and save this information in Dynamics 365.

Screenshots

Image

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Apr 10, 2025
@jeremymeng jeremymeng added the Service Attention Workflow: This issue is responsible by Azure service team. label Apr 10, 2025
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Apr 10, 2025
@jeremymeng jeremymeng added Client This issue points to a problem in the data-plane of the library. Communication - Call Automation labels Apr 10, 2025
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Apr 10, 2025
@deivinni
Copy link
Author

Hello team,
Could you please provide an update on the status of this fix or at least an alternative solution I can use? This issue is impacting our security policies because we’re unable to access the call recordings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Communication - Call Automation customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants