You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to run some photo processing in the background when the app is closed. To do this, we are using Headless JS from React Native. This involves reading photos from the camera roll & getting AssetInfo from these.
When the app is still running and we run the BG task, everything works fine. When the app is terminated and we run the BG task, the headless task errors out.
Expected Behavior
I expected the app to be able to load Assets in a background task.
Actual Behavior
The function errors out with Error: Missing CAMERA_ROLL permissions.
Permission to the camera roll on Android is defined by the READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions. There is no restriction as to when these permissions can be used.
馃悰 Bug Report
Environment
Expo CLI 3.15.5 environment info:
System:
OS: Linux 4.15 Linux Mint 19.1 (Tessa)
Shell: 5.4.2 - /usr/bin/zsh
Binaries:
Node: 13.9.0 - ~/.nvm/versions/node/v13.9.0/bin/node
Yarn: 1.22.0 - ~/.nvm/versions/node/v13.9.0/bin/yarn
npm: 6.13.7 - ~/.nvm/versions/node/v13.9.0/bin/npm
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
expo-cli: 3.15.5
Android. Bare React Native
Steps to Reproduce
We are trying to run some photo processing in the background when the app is closed. To do this, we are using Headless JS from React Native. This involves reading photos from the camera roll & getting AssetInfo from these.
When the app is still running and we run the BG task, everything works fine. When the app is terminated and we run the BG task, the headless task errors out.
Expected Behavior
I expected the app to be able to load Assets in a background task.
Actual Behavior
The function errors out with
Error: Missing CAMERA_ROLL permissions.
Reproducible Demo
https://github.com/niekcandaele/repro-expo-medialibrary-issue
You can trigger the headless task with
adb shell cmd jobscheduler run -f com.testappbackgroundfetch 999
Logs when app is still running:
Logs when app is terminated:
The text was updated successfully, but these errors were encountered: