---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/video/media-sdk-troubleshooting#article
headline: Troubleshoot Node.js Media SDK issues
description: Fixes for common issues with the Video Media SDK for Node.js.
url: https://www.twilio.com/docs/video/media-sdk-troubleshooting
inLanguage: en
dateModified: 2026-09-15T15:39:36.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Troubleshoot Node.js Media SDK issues

## Node install fails on Apple Silicon

The native binary only works on 64-bit systems.

1. On an Apple Silicon (M-series) Mac, install Rosetta.
   ```shell
   /usr/sbin/softwareupdate --install-rosetta --agree-to-license
   ```
2. Install [Node.js][node-install].\
   If the installation fails, the command returns `npm error code EBADPLATFORM`.
3. Verify that the Node installed a 64-bit version.
   ```shell
   node -e "console.log(process.arch)"
   ```
   macOS running Apple Silicon returns `arm64`.

[node-install]: https://nodejs.org/en/download

## No prebuilt binary found

This error means the native addon isn't present for your platform and architecture. Confirm you're on a supported platform (Linux x64 or macOS x64) and running an x64 build of Node.js version 24 or later, then reinstall the SDK package.

## Access Token or credential errors

If the token expired or the token was malformed, it returns a `disconnected` or `connectFailure` event with an `AccessTokenInvalidError`.

1. [Set environment variables][uid] for `TWILIO_ACCOUNT_SID`, `TWILIO_API_KEY`, and `TWILIO_API_SECRET`.
2. The token carries a [`VideoGrant`][VideoGrant].

## Frames don't appear in the Room

Verify two actions in your code:

1. Resolve  `connect()`, then push frames. Any frames before that resolution get dropped.
2. Review the parameters you pass to the Room:
   * Set [Video][vframes] using the [Y'UV][] color model. Set the `Y`, `U`, and `V` strides to the plane widths and the frame dimensions.
     * `Y`: Full-resolution [luminance][luma] at the full frame height
     * `U`: Blue-difference [chrominance][] (`Cb`) at half the frame height
     * `V`: Red-difference chrominance (`Cr`) at half the frame height
   * Set [Audio][aframes] frame input to 48 kHz mono `S16LE` `PCM`.
     * `S`: Use *Signed* positive or negative integer values.
     * `16`: Store *16 bits* (or two bytes) of data per audio sample.
     * `LE`: Use the [*little-endian*][le] method to store data placing the least significant byte in the smallest memory address.
     * `PCM`: Convert data using [*Pulse-code modulation*][pcm]: the raw, uncompressed audio wave data.

### Diagnose Room and media issues

To inspect a Room's media and connection health beyond your own logs, use [Video Insights][].

If you can't resolve an issue, [contact Twilio Support][tw-support].

[aframes]: /docs/video/node-working-with-media-frames#audio-frames

[chrominance]: https://en.wikipedia.org/wiki/Chrominance

[le]: https://en.wikipedia.org/wiki/Endianness

[luma]: https://en.wikipedia.org/wiki/Luma_\(video\)

[pcm]: https://en.wikipedia.org/wiki/Pulse-code_modulation

[tw-support]: https://help.twilio.com

[uid]: /docs/video/tutorials/user-identity-access-tokens

[vframes]: /docs/video/node-working-with-media-frames#video-frames

[Video Insights]: /docs/video/troubleshooting/insights

[VideoGrant]: /docs/video/tutorials/user-identity-access-tokens#generate-helper-lib

[Y'UV]: https://en.wikipedia.org/wiki/Y%E2%80%B2UV
