Expo AV video has AVFoundationErrorDomain error on localhost server

Please provide the following:

  1. SDK Version: 43
  2. Platforms(Android/iOS/web/all): iOS

I use Video form expo-av in my react-native app, it works when I tested it with uri from doc’s example, however, when I try to stream the data from the node.js backend server built by myself, it shows the following error:

The server is not correctly configured. - The AVPlayerItem instance has failed with the error code -11850 and domain “AVFoundationErrorDomain”.

Steps to Reproduce

import React from "react";
import { Video } from "expo-av";

const MyScreen: React.FC<Props> = () => {
  return (
        style={{ width: 200, height: 300 }}
        onLoad={(param) => console.log(param)}
        onError={(err) => console.log(err)}
          uri: "http://localhost:3000/api/posts/mediaFiles/616af1a35da09d7d2893d5e3" // failed
         // uri: "http://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4"  (success)

export default HomeScreen;

Other problems seem to be similar

I’ve found a stack overflow post, not sure is it because I use HTTP instead of HTTPS from my local server

I’ve also found a GitHub issue that seems to be similar to my problem

Hey @bananemo, can you ensure the device you are trying to run the video on is able to connect to your local backend? If not, it’s a connection issue rather than an issue with the video module.


Hi @adamjnav,

Thanks for your reply! Yes, I am sure that I’m able to connect to my local backend. Since when I tested the endpoint on Postman, it works. And I’ve also put the same URI into Chrome, and I can see my video too.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.