Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using FileSystem getEntities returns only folders inside on android (Expected files) #10416

Open
3 tasks done
armespavong opened this issue Oct 19, 2023 · 1 comment
Open
3 tasks done
Labels
bug-pending-triage Reported bug, pending triage to confirm.

Comments

@armespavong
Copy link

Issue Description

I'm using getEntities with Folder (FileSystemEntity) on android. In this folder, there are folders and files inside, but getEntities returns only folders.

Reproduction

Tries

const folder: any = knownFolders.documents();
folder.getEntities().then((entities: FileSystemEntity[]) => {
        console.log(entities);
});

Relevant log output (if applicable)

No response

Environment

OS: macOS 14.0
CPU: (8) arm64 Apple M1
Shell: /bin/zsh
node: 18.18.2
npm: 10.2.1
nativescript: 8.6.0

# android
java: 17.0.6
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found

# ios
xcode: 15.0/15A240d
cocoapods: 1.13.0
python: 3.11.4
python3: 3.11.4
ruby: 2.6.10
platforms: 
  - DriverKit 23.0
  - iOS 17.0
  - macOS 14.0
  - tvOS 17.0
  - watchOS 10.0

Dependencies

"dependencies": {
  "@master.technology/permissions": "^2.0.1",
  "@nativescript-community/perms": "^2.3.0",
  "@nativescript-community/ui-document-picker": "^1.1.12",
  "@nativescript/core": "^8.6.0",
  "@prabudevarrajan/filepicker": "^2.0.0",
  "dayjs": "^1.11.9",
  "i18next": "^23.5.1",
  "install": "^0.13.0",
  "nativescript-permissions": "^1.3.12",
  "npm": "^10.2.0",
  "react": "^18.2.0",
  "react-native-base64": "^0.2.1",
  "react-nativescript": "^5.0.0",
  "react-nativescript-navigation": "^5.0.0",
  "sass": "^1.69.4",
  "sql.js": "^1.8.0",
  "svg64": "^2.0.0"
},
"devDependencies": {
  "@nativescript/android": "8.6.2",
  "@nativescript/ios": "8.6.1",
  "@nativescript/preview-cli": "^1.0.5",
  "@nativescript/types": "~8.5.0",
  "@nativescript/webpack": "~5.0.14",
  "@types/react": "npm:types-react-without-jsx-intrinsics@^18.0.17",
  "typescript": "~4.8.4"
}

Please accept these terms

@armespavong armespavong added the bug-pending-triage Reported bug, pending triage to confirm. label Oct 19, 2023
@GIT-chandra
Copy link

Facing this same issue, on Android, nativescript version 8.5.3. But I noticed that this happens only with newer android versions (>=13) and is not happening on android 8.0. I did not test on the other versions.

One workaround I've found is to grant "All files access" permissions for the app (add "android.permission.MANAGE_EXTERNAL_STORAGE" in AndroidManifest.xml, then you should be able to grant this permission in android settings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-pending-triage Reported bug, pending triage to confirm.
Projects
None yet
Development

No branches or pull requests

2 participants