apache / apache/cordova-plugin-file

file.copyFile Not Working Android versions 8 and 9

Open
#305 1 comment 0 reactions 0 assignees View on GitHub
platform: android support
Dominant language
JavaScript
Stars
744
Forks
754
Avg merge
3d 4h
Merged PRs (30d)
1

Description

# Bug Report

## Problem
copyFile method fails on Android 8 and 9. Works properly in iOS and Android 6 and 7
Returns error code 5 FILE NOT FOUND

### What is expected to happen?
Copy the file into the new location

### What does actually happen?
Throws a error

## Information

**ionic info**
```
Ionic:

ionic (Ionic CLI) : 4.2.0 (C:\Users\Joao Lourenco\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.9

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 6.4.0
Cordova Plugins : no whitelisted plugins (26 plugins total)

System:

Android SDK Tools : 26.1.1 (C:\Android\SDK)
NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10`
```

**ionic cordova plugins list**
```
cordova-plugin-advanced-http 1.9.0 "Advanced HTTP plugin"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-badge 0.8.8 "Badge"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-crop 0.3.1 "CropPlugin"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-fcm 2.1.2 "FCMPlugin"
cordova-plugin-file 5.0.0 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-filechooser 1.0.1 "File Chooser"
cordova-plugin-filepath 1.5.1 "cordova-plugin-filepath"
cordova-plugin-inappbrowser 2.0.2 "InAppBrowser"
cordova-plugin-media-capture 2.0.0 "Capture"
cordova-plugin-nativestorage 2.3.1 "NativeStorage"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-telerik-imagepicker 2.2.2 "ImagePicker"
cordova-plugin-themeablebrowser 0.2.17 "ThemeableBrowser"
cordova-plugin-videoplayer 0.1.4 "cordova-plugin-videoplayer"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-zip 3.1.0 "cordova-plugin-zip"
cordova-sqlite-storage 2.6.0 "Cordova sqlite storage plugin"
cordova.plugins.diagnostic 3.9.2 "Diagnostic"
info.protonet.imageresizer 0.1.1 "Image Resizer"
ionic-plugin-keyboard 2.2.1 "Keyboard"
```

### Command or Code

### Environment, Platform, Device

### Version information

## Checklist

- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

Start by reproducing file.copyFile on Android 8 and 9 with cordova-plugin-file 5.0.0, then compare the behavior with Android 6 and 7 and iOS. Trace the Android implementation and verify the failure involving error code 5; done means copying the file succeeds on the affected Android versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.