MediaLibrary getAssetsAsync URIs "not found on this server"

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

I’ve been using MediaLibrary to get assets from an album specific album I’ve made and pull them into my app. I then use the URIs of these video assets to create thumbnails and display them within the app. I seem to have an issue whenever I update/change my app on iOS whenever I try to use the URIs returned from getAssetsAsync I get the error back

[Error: The requested URL was not found on this server.]

This happens when building to iOS and on Testflight too. This seemed to have happened after we ejected to expokit on our project and now the referenced uris are in the “assets-library//” format. Here is my example code:

              mediaType: ["video"],
            }).then((media) => {
              var videos = [];
              if (media.assets.length == 0) {
                this.setState({ loading: false });
              } else {
                media.assets.forEach((asset) => {
                  VideoThumbnails.getThumbnailAsync(asset.uri).then((thumbnail) => {
                      videos.push([asset.duration, asset.uri, thumbnail]);
                      this.setState({ videos: videos});

The code above works fine and getAssetsAsync returns assets from the folder and their respective URIs but its when I try and use these in the Expo AV Video or in VideoThumbnails.getThumbnailAsync that the [Error: The requested URL was not found on this server.] error is returned.

Another IMPORTANT thing to note is that when you clear out the Album of assets and add new ones the URIs gathered from getAssetsAsync work and I am able to generate thumbnails and play the videos for them.