nativescript-community / nativescript-community/ui-document-picker

file.read or file.readSync error: EACCES (Permission denied)

Open
#17 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
11
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Good morning,

My system details:

  • Ubuntu 20.04.3 LTS
  • NativeScript CLI 8.1.4
  • NVM 0.35.3
  • Node v16.13.0
  • NPM 8.1.0
  • Android 11 API Level 30
  • Xiaomi Redmi Note 9S MIUI 12.5.2
  • "@nativescript/core": "~8.1.1",
  • "@nativescript-community/ui-document-picker": "^1.1.7",
  • "@nativescript/android": "8.1.1",

When Open filepicker and select a PDF file from downloads folder the file.readSync sayas error:

Error: java.io.FileNotFoundException: /storage/emulated/0/Download/Test.pdf: open failed: EACCES (Permission denied)

And when call file.read says error:

Error: ReadTask returns no result.

This just happens only when targetSdkVersion is set to 30 and not in 29, but now to publish and app in Google App Store needs targetSdkVersion 30.

Thanks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue on Ubuntu with NativeScript CLI 8.1.4, Android API 30, and targetSdkVersion 30 using a PDF selected from Downloads. Start by tracing the plugin's file.read and file.readSync paths; done means the selected PDF can be read successfully under target SDK 30 without the EACCES or empty ReadTask errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.