question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[expo-media-library] Photos in library are not showing up

See original GitHub issue

Summary

Many photos from the library do not show up correctly when pulling assets from expo-media-library using getAssetsAsync(). This was initially reported to me by a user when downloading photos from whatsapp, which I confirmed as well as a developer in #10002. However, I have found that it is more than just whatsapp, but many photos saved from various places that arent taken directly from the camera roll.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Android, iOS

SDK Version (managed workflow only)

42.0.0

Environment

  Expo CLI 4.7.2 environment info:
    System:
      OS: macOS 11.4
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 12.18.1 - ~/.nvm/versions/node/v12.18.1/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 6.14.5 - ~/.nvm/versions/node/v12.18.1/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.9.1 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    IDEs:
      Android Studio: 3.5 AI-191.8026.42.35.5977832
      Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^41.0.0 => 41.0.0 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2 
    npmGlobalPackages:
      expo-cli: 4.7.2
    Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

  1. save a photo from whatsapp
  2. confirm the photo is in your recents or library folder
  3. call MediaLibrary.getAssetsAsync() on your recents folder
  4. The photo will not be in the pulled photos

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Joshandrews43commented, Jul 13, 2021

@yagudaev on this sample project i just made it seems to be working only sometimes. We both confirmed in #10002 that it was bugged, but on here i got about 4 photos to work and one not working… No idea…

https://github.com/Joshandrews43/media-library-issue

0reactions
next6leocommented, Sep 8, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why are other images from media library displaying in react ...
My fairly basic react native project uses expo-media-library to retrieve some photographs from a users photo album, presenting them in a ...
Read more >
MediaLibrary - Expo Documentation
expo -media-library provides access to the user's media library, allowing them to access their existing images and videos from your app, as well...
Read more >
How to Fix WordPress Media Library Not Showing Images
Don't be under pressure if your WordPress media library does not show images. Check out 3 methods to fix this error in a...
Read more >
Can't Upload Images to WordPress Media Library? - WP Engine
If your Media Library is loading but not showing images, there are two primary causes: an incompatible plugin, and improper file permissions ......
Read more >
Some images no longer showing up in Media Library
I figured it out. I had copied content from my main site to a kind of sandbox site. The sandbox was pulling the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found