Error Codes

If you have an issue that this page does not address, see the Google Cast Support page to get answers to your questions.

Cast SDK error codes

Error codes related to the Cast SDK sent by error events or media error messages.

Name Code Description Solution
APP 900 Returned when an error occurs outside of the framework (e.g., if an event handler throws an error). Investigate the error that is outside the cast framework.
BREAK_CLIP_LOADING_ERROR 901 Returned when break clip load interceptor fails. Examine the contents of the break clips.
BREAK_SEEK_INTERCEPTOR_ERROR 902 Returned when break seek interceptor fails. Check to ensure the break seek interceptor is correct.
IMAGE_ERROR 903 Returned when an image fails to load. Verify the image URL points to the correct location.
LOAD_INTERRUPTED 904 A load was interrupted by a stop, or by another load. Check to see if another action caused the load to be interrupted.
LOAD_FAILED 905 A load command failed. Verify the load request is set up properly and the media is able to play.
MEDIA_ERROR_MESSAGE 906 An error message was sent to the sender. Check either the Web Receiver or the sender for information on the error.
GENERIC 909 Returned when an unknown error occurs. Something unexpected has occurred. This should be rare.

Media Player Library error codes

Playback-related error messages from MPL sent by error events or media error messages.

Name Code Description Solution
MEDIA_UNKNOWN 100 The media element encountered an unknown error fired from platform. The media element encountered an error that did not indicate it's one of MediaError.MEDIA_ERR_*. This should be rare.
MEDIA_ABORTED 101 The media element fired MediaError.MEDIA_ERR_ABORTED error. The fetching process for the media resource was aborted at the user's request. This is usually due to aborting play.
MEDIA_DECODE 102 The media element fired MediaError.MEDIA_ERR_DECODE error. Developer should validate their stream's encoding parameters.
MEDIA_NETWORK 103 The media element fired MediaError.MEDIA_ERR_NETWORK error Download of media data failed because Cast doesn't use media element to download. This issue can be with your app; if necessary, report through Cast issue tracker.
MEDIA_SRC_NOT_SUPPORTED 104 The media element fired MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED error. Validate developer data segment, ensure the codecs are included in Cast supported formats.
SOURCE_BUFFER_FAILURE 110 Cast is unable to add a source buffer to the existing Media source. See Web Crypto. Often times this could be incorrect codecs specified on the codecs stream on the manifest in your app. If not, report through Cast issue tracker.
MEDIAKEYS_NETWORK 201 When using XhrIo in Media Keys for posting a license request, we encountered a network error. Developer validates their license server.
MEDIAKEYS_UNSUPPORTED 202 This covers two cases:
  • When using the media session to generate a request on EME, we encountered a key error.
  • Failed to initialize EME media keys.
Download of media data failed, but because Cast doesn't use media element to download, please report through Cast issue tracker.
MEDIAKEYS_WEBCRYPTO 203 When using built-in Web Crypto supported by the browser, we ran into an error decrypting. See Web Crypto API. Please report through Cast issue tracker.
NETWORK_UNKNOWN 300 Encountered a generic network error when fetching a resource not covered within the range [301-399] Developers must ensure that the content being fetched is accessible and the server's response is formed properly.
SEGMENT_NETWORK 301* Failed to retrieve any segment from any bitrate (with three retries of exponential backoffs). Developers need to validate that their segments are indeed available. It could be the case that a user that cannot reach these segments as well.
HLS_NETWORK_MASTER_PLAYLIST 311* Failed to retrieve the master playlist m3u8 file with three retries. Developers need to validate that their playlists are indeed available. It could be the case that a user that cannot reach the playlist as well.
HLS_NETWORK_PLAYLIST 312* Failed to retrieve the media (bitrated) playlist m3u8 file with three retries. Developers need to validate that their playlists are indeed available. It could be the case that a user that cannot reach the playlist as well.
HLS_NETWORK_NO_KEY_RESPONSE 313 The request for decryption key did not return a response. Developers need to validate their decryption key service.
HLS_NETWORK_KEY_LOAD 314* The XhrIO used to request HLS decryption key failed. Developers need to validate their decryption key service.
HLS_NETWORK_INVALID_SEGMENT 315 The HLS segment received for processing is neither a TS nor an mp4 AAC segment. Could be MPL bug or configuration on Web Receiver app bug. Developers need to validate that their segments are either TS or AAC.
HLS_SEGMENT_PARSING 316 Returned when an HLS segment fails to parse. Developers need to validate that their segments are formed correctly.
DASH_NETWORK 321* The XHR request to get the DASH Manifest failed with no response. See star section for network-related error diagnosis.
DASH_NO_INIT 322 We cannot extract initialization data from the first DASH init segment. Developers need to validate their DASH init segment.
SMOOTH_NETWORK 331* The XHR request to get the DASH Manifest failed with no response. See star section for network related error diagnosis.
SMOOTH_NO_MEDIA_DATA 332 The segment downloaded for processing contains no media data. Developers need to validate their Smooth segments.
HLS_MANIFEST_MASTER 411 Parsing of the HLS manifest file failed. Or something MPL does not understand yet in the m3u8 Examine the content of the manifest url.
HLS_MANIFEST_PLAYLIST 412 Parsing of the media playlist file failed. Or something MPL does not understand yet in the m3u8 Examine the content of the media playlist URL.
DASH_MANIFEST_NO_PERIODS 421 When normalizing the Dash manifest, we found not periods in it. This is abnormal. Developers need to validate their DASH manifest.
DASH_MANIFEST_NO_MIMETYPE 422 There is no mimetype for a representation in the manifest. Developers need to specify Audio/Video/Text mimetype for their representations.
DASH_INVALID_SEGMENT_INFO 423 MPL is requesting a segment index that is beyond the length of available segments as specified by the representation in the manifest. Report using links on the Google Cast Support page.
SMOOTH_MANIFEST 431 The smooth manifest does not conform to standard. Developer needs to resolve any of the following issues:
  • no sps
  • invalid video quality
  • invalid audio quality
  • invalid audio codec private data
  • invalid protection info
  • no quality level
  • unknown media

Shaka player error codes

For error codes related to Shaka Player, see the Shaka Player Error class documentation.

Common network errors

HTTP Error Status Code Description Solution
BAD_REQUEST 400 The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. Something is wrong with the url. Check with application developers
UNAUTHORIZED 401 The request requires user authentication Check application to see if proper auth information is present.
NOT_FOUND 404 Client can communicate with server but server could not find what was requested Developers checks url resources and ensures they are there.
REQUEST_TIMEOUT 408 The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time. This could be a resource (server scalability) or real network issue.
INTERNAL_SERVER_ERROR 500 The server encountered an unexpected condition which prevented it from fulfilling the request. Developers check their server problem.
BAD_GATEWAY 502 The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request. Developers check their server configuration.
SERVICE_UNAVAILABLE 503 The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. Developers check their server configuration, especially the scalability of their services.
GATEWAY_TIMEOUT 504 The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI. Developers check server configuration and connection between their edge servers and origin nodes.

Notes

An error code followed by an asterisk (*) can have further error codes appended to it. The format is:

{Error Code}{Closure Network Error Code}{HTTP Status Code}

For more info, see HTTP Status Code.

Example 3016404 has three parts:

301 Segment network error.
6 HTTP error.
404 HTTP not found status.

The nature of network errors - The reason some of these errors are actionable while others are not is due to the nature of network operations. For example, error 3018408 indicating a timeout could mean a bad connection for the user, where neither the Cast team nor the developers can do much about it; beware it could also mean the developer's CDN is having issues as well. On the other hand, an error 3116403 means that the manifest request is successfully made but the server refuses to serve it. This could be CORS, auth, or any other server or integration issues that developers should look at.