[jira] [Updated] (CB-7425) AJAX blocked when using cdvfile

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7425:
-
Labels: Android  (was: )

> AJAX blocked when using cdvfile
> ---
>
> Key: CB-7425
> URL: https://issues.apache.org/jira/browse/CB-7425
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.4.0
> Environment: Android 4.1.2 & 4.4.2, Phonegap 3.4 
> (CORDOVA_JS_BUILD_LABEL = '3.4.0')
>Reporter: 165537
>  Labels: Android
>
> Doing AJAX from packaged files (eg location 
> "file:///android_asset/www/index.html") works well, but doing it from local 
> files (eg "cdvfile://localhost/persistent/TEST/index.html") does not.
> I guess it has to do with the same-origin policy. Is there anything that can 
> be done to make it work?
> If I were reading files from the internet, I would set the web server to add 
> some "Access-Control-Allow-Origin" headers, but here there's no web server. 
> Using jsonp would work, but it'd mean changing the code in the server and in 
> the app.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6901) [WP8][cordova-plugin-file] filesystem: null after use IsolatedStorageFile.MoveDirectory

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6901:
-
Labels: wp8  (was: plugin-file wp8)

> [WP8][cordova-plugin-file] filesystem: null after use 
> IsolatedStorageFile.MoveDirectory
> ---
>
> Key: CB-6901
> URL: https://issues.apache.org/jira/browse/CB-6901
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: Windows 8.1
>Reporter: Martin Gonzalez
>Assignee: Jesse MacFadyen
>  Labels: windows, wp8
> Fix For: 3.6.0
>
>
> Using the File plugin, faced a problem trying to move a directory using the 
> plugin, specifically the moveTo (aka TransferTo on native) , I've found out 
> that the problem is not that the directory is not moved, the problem is that 
> after this line is executed:
> https://github.com/apache/cordova-plugin-file/blob/master/src/wp/File.cs#L1412
> isoFile.MoveDirectory(currentPath, newPath);
> The DispatchCommandResult sends the entry file with the CallbackID, but the 
> problem is that the information about the filesystem is missing.
> This situation it doesn't happen when isoFile.MoveFile(newPath), 
> IsolatedStorageFile.CreateDirectory(path) or 
> IsolatedStorageFile.CreateFile(path) are used the filesystem information it 
> remains with those but not with MoveDirectory.
> During the 67 test and several others, it uses the filesystem information of 
> the recent moved directory to determine if the file exists, and when it gets 
> to GeFileOrDirectory on the options this is the array obtained:
> "[null,"file1","{\"create\":false}","File619232322"]"
> When Create or MoveFile:
> "["\/\/entry,move.dsp.srcDir","file1","{\"create\":false}","File619232322"]"
> From the JS side object:
> MoveDirectory:
> {"isFile":false, "isDirectory":true, "name" : "entry.move.dsp.dstDir", 
> "filesystem":null, "nativeURL":null}
> MoveFile:
> {"isFile":true, "isDirectory":false, "name" : "entry.move.dsp.dstDir", 
> "filesystem":"", "nativeURL":null}
> That's the reason why some automated tests on the MoveTo section are failing.
> Tested on Windows Phone 8 and 8.1, emulator and device. Same behavior.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6901) [WP8][cordova-plugin-file] filesystem: null after use IsolatedStorageFile.MoveDirectory

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6901:
-
Labels: windows wp8  (was: wp8)

> [WP8][cordova-plugin-file] filesystem: null after use 
> IsolatedStorageFile.MoveDirectory
> ---
>
> Key: CB-6901
> URL: https://issues.apache.org/jira/browse/CB-6901
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: Windows 8.1
>Reporter: Martin Gonzalez
>Assignee: Jesse MacFadyen
>  Labels: windows, wp8
> Fix For: 3.6.0
>
>
> Using the File plugin, faced a problem trying to move a directory using the 
> plugin, specifically the moveTo (aka TransferTo on native) , I've found out 
> that the problem is not that the directory is not moved, the problem is that 
> after this line is executed:
> https://github.com/apache/cordova-plugin-file/blob/master/src/wp/File.cs#L1412
> isoFile.MoveDirectory(currentPath, newPath);
> The DispatchCommandResult sends the entry file with the CallbackID, but the 
> problem is that the information about the filesystem is missing.
> This situation it doesn't happen when isoFile.MoveFile(newPath), 
> IsolatedStorageFile.CreateDirectory(path) or 
> IsolatedStorageFile.CreateFile(path) are used the filesystem information it 
> remains with those but not with MoveDirectory.
> During the 67 test and several others, it uses the filesystem information of 
> the recent moved directory to determine if the file exists, and when it gets 
> to GeFileOrDirectory on the options this is the array obtained:
> "[null,"file1","{\"create\":false}","File619232322"]"
> When Create or MoveFile:
> "["\/\/entry,move.dsp.srcDir","file1","{\"create\":false}","File619232322"]"
> From the JS side object:
> MoveDirectory:
> {"isFile":false, "isDirectory":true, "name" : "entry.move.dsp.dstDir", 
> "filesystem":null, "nativeURL":null}
> MoveFile:
> {"isFile":true, "isDirectory":false, "name" : "entry.move.dsp.dstDir", 
> "filesystem":"", "nativeURL":null}
> That's the reason why some automated tests on the MoveTo section are failing.
> Tested on Windows Phone 8 and 8.1, emulator and device. Same behavior.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6901) [WP8][cordova-plugin-file] filesystem: null after use IsolatedStorageFile.MoveDirectory

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6901:
-
Component/s: (was: WP8)

> [WP8][cordova-plugin-file] filesystem: null after use 
> IsolatedStorageFile.MoveDirectory
> ---
>
> Key: CB-6901
> URL: https://issues.apache.org/jira/browse/CB-6901
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: Windows 8.1
>Reporter: Martin Gonzalez
>Assignee: Jesse MacFadyen
>  Labels: windows, wp8
> Fix For: 3.6.0
>
>
> Using the File plugin, faced a problem trying to move a directory using the 
> plugin, specifically the moveTo (aka TransferTo on native) , I've found out 
> that the problem is not that the directory is not moved, the problem is that 
> after this line is executed:
> https://github.com/apache/cordova-plugin-file/blob/master/src/wp/File.cs#L1412
> isoFile.MoveDirectory(currentPath, newPath);
> The DispatchCommandResult sends the entry file with the CallbackID, but the 
> problem is that the information about the filesystem is missing.
> This situation it doesn't happen when isoFile.MoveFile(newPath), 
> IsolatedStorageFile.CreateDirectory(path) or 
> IsolatedStorageFile.CreateFile(path) are used the filesystem information it 
> remains with those but not with MoveDirectory.
> During the 67 test and several others, it uses the filesystem information of 
> the recent moved directory to determine if the file exists, and when it gets 
> to GeFileOrDirectory on the options this is the array obtained:
> "[null,"file1","{\"create\":false}","File619232322"]"
> When Create or MoveFile:
> "["\/\/entry,move.dsp.srcDir","file1","{\"create\":false}","File619232322"]"
> From the JS side object:
> MoveDirectory:
> {"isFile":false, "isDirectory":true, "name" : "entry.move.dsp.dstDir", 
> "filesystem":null, "nativeURL":null}
> MoveFile:
> {"isFile":true, "isDirectory":false, "name" : "entry.move.dsp.dstDir", 
> "filesystem":"", "nativeURL":null}
> That's the reason why some automated tests on the MoveTo section are failing.
> Tested on Windows Phone 8 and 8.1, emulator and device. Same behavior.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9891) Inconsistent URI encoding causing permission errors on android

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9891:
-
Labels: Android  (was: android)

> Inconsistent URI encoding causing permission errors on android
> --
>
> Key: CB-9891
> URL: https://issues.apache.org/jira/browse/CB-9891
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera, Plugin File
>Affects Versions: 2.1.0, 3.0.0
> Environment: Android 5+
>Reporter: Connor Pearson
>  Labels: Android
>
> Using the camera plugin to get a picture from the photo library returns an 
> encoded URI. If you then call resolveLocalFileSystemURI the fileEntry object 
> returned contains the decoded path component of the URI. This path property 
> is used in the toInternalURL function which means it's also decoded. Because 
> Android gave us permission to the encoded URI, but not the decoded URI, 
> attempting to access the decoded URI results in a permission error. 
> {code:javascript}
> document.getElementById("myButton").addEventListener("click", function(){
> navigator.camera.getPicture(function(uri){
> console.log(uri); 
> //content://com.android.providers.media.documents/document/image%3A27 
>   window.resolveLocalFileSystemURI(uri, function(fileEntry){
> console.log(fileEntry.toInternalURL()); 
> //cdvfile://localhost/content/com.android.providers.media.documents/document/image:27
>   
> fileEntry.file(function(){alert("success");}, 
> function(){alert("fail");});
> },function(error){
> // resolved by pulling in PR 119
> alert("Fail resolveFileSystemURI code: " + error.code);
> });
> }, null, {sourceType: 0, allowEdit: false});
> });
> {code}
> I feel like something must be wrong in one of the plugins, but I'm not sure 
> where. In the android FileSystem.js, replacing the second line of the 
> function with
> {code:javascript}
> path = path.replace('//', '/').replace(':', '%3A');
> {code}
> solves this specific issue, but it may cause other problems. What is the 
> correct way of handing URIs throughout the file plugin?
> Another option is calling uri.getEncodedPath() instead of uri.getPath in 
> LocalFileSystemURL.parse and then removing the call to encodeURI() from 
> FileSystem.js.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8659) iOS Plugins: Cordova-iOS 4.0.0 compatibility

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8659:
-
Labels: iOS  (was: cordova-ios-4.0.x)

> iOS Plugins: Cordova-iOS 4.0.0 compatibility
> 
>
> Key: CB-8659
> URL: https://issues.apache.org/jira/browse/CB-8659
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: iOS, Plugin Battery Status, Plugin Camera, Plugin 
> Contacts, Plugin Device Orientation, Plugin Dialogs, Plugin File, Plugin 
> Geolocation, Plugin Globalization, Plugin InAppBrowser, Plugin Media, Plugin 
> Media Capture
>Affects Versions: 4.0.0
>Reporter: Ian Clelland
>Assignee: Ian Clelland
>  Labels: iOS
>
> iOS Plugins need to stop using initWithWebView:
> They also depend on several deprecated categories:
>   - NSArray+Comparisons.h
>   - NSDictionary+Extensions.h
> These need to be fixed in a backwards-compatible way before 4.0.0 is released.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9753) index out of bounds on requestFileSystem

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9753:
-
Labels: iOS  (was: )

> index out of bounds on requestFileSystem
> 
>
> Key: CB-9753
> URL: https://issues.apache.org/jira/browse/CB-9753
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: cordova 5.3.3
> cordova ios 3.9.1
> cordova-plugin-file 2.0.0
> iOS
>Reporter: Denis Babineau
>  Labels: iOS
>
> CDVFile.m's requestFileSystem: incorrectly checks the bounds of an array:
> if (type > self.fileSystems.count) {
> should read:
> if (type >= self.fileSystems.count) {



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8257) org.apache.cordova.file does not work for wp8

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8257:
-
Labels: WP8  (was: )

> org.apache.cordova.file does not work for wp8
> -
>
> Key: CB-8257
> URL: https://issues.apache.org/jira/browse/CB-8257
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 4.0.0
> Environment: windows 8.1 with visualstudio express 2013 and windows 
> phone sdk and emulator
>Reporter: Eser Esen
>Assignee: Jesse MacFadyen
>Priority: Critical
>  Labels: WP8
>
> While on android and ios the file plugin loads all file system paths on the 
> phone which can be accessed with "cordova.file.xxx" (where xxx can be 
> dataDirectory etc.) on wp8 this does not work at all.
> I dont even see any javascript file providing these paths. While on android 
> there is a javascript file called filesystempaths.js, on wp8 its missing.
> But according to official documentation, the file plugin is fully supported 
> on wp8 except two functions (which i do not need).
> I need to get the data directory from my app running on wp8 using 
> cordova.file.dataDirectory. How can we get this work?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6330) FileReader ALWAYS returns TypeMisMatch Error on Windows Phone 8

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6330:
-
Labels: WP8  (was: FileReader FileReader.readAsText)

> FileReader ALWAYS returns TypeMisMatch Error on Windows Phone 8
> ---
>
> Key: CB-6330
> URL: https://issues.apache.org/jira/browse/CB-6330
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 2.8.0, 2.9.0
> Environment: Windows Phone 8
>Reporter: Osahon Okungbowa
>  Labels: WP8
>
> FileReader.readAsText() ALWAYS returns a TypeMisMatchError. 
> None of the event listeners for the FileReader are ever fired (Even the 
> onerror event is NEVER fired).
> However, if you place the FileReader.readAsText() method in a try/catch 
> block, it will ALWAYS return a TypeMisMatchError.
> e.g.
> try
> {
>   fileReader.readAsText(file);
> }
> catch(error)
> {
>   console.log(error.message);
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8257) org.apache.cordova.file does not work for wp8

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8257:
-
Component/s: (was: WP8)

> org.apache.cordova.file does not work for wp8
> -
>
> Key: CB-8257
> URL: https://issues.apache.org/jira/browse/CB-8257
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 4.0.0
> Environment: windows 8.1 with visualstudio express 2013 and windows 
> phone sdk and emulator
>Reporter: Eser Esen
>Assignee: Jesse MacFadyen
>Priority: Critical
>  Labels: WP8
>
> While on android and ios the file plugin loads all file system paths on the 
> phone which can be accessed with "cordova.file.xxx" (where xxx can be 
> dataDirectory etc.) on wp8 this does not work at all.
> I dont even see any javascript file providing these paths. While on android 
> there is a javascript file called filesystempaths.js, on wp8 its missing.
> But according to official documentation, the file plugin is fully supported 
> on wp8 except two functions (which i do not need).
> I need to get the data directory from my app running on wp8 using 
> cordova.file.dataDirectory. How can we get this work?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9853) [Plugin File - Android] Can't read file than 20mb and app crashed.

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9853:
-
Component/s: (was: Android)

> [Plugin File - Android] Can't read file than 20mb and app crashed.
> --
>
> Key: CB-9853
> URL: https://issues.apache.org/jira/browse/CB-9853
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.0.0
> Environment: Android
>Reporter: Nam Pham
>  Labels: Android
>
> I'm using cordova-plugin-file to read my mp3 file with readAsArrayBuffer 
> method.
> It works perfect with file less than 20mb, but the larger it causes the app 
> to crash with this error. (I'm using crosswalk browser)
> E/chromium( 3330): [ERROR:simple_index_file.cc(223)] Failed to write the 
> temporary index file
> E/chromium( 3330): [ERROR:runtime_javascript_dialog_manager.cc(69)] Not 
> implemented reached in virtual void 
> xwalk::RuntimeJavaScriptDialogManager::ResetDialogState(content::WebContents*)
> So I'm confusing that "is the problem come from xwalk or cordova-plugin-file?"
> Please help me because this plugin can only read file smaller than 20mb size.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9853) [Plugin File - Android] Can't read file than 20mb and app crashed.

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9853:
-
Labels: Android  (was: BUG)

> [Plugin File - Android] Can't read file than 20mb and app crashed.
> --
>
> Key: CB-9853
> URL: https://issues.apache.org/jira/browse/CB-9853
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.0.0
> Environment: Android
>Reporter: Nam Pham
>  Labels: Android
>
> I'm using cordova-plugin-file to read my mp3 file with readAsArrayBuffer 
> method.
> It works perfect with file less than 20mb, but the larger it causes the app 
> to crash with this error. (I'm using crosswalk browser)
> E/chromium( 3330): [ERROR:simple_index_file.cc(223)] Failed to write the 
> temporary index file
> E/chromium( 3330): [ERROR:runtime_javascript_dialog_manager.cc(69)] Not 
> implemented reached in virtual void 
> xwalk::RuntimeJavaScriptDialogManager::ResetDialogState(content::WebContents*)
> So I'm confusing that "is the problem come from xwalk or cordova-plugin-file?"
> Please help me because this plugin can only read file smaller than 20mb size.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-7862) crash when copying big file from html file input with

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7862:
-
Labels: Android  (was: )

> crash when copying big file from html file input with 
> --
>
> Key: CB-7862
> URL: https://issues.apache.org/jira/browse/CB-7862
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 4.0.0
> Environment: Android
>Reporter: shenzhuxi
>  Labels: Android
>
> In Android, I tried to copy a 14MB file from html file input with 
> org.apache.cordova.file 1.3.1. The App crashed and a 0 byte file was copied. 
> I use http://ngcordova.com/ and here is my code 
> https://github.com/shenzhuxi/readiator/blob/master/src/js/cordova-index.js. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-9020) cordova.file undefined on WP8

2015-11-05 Thread Jason Ginchereau (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-9020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14992047#comment-14992047
 ] 

Jason Ginchereau commented on CB-9020:
--

This is a duplicate of CB-9887, which was just fixed yesterday.

> cordova.file undefined on WP8
> -
>
> Key: CB-9020
> URL: https://issues.apache.org/jira/browse/CB-9020
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 2.0.0
> Environment: Windows Phone 8 emulator
>Reporter: Rex Park
>Priority: Critical
>
> I have some code that tries to list all of the files in www/json. It works 
> correctly on iOS and Android but fails on Windows Phone 8.1.
> The code is pretty straight forward:
> window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+'/www/json',
>  
> function(dirEntry){
> var directoryReader = dirEntry.createReader();
> directoryReader.readEntries(
> function(entries){
> ups_json_file_count = entries.length;
> var i;
> for (i=0; i < ups_json_file_count; i++) {
> $.getJSON("json/"+entries[i].name, parse_json_files);
> }
> },
> function(){
> console.log("Coudl Not Locate JSON Files. 2");
> }
> );
> }, 
> function(error){
> console.log("Could Not Locate JSON Directory. 1");
> }
> );
> After doing some digging I found that cordova.file is coming up as undefined. 
> The above code is being called inside of the onDeviceReady function.
> cordova-plugin-file 2.0.0 "File"
> cordova-plugin-file-transfer 1.0.0 "File Transfer"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9934) Have "Missing Command Error" when requesting a file system

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9934:
-
Labels: browser  (was: )

> Have "Missing Command Error" when requesting a file system
> --
>
> Key: CB-9934
> URL: https://issues.apache.org/jira/browse/CB-9934
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: cordova -v 5.3.3
> cordova-plugin-file "version": "3.0.0"
> Google Chrome Version 46.0.2490.80
>Reporter: Mikalai Birukou
>Assignee: Tim Barham
>  Labels: browser
>
> Observation #1:
> Listener of 'filePluginIsReady' on window is never triggered.
> Observation #2 (related?):
> cordova.js line 925:
> fail && fail("Missing Command Error");
> is touched both at the start of at app's initialization, followed by "adding 
> proxy for File" from line 943 occures with consequent "Persistent fs quota 
> granted" from Preparing.js, and no error shows in the console.
> When requestFileSystem() is called afterwards, manually or in code, much 
> later, line 925 is touched, and error 'FileError {code: "Missing Command 
> Error"}' shows in the console.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9921) applicationDirectory wrong on browser platform

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9921:
-
Labels: browser  (was: )

> applicationDirectory wrong on browser platform
> --
>
> Key: CB-9921
> URL: https://issues.apache.org/jira/browse/CB-9921
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: Master
>Reporter: Kevin Christopher Henry
>Priority: Minor
>  Labels: browser
>
> In the code for the browser platform, {{applicationDirectory}} is defined as 
> {{location.origin + "/"}}, which with file URLs resolves to simply 
> {{file:///}}.
> Clearly, the root of the filesystem is not generally going to be the 
> application's directory.
> It could be tricky to figure out the right value to use here. But it would be 
> better to indicate a lack of support ({{null}}?) than to return an obviously 
> wrong value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9934) Have "Missing Command Error" when requesting a file system

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9934:
-
Component/s: (was: Browser)

> Have "Missing Command Error" when requesting a file system
> --
>
> Key: CB-9934
> URL: https://issues.apache.org/jira/browse/CB-9934
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: cordova -v 5.3.3
> cordova-plugin-file "version": "3.0.0"
> Google Chrome Version 46.0.2490.80
>Reporter: Mikalai Birukou
>Assignee: Tim Barham
>  Labels: browser
>
> Observation #1:
> Listener of 'filePluginIsReady' on window is never triggered.
> Observation #2 (related?):
> cordova.js line 925:
> fail && fail("Missing Command Error");
> is touched both at the start of at app's initialization, followed by "adding 
> proxy for File" from line 943 occures with consequent "Persistent fs quota 
> granted" from Preparing.js, and no error shows in the console.
> When requestFileSystem() is called afterwards, manually or in code, much 
> later, line 925 is touched, and error 'FileError {code: "Missing Command 
> Error"}' shows in the console.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9652) Cordova File plugin memory leaking

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9652:
-
Labels: iOS  (was: )

> Cordova File plugin memory leaking
> --
>
> Key: CB-9652
> URL: https://issues.apache.org/jira/browse/CB-9652
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Gregor
>  Labels: iOS
>
> We are creating apps using Ionicframework, then building them using cordova. 
> What we are doing in our app is taking photos using Cordova Camera, then 
> moving the files to specific directory. The user has an ability to upload all 
> photos taken to server. Here is how the user progresses through the app:
> 1. Make Photo using Cordova Camera. 
> 2. Use Cordova File to move created file using step 1 to other location.
> 3. Repeat process 1&2 several times (20 times approx).
> 4. Start sync process
> 5. $http requests start (synchronous, not asynchronous!)
> 5.1. Read data from File as base64 string (using Cordova File plugin)
> 5.2. Send data to server
> 5.3. On success, use Cordova File to delete photo from device.
> This was tested on:
> - iPad mini (ios 8, uiwebview)
> - iPad 4 (ios 8, uiwebview)
> We've debugged the whole process through Xcode and checked how memory 
> management is doing. The results were catastrophic!
> - After each File.moveTo call, the app memory grew for at least 5MB.
> - After each File.readAsDataUrl call, the app memory grew for at least 5MB.
> - After each File.removeFile call, the app memory grew for at least 5MB.
> {quote}
> 015-09-02 09:00:03.487 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '84140.372803' ms. Plugin should use a background thread.
> 2015-09-02 09:00:51.925 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.680908' ms. Plugin should use a background thread.
> 2015-09-02 09:00:58.376 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.557861' ms. Plugin should use a background thread.
> 2015-09-02 09:01:12.505 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '12.233887' ms. Plugin should use a background thread.
> 2015-09-02 09:01:26.748 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.616943' ms. Plugin should use a background thread.
> 2015-09-02 09:01:33.780 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.599121' ms. Plugin should use a background thread.
> 2015-09-02 09:01:54.696 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.628174' ms. Plugin should use a background thread.
> 2015-09-02 09:02:01.838 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.617920' ms. Plugin should use a background thread.
> 2015-09-02 09:02:08.800 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '13.183105' ms. Plugin should use a background thread.
> 2015-09-02 09:02:15.660 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.779053' ms. Plugin should use a background thread.
> 2015-09-02 09:02:29.399 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '10.287842' ms. Plugin should use a background thread.
> 2015-09-02 09:02:43.206 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.649170' ms. Plugin should use a background thread.
> 2015-09-02 09:02:50.500 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.527100' ms. Plugin should use a background thread.
> 2015-09-02 09:02:57.189 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.545166' ms. Plugin should use a background thread.
> 2015-09-02 09:03:03.999 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.493164' ms. Plugin should use a background thread.
> 2015-09-02 09:03:15.452 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:19.132 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:20.488 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:20.527 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:20.556 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:20.584 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:20.610 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:24.390 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:24.408 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.034 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.489 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.509 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.529 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.549 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.570 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.601 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.656 

[jira] [Updated] (CB-9652) Cordova File plugin memory leaking

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9652:
-
Component/s: (was: iOS)

> Cordova File plugin memory leaking
> --
>
> Key: CB-9652
> URL: https://issues.apache.org/jira/browse/CB-9652
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Gregor
>  Labels: iOS
>
> We are creating apps using Ionicframework, then building them using cordova. 
> What we are doing in our app is taking photos using Cordova Camera, then 
> moving the files to specific directory. The user has an ability to upload all 
> photos taken to server. Here is how the user progresses through the app:
> 1. Make Photo using Cordova Camera. 
> 2. Use Cordova File to move created file using step 1 to other location.
> 3. Repeat process 1&2 several times (20 times approx).
> 4. Start sync process
> 5. $http requests start (synchronous, not asynchronous!)
> 5.1. Read data from File as base64 string (using Cordova File plugin)
> 5.2. Send data to server
> 5.3. On success, use Cordova File to delete photo from device.
> This was tested on:
> - iPad mini (ios 8, uiwebview)
> - iPad 4 (ios 8, uiwebview)
> We've debugged the whole process through Xcode and checked how memory 
> management is doing. The results were catastrophic!
> - After each File.moveTo call, the app memory grew for at least 5MB.
> - After each File.readAsDataUrl call, the app memory grew for at least 5MB.
> - After each File.removeFile call, the app memory grew for at least 5MB.
> {quote}
> 015-09-02 09:00:03.487 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '84140.372803' ms. Plugin should use a background thread.
> 2015-09-02 09:00:51.925 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.680908' ms. Plugin should use a background thread.
> 2015-09-02 09:00:58.376 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.557861' ms. Plugin should use a background thread.
> 2015-09-02 09:01:12.505 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '12.233887' ms. Plugin should use a background thread.
> 2015-09-02 09:01:26.748 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.616943' ms. Plugin should use a background thread.
> 2015-09-02 09:01:33.780 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.599121' ms. Plugin should use a background thread.
> 2015-09-02 09:01:54.696 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.628174' ms. Plugin should use a background thread.
> 2015-09-02 09:02:01.838 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.617920' ms. Plugin should use a background thread.
> 2015-09-02 09:02:08.800 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '13.183105' ms. Plugin should use a background thread.
> 2015-09-02 09:02:15.660 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.779053' ms. Plugin should use a background thread.
> 2015-09-02 09:02:29.399 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '10.287842' ms. Plugin should use a background thread.
> 2015-09-02 09:02:43.206 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.649170' ms. Plugin should use a background thread.
> 2015-09-02 09:02:50.500 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.527100' ms. Plugin should use a background thread.
> 2015-09-02 09:02:57.189 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.545166' ms. Plugin should use a background thread.
> 2015-09-02 09:03:03.999 test_app[1409:279018] THREAD WARNING: ['File'] took 
> '11.493164' ms. Plugin should use a background thread.
> 2015-09-02 09:03:15.452 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:19.132 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:20.488 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:20.527 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:20.556 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:20.584 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:20.610 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:24.390 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:24.408 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.034 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.489 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.509 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.529 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.549 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.570 test_app[1409:279018] Received memory warning.
> 2015-09-02 09:03:26.601 test_app[1409:279018] Received memory warning.
> 2015-09-02 

[jira] [Updated] (CB-9891) Inconsistent URI encoding causing permission errors on android

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9891:
-
Labels: android  (was: )

> Inconsistent URI encoding causing permission errors on android
> --
>
> Key: CB-9891
> URL: https://issues.apache.org/jira/browse/CB-9891
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera, Plugin File
>Affects Versions: 2.1.0, 3.0.0
> Environment: Android 5+
>Reporter: Connor Pearson
>  Labels: android
>
> Using the camera plugin to get a picture from the photo library returns an 
> encoded URI. If you then call resolveLocalFileSystemURI the fileEntry object 
> returned contains the decoded path component of the URI. This path property 
> is used in the toInternalURL function which means it's also decoded. Because 
> Android gave us permission to the encoded URI, but not the decoded URI, 
> attempting to access the decoded URI results in a permission error. 
> {code:javascript}
> document.getElementById("myButton").addEventListener("click", function(){
> navigator.camera.getPicture(function(uri){
> console.log(uri); 
> //content://com.android.providers.media.documents/document/image%3A27 
>   window.resolveLocalFileSystemURI(uri, function(fileEntry){
> console.log(fileEntry.toInternalURL()); 
> //cdvfile://localhost/content/com.android.providers.media.documents/document/image:27
>   
> fileEntry.file(function(){alert("success");}, 
> function(){alert("fail");});
> },function(error){
> // resolved by pulling in PR 119
> alert("Fail resolveFileSystemURI code: " + error.code);
> });
> }, null, {sourceType: 0, allowEdit: false});
> });
> {code}
> I feel like something must be wrong in one of the plugins, but I'm not sure 
> where. In the android FileSystem.js, replacing the second line of the 
> function with
> {code:javascript}
> path = path.replace('//', '/').replace(':', '%3A');
> {code}
> solves this specific issue, but it may cause other problems. What is the 
> correct way of handing URIs throughout the file plugin?
> Another option is calling uri.getEncodedPath() instead of uri.getPath in 
> LocalFileSystemURL.parse and then removing the call to encodeURI() from 
> FileSystem.js.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8669) Always use setters to fix memory issues without ARC

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8669:
-
Labels: iOS  (was: )

> Always use setters to fix memory issues without ARC
> ---
>
> Key: CB-8669
> URL: https://issues.apache.org/jira/browse/CB-8669
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Reporter: Olivier Louvignes
>  Labels: iOS
>
> https://github.com/apache/cordova-plugin-file/pull/104
> Encountered memory issues with a non-ARC project (cordova+unity3d). Setter 
> should be used to prevent memory issues, eg:
> A synthesized retained setter looks like :
> {code}
> - (void)setValue: (id)newValue
> {
> if (value != newValue)
> {
> [value release];
> value = newValue;
> [value retain];
> }
> } 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9282) Plugin File for Android seems to require trailing slash to identify a directory

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9282:
-
Component/s: (was: Android)

> Plugin File for Android seems to require trailing slash to identify a 
> directory
> ---
>
> Key: CB-9282
> URL: https://issues.apache.org/jira/browse/CB-9282
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 2.1.0
>Reporter: Adriano Di Giovanni
>Priority: Minor
>  Labels: Android
>
> Looking at LocalFileSystemURL.java, lines 39~55
> ```java
> public static LocalFilesystemURL parse(Uri uri) {
> if (!FILESYSTEM_PROTOCOL.equals(uri.getScheme())) {
> return null;
> }
> String path = uri.getPath();
> if (path.length() < 1) {
> return null;
> }
> int firstSlashIdx = path.indexOf('/', 1);
> if (firstSlashIdx < 0) {
> return null;
> }
> String fsName = path.substring(1, firstSlashIdx);
> path = path.substring(firstSlashIdx);
> boolean isDirectory = path.charAt(path.length() - 1) == '/';
> return new LocalFilesystemURL(uri, fsName, path, isDirectory);
> }
> ```
> I found that operations on urls like cdvfile://localhost/persistent (without 
> trailing slash) don't work because firstSlashIds < 0.
> Looking at line 53, Plugin file relies on trailing slash to know in advance 
> if uri is a directory.
> I can't find any mention of that in the docs.
> I find that relying on trailing slashes to identify a directory imposes a 
> burden for client code that must normalize all paths before calling any 
> Plugin File function.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8546) MimeType undefined on files in IOS

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8546:
-
Labels: iOS  (was: filesystem ios8 mime-type mimeType upload)

> MimeType undefined on files in IOS
> --
>
> Key: CB-8546
> URL: https://issues.apache.org/jira/browse/CB-8546
> Project: Apache Cordova
>  Issue Type: New Feature
>  Components: Plugin File
>Affects Versions: 4.0.0
> Environment: OS: Mac OS X Yosemite
> Node Version: v0.12.0
> Cordova CLI: 4.2.0
> Xcode version: Xcode 6.1.1 Build version 6A2008a 
> ios-sim version: 3.1.1
>Reporter: Mike Mullins
>  Labels: iOS
>
> Would love to be able to get actual file mimetype (not just an extension 
> guess) on locally uploaded files in cordova on ios. 
> {code}
>   window.resolveLocalFileSystemURL(imageData, function(fileEntry) {
>   fileEntry.file(function(filedata) {
>   console.log(filedata);
>   });
>   }, errorCB2); 
> {code}
> returns type: nill
> i've noticed in the CDVlocalfilesystem.m file that this appears to be of 
> note, would love to see it pushed up the list a bit!
> {code}
>  // can't easily get the mimetype unless create URL, send request and read 
> response so skipping
> {code}
> (relevant chunk of file:)
> {code}
> - (void)getFileMetadataForURL:(CDVFilesystemURL *)localURL callback:(void 
> (^)(CDVPluginResult *))callback
> {
> NSString *path = [self filesystemPathForURL:localURL];
> CDVPluginResult *result;
> NSFileManager* fileMgr = [[NSFileManager alloc] init];
> NSError* __autoreleasing error = nil;
> NSDictionary* fileAttrs = [fileMgr attributesOfItemAtPath:path 
> error:];
> if (fileAttrs) {
> // create dictionary of file info
> NSMutableDictionary* fileInfo = [NSMutableDictionary 
> dictionaryWithCapacity:5];
> [fileInfo setObject:localURL.fullPath forKey:@"fullPath"];
> [fileInfo setObject:@"" forKey:@"type"];  // can't easily get the 
> mimetype unless create URL, send request and read response so skipping
> [fileInfo setObject:[path lastPathComponent] forKey:@"name"];
> // Ensure that directories (and other non-regular files) report size 
> of 0
> unsigned long long size = ([fileAttrs fileType] == NSFileTypeRegular 
> ? [fileAttrs fileSize] : 0);
> [fileInfo setObject:[NSNumber numberWithUnsignedLongLong:size] 
> forKey:@"size"];
> NSDate* modDate = [fileAttrs fileModificationDate];
> if (modDate) {
> [fileInfo setObject:[NSNumber numberWithDouble:[modDate 
> timeIntervalSince1970] * 1000] forKey:@"lastModifiedDate"];
> }
> result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK 
> messageAsDictionary:fileInfo];
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Assigned] (CB-8497) FileEntry.remove() and FileEntry.file() fail if the file has '#' in its name

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau reassigned CB-8497:


Assignee: Jason Ginchereau

> FileEntry.remove() and FileEntry.file() fail if the file has '#' in its name
> 
>
> Key: CB-8497
> URL: https://issues.apache.org/jira/browse/CB-8497
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: iOS 8.1.3 and Android 5.0
>Reporter: Dani Palou
>Assignee: Jason Ginchereau
>
> If I try to delete a file that has the character '#' in its name, the 
> 'remove' function always fails, returning FileError.NOT_FOUND_ERR. If the 
> file doesn't have the '#' character, the code works fine. This error is 
> happening both in Android 5 and iOS 8.1.3.
> The same happens for the 'file' function.
> This is one of the FileEntries that I'm testing with:
> {quote}
> fullPath: "/tmp/test#.txt",
> isDirectory: false,
> isFIle: true,
> name: "test#.txt",
> nativeURL: "file:///storage/emulated/0/tmp/test%23.txt"
> {quote}
> I obtained this FileEntry using a DirectoryReader to read the contents of the 
> parent folder.
> I'm testing with PhoneGap CLI 4.2.0, FilePlugin 1.3.3, PhoneGap Android 3.6.4 
> and PhoneGap iOS 3.7.0.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6001) CDVFile's URIProtocol should stream data.

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6001:
-
Labels: iOS  (was: )

> CDVFile's URIProtocol should stream data.
> -
>
> Key: CB-6001
> URL: https://issues.apache.org/jira/browse/CB-6001
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: iOS
>Reporter: Andrew Grieve
>Assignee: Ian Clelland
>Priority: Minor
>  Labels: iOS
>
> It is currently reading the entire file into memory instead of reading it in 
> chunks. Can use 
> https://github.com/MobileChromeApps/chrome-cordova/blob/master/plugins/chrome-bootstrap/src/ios/ChromeExtensionURLs.m#L92
>  as inspiration for the fix.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-7127) amazon-fireos: some js files are not merged the same way as on android platform

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7127:
-
Labels: FireOS  (was: )

> amazon-fireos: some js files are not merged the same way as on android 
> platform
> ---
>
> Key: CB-7127
> URL: https://issues.apache.org/jira/browse/CB-7127
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: vldm
>  Labels: FireOS
> Attachments: git.diff
>
>
> When building for platform amazon-fireos placeholder file fileSystem.js is 
> not overridden by android specific version, which makes call to 
> resolveLocalFileSystemURL return entry with null filesystem.
> The platform element of plugin.xml for amazon-fireos is different from 
> android, but probably should be the same. When I replaced section of this 
> element after comment  with content from 
> android platform the function returns entry with correct filesystem on 
> amazon-fireos.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-7334) Implement Workaround for Android Issue 38282 (Android MTP support does not show recent files until the device is rebooted)

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7334:
-
Labels: Android  (was: )

> Implement Workaround for Android Issue 38282 (Android MTP support does not 
> show recent files until the device is rebooted)
> --
>
> Key: CB-7334
> URL: https://issues.apache.org/jira/browse/CB-7334
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: Any Android Version using MTP
>Reporter: Marco Scholle
>  Labels: Android
>
> Link to Android Issue:
> https://code.google.com/p/android/issues/detail?id=38282
> This also applies to cordova, making it impossible to export a file using the 
> file api/plugin and afterwards copying it to a PC using MTP.
> A workaround mentioned in the issue is "to add the following code after every 
> file close" (https://code.google.com/p/android/issues/detail?id=38282#c2):
> MediaScannerConnection.scanFile(this, new String[] { file.getAbsolutePath() 
> }, null, null);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6988) [WP8][cordova-plugin-file] add readAsBinaryString support native

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6988:
-
Component/s: (was: WP8)

> [WP8][cordova-plugin-file] add readAsBinaryString support native
> 
>
> Key: CB-6988
> URL: https://issues.apache.org/jira/browse/CB-6988
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Martin Gonzalez
>Assignee: Martin Gonzalez
>  Labels: WP8
> Fix For: 3.6.0
>
>
> There's no support for this method on the native side, it would be nice to 
> have them working for the next release.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Assigned] (CB-3285) instanceof checks in File API functions

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau reassigned CB-3285:


Assignee: Jason Ginchereau

> instanceof checks in File API functions
> ---
>
> Key: CB-3285
> URL: https://issues.apache.org/jira/browse/CB-3285
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Plugin File
>Affects Versions: Master
>Reporter: Shazron Abdullah
>Assignee: Jason Ginchereau
>Priority: Minor
>
> See: CB-3221
> Wondering if an "instanceof File" check would have prevented this in 
> readAsText, and the other functions as well. A user might have passed in a 
> FileEntry instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6533) Windows 8 unable to create directory where users can see files

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6533:
-
Component/s: (was: WP8)

> Windows 8 unable to create directory where users can see files
> --
>
> Key: CB-6533
> URL: https://issues.apache.org/jira/browse/CB-6533
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.3.0
>Reporter: brian johnston
>Assignee: Jesse MacFadyen
>  Labels: WP8,, Windows
>
> My app relies upon users plugging in their USB cable and transferring large 
> files from the device to their computer.  The file plugin creates folders 
> under the isolated storage.  I can find no way to get files and folders where 
> the user can find them with their computer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6533) Windows 8 unable to create directory where users can see files

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6533:
-
Labels: WP8, Windows  (was: )

> Windows 8 unable to create directory where users can see files
> --
>
> Key: CB-6533
> URL: https://issues.apache.org/jira/browse/CB-6533
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.3.0
>Reporter: brian johnston
>Assignee: Jesse MacFadyen
>  Labels: WP8,, Windows
>
> My app relies upon users plugging in their USB cable and transferring large 
> files from the device to their computer.  The file plugin creates folders 
> under the isolated storage.  I can find no way to get files and folders where 
> the user can find them with their computer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8349) Docs imply you can get device root access on iOS

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8349:
-
Labels: iOS  (was: )

> Docs imply you can get device root access on iOS
> 
>
> Key: CB-8349
> URL: https://issues.apache.org/jira/browse/CB-8349
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Reporter: Raymond Camden
>Priority: Minor
>  Labels: iOS
>
> The docs for iOS say:
> iOS
> library: The application's Library directory
> documents: The application's Documents directory
> cache: The application's Cache directory
> bundle: The application's bundle; the location of the app itself on disk 
> (read-only)
> root: The entire device filesystem
> However, "root" is not the deviceroot, but rather Documents. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-4262) The FileReader readyState is not working as expected (initial value)

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-4262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-4262:
-
Labels: Android  (was: )

> The FileReader readyState is not working as expected (initial value)
> 
>
> Key: CB-4262
> URL: https://issues.apache.org/jira/browse/CB-4262
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 2.9.0
> Environment: Gingerbread emulator
>Reporter: Peter
>Priority: Minor
>  Labels: Android
>
> Expected default state for the FileReader should be *FileReader.EMPTY*, but 
> it seem that this is not the case.
> e.g. Following Jasmine test fragment fails:
> {code}
> it("initial readystate is EMPTY for fr", function() {
>   var theReader = new FileReader();
>   expect(theReader.readyState).toBe(FileReader.EMPTY);
> });
> {code}
> It doesn't seem to be conforming to the standard: 
> http://www.w3.org/TR/FileAPI/#dfn-empty



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6870) Windows8 - trying to write large binary files throws a stack space exceeded exception on

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6870:
-
Assignee: (was: Jason Ginchereau)

> Windows8 - trying to write large binary files throws a stack space exceeded 
> exception on 
> -
>
> Key: CB-6870
> URL: https://issues.apache.org/jira/browse/CB-6870
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Cristian Badila
>  Labels: WP8
>
> When trying to write to disk large files using binary mode (tested with files 
> with sizes greater than 100KB) an exception would occur on Windows 8/8.1 - 
> stack space exceeded. This is due to a change introduced in commit 
> #ef636d93cba502a0881bd22abe744d0b9540424c - can be seen easier here: 
> https://github.com/apache/cordova-plugin-file/commit/ef636d93cba502a0881bd22abe744d0b9540424c.
> To be more exact the line where the exception would be raised is this one:
> bq. data = Array.apply(null, new Uint8Array(data));
> Replacing the above line with the following code fixes the issue:
> {quote}
> var uint8ArrayView = new Uint8Array(data);
> var plainArray = new Array();
> for (var byteIndex = 0; byteIndex < uint8ArrayView.length; 
> byteIndex++) \{
> plainArray.push(uint8ArrayView\[byteIndex\]);
> \}
> data = plainArray;
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-3285) instanceof checks in File API functions

2015-11-05 Thread Jason Ginchereau (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14992195#comment-14992195
 ] 

Jason Ginchereau commented on CB-3285:
--

See also CB-9810, where the same instanceof check could have helped.

> instanceof checks in File API functions
> ---
>
> Key: CB-3285
> URL: https://issues.apache.org/jira/browse/CB-3285
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Plugin File
>Affects Versions: Master
>Reporter: Shazron Abdullah
>Assignee: Jason Ginchereau
>Priority: Minor
>
> See: CB-3221
> Wondering if an "instanceof File" check would have prevented this in 
> readAsText, and the other functions as well. A user might have passed in a 
> FileEntry instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8659) iOS Plugins: Cordova-iOS 4.0.0 compatibility

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8659:
-
Labels:   (was: cordova-ios-4.0.x)

> iOS Plugins: Cordova-iOS 4.0.0 compatibility
> 
>
> Key: CB-8659
> URL: https://issues.apache.org/jira/browse/CB-8659
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: iOS, Plugin Battery Status, Plugin Camera, Plugin 
> Contacts, Plugin Device Orientation, Plugin Dialogs, Plugin File, Plugin 
> Geolocation, Plugin Globalization, Plugin InAppBrowser, Plugin Media, Plugin 
> Media Capture
>Affects Versions: 4.0.0
>Reporter: Ian Clelland
>Assignee: Ian Clelland
>
> iOS Plugins need to stop using initWithWebView:
> They also depend on several deprecated categories:
>   - NSArray+Comparisons.h
>   - NSDictionary+Extensions.h
> These need to be fixed in a backwards-compatible way before 4.0.0 is released.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8659) iOS Plugins: Cordova-iOS 4.0.0 compatibility

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8659:
-
Labels: cordova-ios-4.0.x  (was: )

> iOS Plugins: Cordova-iOS 4.0.0 compatibility
> 
>
> Key: CB-8659
> URL: https://issues.apache.org/jira/browse/CB-8659
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: iOS, Plugin Battery Status, Plugin Camera, Plugin 
> Contacts, Plugin Device Orientation, Plugin Dialogs, Plugin File, Plugin 
> Geolocation, Plugin Globalization, Plugin InAppBrowser, Plugin Media, Plugin 
> Media Capture
>Affects Versions: 4.0.0
>Reporter: Ian Clelland
>Assignee: Ian Clelland
>  Labels: cordova-ios-4.0.x
>
> iOS Plugins need to stop using initWithWebView:
> They also depend on several deprecated categories:
>   - NSArray+Comparisons.h
>   - NSDictionary+Extensions.h
> These need to be fixed in a backwards-compatible way before 4.0.0 is released.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9498) FileReader.prototype.readAsText runs malfunctionnally in mobilespec

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9498:
-
Labels: Android  (was: )

> FileReader.prototype.readAsText runs malfunctionnally in mobilespec
> ---
>
> Key: CB-9498
> URL: https://issues.apache.org/jira/browse/CB-9498
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 4.0.1
> Environment: Android 4.4, 5.0
>Reporter: Dong Hanlin
>Priority: Minor
>  Labels: Android
>
> When running tests of cordova-plugin-file with Mobilespec, file.spec.83 
> failed. Error messages are listed below:
> Error: Expected null to be 'asdfasdf'.
> at 
> stack(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:1292:17)
> at 
> buildExpectationResult(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:1269:14)
> at 
> Spec.Env.expectationResultFactory(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:483:18)
> at 
> Spec.addExpectationResult(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:259:46)
> at 
> Expectation.addExpectationResult(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js/441:21)
> at 
> Expectation.toBe(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:1208:12)
> at 
> FileReader.verifier(file:///android_asset/www/plugins/cordova-plugin-file-tests/tests.js:2190:47)
> When looking into the source code FileReader.js, it is found that readAsText 
> is overrided. However, this function didn't return the expected result we 
> want. *And this problem happens only in tests. In daily usage, such problems 
> don't appear.*



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9236) File plugin takes 500+ms on iOS, causing web thread to lock until done

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9236:
-
Labels: iOS  (was: )

> File plugin takes 500+ms on iOS, causing web thread to lock until done
> --
>
> Key: CB-9236
> URL: https://issues.apache.org/jira/browse/CB-9236
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Plugin File
>Affects Versions: 5.0.0
> Environment: iPad mini retina, iPad air 2. Both running iOS 8.3
>Reporter: Aaron
>  Labels: iOS
>
> Hello,
> I'm using the file API to store a gif created by the yahoo gifshot plugin. 
> When the gifshot callback fires, i see in the xcode logs:
> 2015-06-23 12:07:42.467 AppName[5446:2010157] THREAD WARNING: ['File'] took 
> '12.512939' ms. Plugin should use a background thread.
> 2015-06-23 12:07:43.094 AppName[5446:2010157] THREAD WARNING: ['File'] took 
> '566.554932' ms. Plugin should use a background thread
> This tends to interrupt interactions in the webview, such as typing into a 
> form, tapping buttons, canvas animations, etc. I'm wondering if it's possible 
> to get this running a separate thread. Note that a couple apps ive seen this 
> in have been for iOS only. I do not have the means to run this on android & 
> test, because it is using a custom plugin only built for iOS. So i cannot 
> make a test case there.
> Here's the respected javascript code:
> {code:javascript}
> window.requestFileSystem(window.LocalFileSystem.PERSISTENT, 0, function 
> (fileSys) {
>   var myFolderApp = 'AppFolder';
>   fileSys.root.getDirectory(myFolderApp, { create: true, exclusive: false 
> }, function (directory) {
> fileSys.root.getFile(directory.fullPath + "/" + Date.now() + ".gif", 
> { create: true, exclusive: false }, function (entry) {
>   entry.createWriter(function (writer) {
> writer.onwriteend = function () {
>   _this.processingAGif = false;
>   if (InteractionStore.getByUUID(interactionUUID)) {
> MediaStore.saveForUUID(interactionUUID, entry.fullPath);
> if (InteractionStore.getByUUID(interactionUUID).complete) {
>   InteractionStore.commitInteraction(interactionUUID);
> }
> else {
>   InteractionStore.setUUIDToProcessed(interactionUUID);
> }
>   }
> };
> writer.write(_this.dataURItoBlob(_this.imagebase64));
>   });
> });
>   });
> });
> {code}
> The InteractionStore and MediaStore are just memory stores for small bits of 
> data. Inconsequential at this point. The commitInteraction writes the paths 
> to the websql store.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9403) File does not have fullPath property

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9403:
-
Labels: Windows  (was: )

> File does not have fullPath property
> 
>
> Key: CB-9403
> URL: https://issues.apache.org/jira/browse/CB-9403
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Reporter: Erik Jan de Wit
>Assignee: Murat Sutunc
>  Labels: Windows
>
> File should have a property called fullPath like FileEntry does but on 
> windows this is not the case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6988) [WP8][cordova-plugin-file] add readAsBinaryString support native

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6988:
-
Labels: WP8  (was: WP8 plugin-file)

> [WP8][cordova-plugin-file] add readAsBinaryString support native
> 
>
> Key: CB-6988
> URL: https://issues.apache.org/jira/browse/CB-6988
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Martin Gonzalez
>Assignee: Martin Gonzalez
>  Labels: WP8
> Fix For: 3.6.0
>
>
> There's no support for this method on the native side, it would be nice to 
> have them working for the next release.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6870) Windows8 - trying to write large binary files throws a stack space exceeded exception on

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6870:
-
Labels: WP8  (was: )

> Windows8 - trying to write large binary files throws a stack space exceeded 
> exception on 
> -
>
> Key: CB-6870
> URL: https://issues.apache.org/jira/browse/CB-6870
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Cristian Badila
>  Labels: WP8
>
> When trying to write to disk large files using binary mode (tested with files 
> with sizes greater than 100KB) an exception would occur on Windows 8/8.1 - 
> stack space exceeded. This is due to a change introduced in commit 
> #ef636d93cba502a0881bd22abe744d0b9540424c - can be seen easier here: 
> https://github.com/apache/cordova-plugin-file/commit/ef636d93cba502a0881bd22abe744d0b9540424c.
> To be more exact the line where the exception would be raised is this one:
> bq. data = Array.apply(null, new Uint8Array(data));
> Replacing the above line with the following code fixes the issue:
> {quote}
> var uint8ArrayView = new Uint8Array(data);
> var plainArray = new Array();
> for (var byteIndex = 0; byteIndex < uint8ArrayView.length; 
> byteIndex++) \{
> plainArray.push(uint8ArrayView\[byteIndex\]);
> \}
> data = plainArray;
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Assigned] (CB-6870) Windows8 - trying to write large binary files throws a stack space exceeded exception on

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau reassigned CB-6870:


Assignee: Jason Ginchereau

> Windows8 - trying to write large binary files throws a stack space exceeded 
> exception on 
> -
>
> Key: CB-6870
> URL: https://issues.apache.org/jira/browse/CB-6870
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Cristian Badila
>Assignee: Jason Ginchereau
>
> When trying to write to disk large files using binary mode (tested with files 
> with sizes greater than 100KB) an exception would occur on Windows 8/8.1 - 
> stack space exceeded. This is due to a change introduced in commit 
> #ef636d93cba502a0881bd22abe744d0b9540424c - can be seen easier here: 
> https://github.com/apache/cordova-plugin-file/commit/ef636d93cba502a0881bd22abe744d0b9540424c.
> To be more exact the line where the exception would be raised is this one:
> bq. data = Array.apply(null, new Uint8Array(data));
> Replacing the above line with the following code fixes the issue:
> {quote}
> var uint8ArrayView = new Uint8Array(data);
> var plainArray = new Array();
> for (var byteIndex = 0; byteIndex < uint8ArrayView.length; 
> byteIndex++) \{
> plainArray.push(uint8ArrayView\[byteIndex\]);
> \}
> data = plainArray;
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6335) Blackberry file plugin accessing file system returns no results

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6335:
-
Labels: BlackBerry10  (was: )

> Blackberry file plugin accessing file system returns no results
> ---
>
> Key: CB-6335
> URL: https://issues.apache.org/jira/browse/CB-6335
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.4.0
> Environment: File plugin 1.0.1, Blackberry 10.2.x emulator & device 
> (Z10)
>Reporter: Boston Dell-Vandenberg
>  Labels: BlackBerry10
>
> Trying to access the Blackberry shared folder and list it's contents but the 
> file plugin is returning no entries (FileError Code 1).
> blackberry.io.sandbox is set to false and the blackberry.io plugin is 
> installed to access the shared folder path.
> I have tested on both emulator and device (10.2) with the following code:
> {code}
> window.requestFileSystem(
>   LocalFileSystem.PERSISTENT,
>   1024 * 1024,
>   function (fs) {
>   fs.root.getDirectory(
> blackberry.io.sharedFolder,
> {},
> function(result) {
>   var reader = result.createReader();
>   reader.readEntries(
> function(entries) {
>   console.log(entries);
> },
> function (error) {
>   console.log('Failed to list directory contents: ', error);
> }
>   );
> },
> function(error) {
>   console.log('Error accessing shared folder');
> }
>   );
>   },
>   function () {
> console.log('Error accessing local file system');
>   }
> );
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6335) Blackberry file plugin accessing file system returns no results

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6335:
-
Component/s: (was: BlackBerry)

> Blackberry file plugin accessing file system returns no results
> ---
>
> Key: CB-6335
> URL: https://issues.apache.org/jira/browse/CB-6335
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.4.0
> Environment: File plugin 1.0.1, Blackberry 10.2.x emulator & device 
> (Z10)
>Reporter: Boston Dell-Vandenberg
>  Labels: BlackBerry10
>
> Trying to access the Blackberry shared folder and list it's contents but the 
> file plugin is returning no entries (FileError Code 1).
> blackberry.io.sandbox is set to false and the blackberry.io plugin is 
> installed to access the shared folder path.
> I have tested on both emulator and device (10.2) with the following code:
> {code}
> window.requestFileSystem(
>   LocalFileSystem.PERSISTENT,
>   1024 * 1024,
>   function (fs) {
>   fs.root.getDirectory(
> blackberry.io.sharedFolder,
> {},
> function(result) {
>   var reader = result.createReader();
>   reader.readEntries(
> function(entries) {
>   console.log(entries);
> },
> function (error) {
>   console.log('Failed to list directory contents: ', error);
> }
>   );
> },
> function(error) {
>   console.log('Error accessing shared folder');
> }
>   );
>   },
>   function () {
> console.log('Error accessing local file system');
>   }
> );
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-8659) iOS Plugins: Cordova-iOS 4.0.0 compatibility

2015-11-05 Thread Jason Ginchereau (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-8659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14992348#comment-14992348
 ] 

Jason Ginchereau commented on CB-8659:
--

I'm labeling according to the triage process agreed on here: 
https://github.com/apache/cordova-coho/pull/97/files

There is a separate field for "Affected Version", it does not need to be 
included in the labels.

> iOS Plugins: Cordova-iOS 4.0.0 compatibility
> 
>
> Key: CB-8659
> URL: https://issues.apache.org/jira/browse/CB-8659
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: iOS, Plugin Battery Status, Plugin Camera, Plugin 
> Contacts, Plugin Device Orientation, Plugin Dialogs, Plugin File, Plugin 
> Geolocation, Plugin Globalization, Plugin InAppBrowser, Plugin Media, Plugin 
> Media Capture
>Affects Versions: 4.0.0
>Reporter: Ian Clelland
>Assignee: Ian Clelland
>  Labels: cordova-ios-4.0.x
>
> iOS Plugins need to stop using initWithWebView:
> They also depend on several deprecated categories:
>   - NSArray+Comparisons.h
>   - NSDictionary+Extensions.h
> These need to be fixed in a backwards-compatible way before 4.0.0 is released.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-7814) file.spec.110 failed creating file ../resolve.file.uri

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7814:
-
Component/s: (was: Windows 8)
 (was: mobile-spec)

> file.spec.110 failed creating file ../resolve.file.uri
> --
>
> Key: CB-7814
> URL: https://issues.apache.org/jira/browse/CB-7814
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.6.3
> Environment: Windows 8
>Reporter: Angela Fowler
>Assignee: Jesse MacFadyen
>Priority: Minor
>
> The path 
> C:\\Users\\\\AppData\\Local\\Packages\\13fb9920-4f3e-11e4-b323-6b230e869311_dsh9t8a1qg3mw\\LocalState\\..\\resolve.file.uri
> fails with FileError.NOT_FOUND_ERR in 
> getFilesystemFromPath(storageFolder.path) function of FileProxy.js
> Log :
> createFile - Error creating file: ../resolve.file.uri



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-4262) The FileReader readyState is not working as expected (initial value)

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-4262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-4262:
-
Labels:   (was: Android)

> The FileReader readyState is not working as expected (initial value)
> 
>
> Key: CB-4262
> URL: https://issues.apache.org/jira/browse/CB-4262
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 2.9.0
> Environment: Gingerbread emulator
>Reporter: Peter
>Priority: Minor
>
> Expected default state for the FileReader should be *FileReader.EMPTY*, but 
> it seem that this is not the case.
> e.g. Following Jasmine test fragment fails:
> {code}
> it("initial readystate is EMPTY for fr", function() {
>   var theReader = new FileReader();
>   expect(theReader.readyState).toBe(FileReader.EMPTY);
> });
> {code}
> It doesn't seem to be conforming to the standard: 
> http://www.w3.org/TR/FileAPI/#dfn-empty



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6967) File Transfer does not work on BlackBerry with File Plugin version 1.2.0

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6967:
-
Labels: BlackBerry10  (was: )

> File Transfer does not work on BlackBerry with File Plugin version 1.2.0
> 
>
> Key: CB-6967
> URL: https://issues.apache.org/jira/browse/CB-6967
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File, Plugin File Transfer
>Affects Versions: 1.2.0
> Environment: Blackberry (Tested on both a Z10 and Q10)
>Reporter: Matt Grande
>  Labels: BlackBerry10
>
> Blackberry {{FileTransfer.download}} does not seem to work with {{File}} at 
> version 1.2.0 (Jan 5, 2014).
> *Steps to reproduce*
> # Clone this repository: https://github.com/mattgrande/bb10-download-test.
> # Run {{cordova run blackberry10 --devicepass [your device's password] 
> --keystorepass [the keystorepass]}}.
> # It should download a video, and set the video in the background of your app.
> # Update the {{File}} plugin from 1.1.0 to 1.2.0 by running {{cordova plugin 
> add org.apache.cordova.file}} (Note, you can also upgrade the 
> {{FileTransfer}} plugin, it doesn't seem to make a difference).
> # Execute the {{cordova run}} again.
> # This time, it will fail with error code {{1}}, {{NOT_FOUND_ERR}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6519) Recursive directory creation fails when spaces in directory names

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6519:
-
Labels: iOS  (was: )

> Recursive directory creation fails when spaces in directory names
> -
>
> Key: CB-6519
> URL: https://issues.apache.org/jira/browse/CB-6519
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.4.0
> Environment: iOS (have not tested on other platforms)
>Reporter: David Hogg
>Priority: Minor
>  Labels: iOS
>
> Previous to the File Plugin release (Feb 2014), it was possible to 
> recursively create directories by calliing dirEntry.getDirectory using the 
> dirEntry returned from the getDirectory call. 
> Since the Feb release (including the latest File Plugin (v 1.1.0) this will 
> fail if directory names  have spaces in the name (but only if recursive. Eg. 
> Can create 'Some Directory' fine in root, but not 'Some Directory/Another 
> Directory').
> Problem can be reproduced by using the filer.js library  
> [https://github.com/ebidel/filer.js] and calling mkdir.  Here is another 
> library [https://github.com/torrmal/cordova-simplefilemanagement] that does 
> not suffer from this problem as it always returns to the root dirEntry during 
> folder creation.
> As an aside, it would be awesome to have a more convenient file system API in 
> cordova that directly offers support for recursive folders, particularly 
> since it looks like the html5 file system API itself 
> ([http://www.w3.org/TR/file-system-api/],[http://www.html5rocks.com/en/tutorials/file/filesystem])
>  appears to be dead or dying?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9498) FileReader.prototype.readAsText runs malfunctionnally in mobilespec

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9498:
-
Component/s: (was: mobile-spec)
 (was: Android)

> FileReader.prototype.readAsText runs malfunctionnally in mobilespec
> ---
>
> Key: CB-9498
> URL: https://issues.apache.org/jira/browse/CB-9498
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 4.0.1
> Environment: Android 4.4, 5.0
>Reporter: Dong Hanlin
>Priority: Minor
>  Labels: Android
>
> When running tests of cordova-plugin-file with Mobilespec, file.spec.83 
> failed. Error messages are listed below:
> Error: Expected null to be 'asdfasdf'.
> at 
> stack(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:1292:17)
> at 
> buildExpectationResult(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:1269:14)
> at 
> Spec.Env.expectationResultFactory(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:483:18)
> at 
> Spec.addExpectationResult(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:259:46)
> at 
> Expectation.addExpectationResult(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js/441:21)
> at 
> Expectation.toBe(file:///android_asset/www/cdvtests/jasmine-2.0.0/jasmine.js:1208:12)
> at 
> FileReader.verifier(file:///android_asset/www/plugins/cordova-plugin-file-tests/tests.js:2190:47)
> When looking into the source code FileReader.js, it is found that readAsText 
> is overrided. However, this function didn't return the expected result we 
> want. *And this problem happens only in tests. In daily usage, such problems 
> don't appear.*



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9258) Add ms-appx support to cordova-plugin-file Windows proxy

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9258:
-
Labels: Windows  (was: )

> Add ms-appx support to cordova-plugin-file Windows proxy
> 
>
> Key: CB-9258
> URL: https://issues.apache.org/jira/browse/CB-9258
> Project: Apache Cordova
>  Issue Type: New Feature
>  Components: Plugin File
> Environment: Windows
>Reporter: Sergey Shakhnazarov
>  Labels: Windows
>
> ms-appx can be used as a tag src but can't be resolved to an entry and thus 
> programmatically processed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8332) Memory leak in loading files from disk with file plugin

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8332:
-
Labels: iOS  (was: )

> Memory leak in loading files from disk with file plugin
> ---
>
> Key: CB-8332
> URL: https://issues.apache.org/jira/browse/CB-8332
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: iOS
>Reporter: Patrick Richards
>Assignee: Shazron Abdullah
>  Labels: iOS
>
> When loading files from disk, the file plugin appears to leak memory. Using 
> instruments it can be narrowed down to -[CDVFilesystemURLProtocol 
> startLoading], which is in CDVFile.m on line 150.
> (https://github.com/apache/cordova-plugin-file/blob/967ca4d848d6bea0bad5a0d334b8d9f1ea2c4680/src/ios/CDVFile.m#L150)
> To reproduce:
> • have the iOS app download a file using plugin-file-transfer
> • store that file to persistent storage
> • load that file from disk and the app will leak
> We have a very simple proof of concept that downloads a large photo, then 
> constantly refreshes an iFrame which triggers loading the photo from 
> persistent storage. The memory usage of the app climbs over time (with 
> various dips at memory warnings), then crashes due to memory pressure. We can 
> upload this sample project/provide a link if needed – there doesn’t appear to 
> be a way to attach files.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6938) iOS File plugin: copyTo for file returns error when destination file exists

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6938:
-
Labels: iOS  (was: )

> iOS File plugin: copyTo for file returns error when destination file exists
> ---
>
> Key: CB-6938
> URL: https://issues.apache.org/jira/browse/CB-6938
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: ios
>Reporter: vldm
>Assignee: Ian Clelland
>  Labels: iOS
>
> According to w3c spec:
> A copy of a file on top of an existing file must attempt to delete and 
> replace that file.
> iOS version of plugin in file CDVLocalFilesystem.m contains this code for the 
> case:
> {code}
> } else if (bNewExists) {
> // the full destination should NOT already exist if a copy
> errCode = PATH_EXISTS_ERR;
> {code}
> Suggested patch:
> {code}
> diff --git a/src/ios/CDVLocalFilesystem.m b/src/ios/CDVLocalFilesystem.m
> index d1576ad..f5aa508 100644
> --- a/src/ios/CDVLocalFilesystem.m
> +++ b/src/ios/CDVLocalFilesystem.m
> @@ -535,11 +535,11 @@
>  if (bSrcIsDir && ![self canCopyMoveSrc:srcFullPath 
> ToDestination:newFileSystemPath]) {
>  // can't copy dir into self
>  errCode = INVALID_MODIFICATION_ERR;
> -} else if (bNewExists) {
> -// the full destination should NOT already exist if a 
> copy
> -errCode = PATH_EXISTS_ERR;
>  } else {
> -bSuccess = [fileMgr copyItemAtPath:srcFullPath 
> toPath:newFileSystemPath error:];
> +   bSuccess = YES;
> +if (bNewExists)
> +bSuccess = [fileMgr 
> removeItemAtPath:newFileSystemPath error:];
> +if (bSuccess)
> +bSuccess = [fileMgr copyItemAtPath:srcFullPath 
> toPath:newFileSystemPath error:];
>  }
>  } else { // move
>  // iOS requires that destination must not exist before 
> calling moveTo
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-7075) BlackBerry10 filesystem URIs are inconsistent and hacky

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7075:
-
Labels: BlackBerry10  (was: )

> BlackBerry10 filesystem URIs are inconsistent and hacky
> ---
>
> Key: CB-7075
> URL: https://issues.apache.org/jira/browse/CB-7075
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File, Plugin File Transfer, Plugin Media, Plugin 
> Media Capture
>Affects Versions: 3.5.0
> Environment: Windows 8.1, BlackBerry10
>Reporter: Doug Moscrop
>  Labels: BlackBerry10
>
> (sorry for the Component/s spam but it's the pieces involved)
> 1. Record an audio clip using media-capture
> 2. Play the audio clip using the media
> 3. Upload the audio clip using file-transfer
> The URI returned from the audio part of media capture is "bare", i.e. this is 
> the fullPath:
> /accounts/1000/shared/voice/VN-20140704-020436.m4a 
> If I want to play that audio using "new Media" I have to prefix that URI with 
> "file://" otherwise it gives me a cryptic **encoding** error!
> However, if I try to use file-transfer using either the bare URI or the 
> hacked prefixed URI it fails! To make *that* work I have to instead 
> separately prefix the bare URI with cdvfile://localhost/root (not persisent!) 
> and then it works.
> --
> A note, to make matters more complicated, using navigator.camera.capture (not 
> media-capture) for a photo, returns a URI that looks like:
> file:///accounts/1000/shared/camera/IMG_20140704_020404.jpg
> In other words, it's the same as the bare URI + prefix that I mentioned above 
> except... file-transfer works fine with that URL! I don't even.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8967) filereader not work on mediafile from audiocapture

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8967:
-
Labels:   (was: fitting)

> filereader not work on mediafile from audiocapture
> --
>
> Key: CB-8967
> URL: https://issues.apache.org/jira/browse/CB-8967
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Media Capture
>Affects Versions: 3.5.0
> Environment: ios and android
>Reporter: Jarvis
>   Original Estimate: 0.05h
>  Remaining Estimate: 0.05h
>
> I tried to get a data url from mediafile which is from audiocapture, using 
> filereader.readAsDataURL(). But what I got was data:audio/wav;base64. I 
> fiexed it by adding 'start' and 'end' positions into mediafile. It works. So 
> I hope that you guys can make readAsDataURL works well even the file obj has 
> no start and end properties.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9110) Android 5 Using Internal Storage - Cordova File Plugin

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9110:
-
Labels: Android  (was: file resolveLocalFileSystemURL)

> Android 5 Using Internal Storage - Cordova File Plugin
> --
>
> Key: CB-9110
> URL: https://issues.apache.org/jira/browse/CB-9110
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera, Plugin File
>Affects Versions: 3.5.0
> Environment: Android
>Reporter: Dan Cornish
>  Labels: Android
> Attachments: TestCordovaApp.zip
>
>
> I'm using a Samsung Galaxy S6 (Android 5) for testing.  fileEntry.file 
> failing only when using "Internal Storage" to select an image.  If I use the 
> "Gallery" or "Images", it works correctly.  
> Please see below for code snippet.
> Thanks
> navigator.camera.getPicture(
> function (imageURI) {
> window.resolveLocalFileSystemURL(
> imageURI,
> function (fileEntry) {
> //THIS LINE IS WHERE IT'S FAILING BUT ONLY WHEN USING THE 
> "INTERNAL STORAGE" OPTION FOR SELECTING A FILE
> fileEntry.file(function (myFile) {
> console.log("SUCCESS");
> },
> function (error) {
> console.log("FAIL");
> });
> },
> function () { });
> },
> function () { },
> {
> quality: 50,
> destinationType: navigator.camera.DestinationType.FILE_URI,
> sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY
> });



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-7024) Cordova resolveLocalFileSystemURL works but then fileEntry.file() fails

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7024:
-
Labels: Android  (was: file mimeType)

> Cordova resolveLocalFileSystemURL works but then fileEntry.file() fails
> ---
>
> Key: CB-7024
> URL: https://issues.apache.org/jira/browse/CB-7024
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0
> Environment: Android
>Reporter: DotNetWise
>  Labels: Android
>   Original Estimate: 8m
>  Remaining Estimate: 8m
>
> First, you do a {{navigator.camera.getPicture(uploadPicture_step1, 
> uploadError, chooseOptions);}}
> with success and then you do {{window.resolveLocalFileSystemURL(fileURI, 
> function (fileEntry) {})}}
> again with success.
> Now if you call that {{fileEntry.file(function(info) {}, function(err) { 
> });}} you always get an exception and the error callback is called with 
> {{err.code = 1000}};
> The error in {{logcat}} is missing {{android.permission.MANAGE_DOCUMENTS}}
> That is stuppid! It's a bug.
> I cannot get the mime-Type for the given fileEntry, so how am I supposed to 
> upload it via FileTransfer plugin (as it asks explicitely for it - to send it 
> as ContentType to the server - that's another stuppid thing, it should detect 
> it if I pass null in the firs place anways).
> This issue is for the files that are comming from custom providers such as 
> "downloads". e.g. 
> {{content://document/primary%3ADownload/11june.pdf}}
> In config.xml I do have 
> {code}
>  value="files,files-external,documents,sdcard,cache,cache-external,root" />
> 
> 
> 
>   
>   
>  value="org.apache.cordova.filetransfer.FileTransfer" />
>   
> 
>  value="org.apache.cordova.camera.CameraLauncher" />
>   
> {code}
> In {{AndroidManifest.xml}} I do have 
> {code}
> 
> {code}  
> Here are some logs
> {code}
> E/DatabaseUtils(24425): java.lang.SecurityException: Permission Denial: 
> reading com.android.externalstorage.ExternalStorageProvider uri conten
> nts/document/primary%3ADownload/11june.pdf from pid=22853, uid=10197 requires 
> android.permission.MANAGE_DOCUMENTS, or grantUriPermission()
> E/DatabaseUtils(24425): at 
> android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:467)
> E/DatabaseUtils(24425): at 
> android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:394)
> E/DatabaseUtils(24425): at 
> android.content.ContentProvider$Transport.query(ContentProvider.java:194)
> E/DatabaseUtils(24425): at 
> android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
> E/DatabaseUtils(24425): at 
> android.os.Binder.execTransact(Binder.java:404)
> E/DatabaseUtils(24425): at dalvik.system.NativeStart.run(Native 
> Method)
> W/System.err(22853): java.lang.SecurityException: Permission Denial: reading 
> com.android.externalstorage.ExternalStorageProvider uri content:/
> /document/primary%3ADownload/11june.pdf from pid=22853, uid=10197 requires 
> android.permission.MANAGE_DOCUMENTS, or grantUriPermission()
> W/System.err(22853):at android.os.Parcel.readException(Parcel.java:1465)
> W/System.err(22853):at 
> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
> W/System.err(22853):at 
> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:137)
> W/System.err(22853):at 
> android.content.ContentProviderProxy.query(ContentProviderNative.java:413)
> W/System.err(22853):at 
> android.content.ContentResolver.query(ContentResolver.java:461)
> W/System.err(22853):at 
> android.content.ContentResolver.query(ContentResolver.java:404)
> W/System.err(22853):at 
> org.apache.cordova.file.ContentFilesystem.openCursorForURL(ContentFilesystem.java:258)
> W/System.err(22853):at 
> org.apache.cordova.file.ContentFilesystem.getFileMetadataForLocalURL(ContentFilesystem.java:169)
> W/System.err(22853):at 
> org.apache.cordova.file.FileUtils.getFileMetadata(FileUtils.java:811)
> W/System.err(22853):at 
> org.apache.cordova.file.FileUtils.access$400(FileUtils.java:52)
> W/System.err(22853):at 
> org.apache.cordova.file.FileUtils$14.run(FileUtils.java:383)
> W/System.err(22853):at 
> org.apache.cordova.file.FileUtils$24.run(FileUtils.java:540)
> W/System.err(22853):at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
> W/System.err(22853):at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
> W/System.err(22853):at java.lang.Thread.run(Thread.java:841)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CB-7024) Cordova resolveLocalFileSystemURL works but then fileEntry.file() fails

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7024:
-
Component/s: Plugin Camera

> Cordova resolveLocalFileSystemURL works but then fileEntry.file() fails
> ---
>
> Key: CB-7024
> URL: https://issues.apache.org/jira/browse/CB-7024
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera, Plugin File
>Affects Versions: 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0
> Environment: Android
>Reporter: DotNetWise
>  Labels: Android
>   Original Estimate: 8m
>  Remaining Estimate: 8m
>
> First, you do a {{navigator.camera.getPicture(uploadPicture_step1, 
> uploadError, chooseOptions);}}
> with success and then you do {{window.resolveLocalFileSystemURL(fileURI, 
> function (fileEntry) {})}}
> again with success.
> Now if you call that {{fileEntry.file(function(info) {}, function(err) { 
> });}} you always get an exception and the error callback is called with 
> {{err.code = 1000}};
> The error in {{logcat}} is missing {{android.permission.MANAGE_DOCUMENTS}}
> That is stuppid! It's a bug.
> I cannot get the mime-Type for the given fileEntry, so how am I supposed to 
> upload it via FileTransfer plugin (as it asks explicitely for it - to send it 
> as ContentType to the server - that's another stuppid thing, it should detect 
> it if I pass null in the firs place anways).
> This issue is for the files that are comming from custom providers such as 
> "downloads". e.g. 
> {{content://document/primary%3ADownload/11june.pdf}}
> In config.xml I do have 
> {code}
>  value="files,files-external,documents,sdcard,cache,cache-external,root" />
> 
> 
> 
>   
>   
>  value="org.apache.cordova.filetransfer.FileTransfer" />
>   
> 
>  value="org.apache.cordova.camera.CameraLauncher" />
>   
> {code}
> In {{AndroidManifest.xml}} I do have 
> {code}
> 
> {code}  
> Here are some logs
> {code}
> E/DatabaseUtils(24425): java.lang.SecurityException: Permission Denial: 
> reading com.android.externalstorage.ExternalStorageProvider uri conten
> nts/document/primary%3ADownload/11june.pdf from pid=22853, uid=10197 requires 
> android.permission.MANAGE_DOCUMENTS, or grantUriPermission()
> E/DatabaseUtils(24425): at 
> android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:467)
> E/DatabaseUtils(24425): at 
> android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:394)
> E/DatabaseUtils(24425): at 
> android.content.ContentProvider$Transport.query(ContentProvider.java:194)
> E/DatabaseUtils(24425): at 
> android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
> E/DatabaseUtils(24425): at 
> android.os.Binder.execTransact(Binder.java:404)
> E/DatabaseUtils(24425): at dalvik.system.NativeStart.run(Native 
> Method)
> W/System.err(22853): java.lang.SecurityException: Permission Denial: reading 
> com.android.externalstorage.ExternalStorageProvider uri content:/
> /document/primary%3ADownload/11june.pdf from pid=22853, uid=10197 requires 
> android.permission.MANAGE_DOCUMENTS, or grantUriPermission()
> W/System.err(22853):at android.os.Parcel.readException(Parcel.java:1465)
> W/System.err(22853):at 
> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
> W/System.err(22853):at 
> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:137)
> W/System.err(22853):at 
> android.content.ContentProviderProxy.query(ContentProviderNative.java:413)
> W/System.err(22853):at 
> android.content.ContentResolver.query(ContentResolver.java:461)
> W/System.err(22853):at 
> android.content.ContentResolver.query(ContentResolver.java:404)
> W/System.err(22853):at 
> org.apache.cordova.file.ContentFilesystem.openCursorForURL(ContentFilesystem.java:258)
> W/System.err(22853):at 
> org.apache.cordova.file.ContentFilesystem.getFileMetadataForLocalURL(ContentFilesystem.java:169)
> W/System.err(22853):at 
> org.apache.cordova.file.FileUtils.getFileMetadata(FileUtils.java:811)
> W/System.err(22853):at 
> org.apache.cordova.file.FileUtils.access$400(FileUtils.java:52)
> W/System.err(22853):at 
> org.apache.cordova.file.FileUtils$14.run(FileUtils.java:383)
> W/System.err(22853):at 
> org.apache.cordova.file.FileUtils$24.run(FileUtils.java:540)
> W/System.err(22853):at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
> W/System.err(22853):at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
> W/System.err(22853):at java.lang.Thread.run(Thread.java:841)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CB-9110) Android 5 Using Internal Storage - Cordova File Plugin

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9110:
-
Component/s: Plugin Camera

> Android 5 Using Internal Storage - Cordova File Plugin
> --
>
> Key: CB-9110
> URL: https://issues.apache.org/jira/browse/CB-9110
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera, Plugin File
>Affects Versions: 3.5.0
> Environment: Android
>Reporter: Dan Cornish
>  Labels: Android
> Attachments: TestCordovaApp.zip
>
>
> I'm using a Samsung Galaxy S6 (Android 5) for testing.  fileEntry.file 
> failing only when using "Internal Storage" to select an image.  If I use the 
> "Gallery" or "Images", it works correctly.  
> Please see below for code snippet.
> Thanks
> navigator.camera.getPicture(
> function (imageURI) {
> window.resolveLocalFileSystemURL(
> imageURI,
> function (fileEntry) {
> //THIS LINE IS WHERE IT'S FAILING BUT ONLY WHEN USING THE 
> "INTERNAL STORAGE" OPTION FOR SELECTING A FILE
> fileEntry.file(function (myFile) {
> console.log("SUCCESS");
> },
> function (error) {
> console.log("FAIL");
> });
> },
> function () { });
> },
> function () { },
> {
> quality: 50,
> destinationType: navigator.camera.DestinationType.FILE_URI,
> sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY
> });



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-7814) file.spec.110 failed creating file ../resolve.file.uri

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7814:
-
Labels: Windows  (was: )

> file.spec.110 failed creating file ../resolve.file.uri
> --
>
> Key: CB-7814
> URL: https://issues.apache.org/jira/browse/CB-7814
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.6.3
> Environment: Windows 8
>Reporter: Angela Fowler
>Assignee: Jesse MacFadyen
>Priority: Minor
>  Labels: Windows
>
> The path 
> C:\\Users\\\\AppData\\Local\\Packages\\13fb9920-4f3e-11e4-b323-6b230e869311_dsh9t8a1qg3mw\\LocalState\\..\\resolve.file.uri
> fails with FileError.NOT_FOUND_ERR in 
> getFilesystemFromPath(storageFolder.path) function of FileProxy.js
> Log :
> createFile - Error creating file: ../resolve.file.uri



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-7797) file.spec.52 Entry.toURL

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7797:
-
Component/s: (was: Windows 8)
 (was: mobile-spec)

> file.spec.52 Entry.toURL
> 
>
> Key: CB-7797
> URL: https://issues.apache.org/jira/browse/CB-7797
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.6.3
> Environment: Windows RT
>Reporter: Angela Fowler
>Assignee: Jesse MacFadyen
>Priority: Minor
>  Labels: Windows
>
> This spec is failing because of the slash direction.
> expect(uri).toContain('/num%201/num%202/');
> Expected 'LocalState\num 1\num 2/' to contain '/num%201/num%202/'.
> File Plugin version is 1.3.1
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-7797) file.spec.52 Entry.toURL

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-7797:
-
Labels: Windows  (was: )

> file.spec.52 Entry.toURL
> 
>
> Key: CB-7797
> URL: https://issues.apache.org/jira/browse/CB-7797
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.6.3
> Environment: Windows RT
>Reporter: Angela Fowler
>Assignee: Jesse MacFadyen
>Priority: Minor
>  Labels: Windows
>
> This spec is failing because of the slash direction.
> expect(uri).toContain('/num%201/num%202/');
> Expected 'LocalState\num 1\num 2/' to contain '/num%201/num%202/'.
> File Plugin version is 1.3.1
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6987) [cordova-plugin-file] error writing file when data is an URI reference in WP8

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6987:
-
Labels: WP8  (was: WP8 plugin-file)

> [cordova-plugin-file] error writing file when data is an URI reference in WP8
> -
>
> Key: CB-6987
> URL: https://issues.apache.org/jira/browse/CB-6987
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Martin Gonzalez
>Assignee: Martin Gonzalez
>  Labels: WP8
> Fix For: 3.6.0
>
>
> When using File API  to write a file and as data to write that file reference 
> it's a reference instead of the data, or the data is instance of a File or 
> Blob, the right workflow is read the source file, get the data, to later 
> write it to the new file.
> Over WP8, is not possible use that workflow using readAsDataURL.
> Found through mobilespec File tests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6987) [cordova-plugin-file] error writing file when data is an URI reference in WP8

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6987:
-
Component/s: (was: WP8)

> [cordova-plugin-file] error writing file when data is an URI reference in WP8
> -
>
> Key: CB-6987
> URL: https://issues.apache.org/jira/browse/CB-6987
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Martin Gonzalez
>Assignee: Martin Gonzalez
>  Labels: WP8
> Fix For: 3.6.0
>
>
> When using File API  to write a file and as data to write that file reference 
> it's a reference instead of the data, or the data is instance of a File or 
> Blob, the right workflow is read the source file, get the data, to later 
> write it to the new file.
> Over WP8, is not possible use that workflow using readAsDataURL.
> Found through mobilespec File tests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6989) [WP8][cordova-plugin-file] add readAsArrayBuffer support native

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6989:
-
Labels: WP8  (was: WP8 plugin-file)

> [WP8][cordova-plugin-file] add readAsArrayBuffer support native
> ---
>
> Key: CB-6989
> URL: https://issues.apache.org/jira/browse/CB-6989
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Martin Gonzalez
>Assignee: Martin Gonzalez
>  Labels: WP8
> Fix For: 3.6.0
>
>
> It would be nice to have this functionality on the native side of WP8.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6989) [WP8][cordova-plugin-file] add readAsArrayBuffer support native

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6989:
-
Component/s: (was: WP8)

> [WP8][cordova-plugin-file] add readAsArrayBuffer support native
> ---
>
> Key: CB-6989
> URL: https://issues.apache.org/jira/browse/CB-6989
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
>Reporter: Martin Gonzalez
>Assignee: Martin Gonzalez
>  Labels: WP8
> Fix For: 3.6.0
>
>
> It would be nice to have this functionality on the native side of WP8.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9403) File does not have fullPath property

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9403:
-
Component/s: (was: Windows)

> File does not have fullPath property
> 
>
> Key: CB-9403
> URL: https://issues.apache.org/jira/browse/CB-9403
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Reporter: Erik Jan de Wit
>Assignee: Murat Sutunc
>  Labels: Windows
>
> File should have a property called fullPath like FileEntry does but on 
> windows this is not the case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-9282) Plugin File for Android seems to require trailing slash to identify a directory

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-9282:
-
Labels: Android  (was: )

> Plugin File for Android seems to require trailing slash to identify a 
> directory
> ---
>
> Key: CB-9282
> URL: https://issues.apache.org/jira/browse/CB-9282
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 2.1.0
>Reporter: Adriano Di Giovanni
>Priority: Minor
>  Labels: Android
>
> Looking at LocalFileSystemURL.java, lines 39~55
> ```java
> public static LocalFilesystemURL parse(Uri uri) {
> if (!FILESYSTEM_PROTOCOL.equals(uri.getScheme())) {
> return null;
> }
> String path = uri.getPath();
> if (path.length() < 1) {
> return null;
> }
> int firstSlashIdx = path.indexOf('/', 1);
> if (firstSlashIdx < 0) {
> return null;
> }
> String fsName = path.substring(1, firstSlashIdx);
> path = path.substring(firstSlashIdx);
> boolean isDirectory = path.charAt(path.length() - 1) == '/';
> return new LocalFilesystemURL(uri, fsName, path, isDirectory);
> }
> ```
> I found that operations on urls like cdvfile://localhost/persistent (without 
> trailing slash) don't work because firstSlashIds < 0.
> Looking at line 53, Plugin file relies on trailing slash to know in advance 
> if uri is a directory.
> I can't find any mention of that in the docs.
> I find that relying on trailing slashes to identify a directory imposes a 
> burden for client code that must normalize all paths before calling any 
> Plugin File function.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8708) copyTo error

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8708:
-
Labels: iOS  (was: )

> copyTo error 
> -
>
> Key: CB-8708
> URL: https://issues.apache.org/jira/browse/CB-8708
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: org.apache.cordova.file 1.3.4-dev "File" iOS
>Reporter: Rafael B
>  Labels: iOS
>
> I found a new error, but now, IOS version.
> {code}
> var app = {}; 
> window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, gotFileSystem, 
> function() { console.log("3 "+JSON.stringify(rs));});
> function gotFileSystem(v) { 
> app.fileSystem = v; 
> var url = cordova.file.applicationDirectory+"www/1.jpg"; 
> window.resolveLocalFileSystemURL(url, function(entry) {
> var fullPath = cordova.file.applicationStorageDirectory;   
> window.resolveLocalFileSystemURL(fullPath, function(entryDirectory) {
> entry.copyTo(entryDirectory, 'newfile.jpg', function(rs) { 
> console.log(JSON.stringify(rs)); //success   
> }, function() { console.log("1 "+JSON.stringify(rs));} ); //error 
> code 12 in next test's.
> }, function() { console.log("2 "+JSON.stringify(rs));} ); 
>   
> }, function() { console.log("3 "+JSON.stringify(rs));} );  
> }
> {code}
> If execute first time, return success, but execute others time, return error 
> (error code 12)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8442) [iOS] After several (hundreds) file write operations, the plugin stops working and no error is dispatched.

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8442:
-
Labels: iOS  (was: )

> [iOS] After several (hundreds) file write operations, the plugin stops 
> working and no error is dispatched.
> --
>
> Key: CB-8442
> URL: https://issues.apache.org/jira/browse/CB-8442
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 4.0.0
> Environment: iOS 8.1.x
> iOS PLATFORM VERSION: 3.7.0
> Simulator, iPad Mini Retina, iPhone 4, iPhone 5s
>Reporter: Andrea
>Priority: Critical
>  Labels: iOS
>
> File Plugin [version 1.3.2]
> After several (hundreds) file write operations (with arrayBuffer), the plugin 
> becomes unresponsive and no error is dispatched.
> Given a list of files, it seems it happens always at the same point ( in my 
> case after 484 write operations, or 492, or 469, etc.). I'm quite sure it's 
> not related to the type of file. No errors are returned. The plugin simply 
> stops working. I guess all the plugins become unresponsive.
> With the same number operations, but executed through FileTransfer-> 
> download, there are no problems.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-8967) filereader not work on mediafile from audiocapture

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-8967:
-
Component/s: (was: Plugin File)
 Plugin Media Capture

> filereader not work on mediafile from audiocapture
> --
>
> Key: CB-8967
> URL: https://issues.apache.org/jira/browse/CB-8967
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Media Capture
>Affects Versions: 3.5.0
> Environment: ios and android
>Reporter: Jarvis
>   Original Estimate: 0.05h
>  Remaining Estimate: 0.05h
>
> I tried to get a data url from mediafile which is from audiocapture, using 
> filereader.readAsDataURL(). But what I got was data:audio/wav;base64. I 
> fiexed it by adding 'start' and 'end' positions into mediafile. It works. So 
> I hope that you guys can make readAsDataURL works well even the file obj has 
> no start and end properties.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Assigned] (CB-6439) Re-expose the device absolute path

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau reassigned CB-6439:


Assignee: Jason Ginchereau

> Re-expose the device absolute path
> --
>
> Key: CB-6439
> URL: https://issues.apache.org/jira/browse/CB-6439
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: Plugin File
>Reporter: Johann Ish
>Assignee: Jason Ginchereau
>Priority: Minor
>
> To prevent coupling, this plugin should again expose a way to get the 
> absolute path to a file on the device.  While it breaks from the W3C File API 
> standard, it allows for a cleaner design as third-party plugins don't have to 
> be coupled with the File plugin.
> I ran into this issue after updating the File plugin and in conjunction with 
> the EmailComposer plugin (http://plugins.cordova.io/#/package/emailcomposer). 
>  That plugin expects attachment paths to be absolute (fully-qualified) on the 
> device.  Because the File plugin no longer provides any way to get the 
> absolute path, the two options I've found for a plugin such as EmailComposer 
> are:
> # Allow paths relative to the `NSBundle bundlePath` and let the user of the 
> plugin guess at where the File plugin put them (e.g., "../Library"), or
> # Check to see if the File plugin is loaded and ask it to read the file.
> Both of these are workable solutions, but (1) is just brittle, and (2) 
> requires some coupling at the Objective-C level and intimate knowledge of the 
> File plugin.
> See also my comment on the "emailcomposer" plugin at 
> https://github.com/steve-jansen/cordova-ios-emailcomposer/issues/6#issuecomment-40287410



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Updated] (CB-6901) [WP8][cordova-plugin-file] filesystem: null after use IsolatedStorageFile.MoveDirectory

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-6901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau updated CB-6901:
-
Labels: WP8  (was: WP8 Windows)

> [WP8][cordova-plugin-file] filesystem: null after use 
> IsolatedStorageFile.MoveDirectory
> ---
>
> Key: CB-6901
> URL: https://issues.apache.org/jira/browse/CB-6901
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: Windows 8.1
>Reporter: Martin Gonzalez
>Assignee: Jesse MacFadyen
>  Labels: WP8
> Fix For: 3.6.0
>
>
> Using the File plugin, faced a problem trying to move a directory using the 
> plugin, specifically the moveTo (aka TransferTo on native) , I've found out 
> that the problem is not that the directory is not moved, the problem is that 
> after this line is executed:
> https://github.com/apache/cordova-plugin-file/blob/master/src/wp/File.cs#L1412
> isoFile.MoveDirectory(currentPath, newPath);
> The DispatchCommandResult sends the entry file with the CallbackID, but the 
> problem is that the information about the filesystem is missing.
> This situation it doesn't happen when isoFile.MoveFile(newPath), 
> IsolatedStorageFile.CreateDirectory(path) or 
> IsolatedStorageFile.CreateFile(path) are used the filesystem information it 
> remains with those but not with MoveDirectory.
> During the 67 test and several others, it uses the filesystem information of 
> the recent moved directory to determine if the file exists, and when it gets 
> to GeFileOrDirectory on the options this is the array obtained:
> "[null,"file1","{\"create\":false}","File619232322"]"
> When Create or MoveFile:
> "["\/\/entry,move.dsp.srcDir","file1","{\"create\":false}","File619232322"]"
> From the JS side object:
> MoveDirectory:
> {"isFile":false, "isDirectory":true, "name" : "entry.move.dsp.dstDir", 
> "filesystem":null, "nativeURL":null}
> MoveFile:
> {"isFile":true, "isDirectory":false, "name" : "entry.move.dsp.dstDir", 
> "filesystem":"", "nativeURL":null}
> That's the reason why some automated tests on the MoveTo section are failing.
> Tested on Windows Phone 8 and 8.1, emulator and device. Same behavior.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-9965) Null pointer exception calling resolveLocalFileSystemURI on image from photos

2015-11-05 Thread Jason Ginchereau (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-9965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14992680#comment-14992680
 ] 

Jason Ginchereau commented on CB-9965:
--

I have reproduced this also on Lollipop. In my case there wasn't a problem with 
images captured from the camera, but it the exception occurred for an image 
that was in the Downloads folder.

> Null pointer exception calling resolveLocalFileSystemURI on image from photos
> -
>
> Key: CB-9965
> URL: https://issues.apache.org/jira/browse/CB-9965
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 2.1.0, 3.0.0
> Environment: Android 5+
>Reporter: Connor Pearson
>Assignee: Joe Bowser
>  Labels: Android
>
> Calling resolveLocalFileSystemURI on an image returned from Photos library 
> (using camera plugin) on android lollipop triggers a 1000 error code.
> Debugging the application shows that this is caused by a null pointer 
> exception.
> Example code:
> {code:javascript}
> document.getElementById("myButton").addEventListener("click", function(){
>   navigator.camera.getPicture(function(uri){
>   console.log(uri); 
> //content://com.android.providers.media.documents/document/image%3A27
>   window.resolveLocalFileSystemURI(uri, function(fileEntry){
>   alert("success");
>   },function(error){
>   alert("Fail resolveFileSystemURI code: " + error.code);
>   });
>   }, null, {sourceType: 0, allowEdit: false});
>   });
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Assigned] (CB-7522) Wrong file path leads to error code 1000 due to NullPointerException on Android

2015-11-05 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau reassigned CB-7522:


Assignee: Jason Ginchereau

> Wrong file path leads to error code 1000 due to NullPointerException on 
> Android
> ---
>
> Key: CB-7522
> URL: https://issues.apache.org/jira/browse/CB-7522
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: Android
>Reporter: Leon
>Assignee: Jason Ginchereau
>Priority: Minor
>  Labels: Android
>
> Hi,
> I am using Cordova version 3.5.0-0.2.6 and version 1.3.0 of the File plugin 
> on Ubuntu. 
> Yesterday I got error code 1000 (corresponds to UNKNOWN_ERR as defined in 
> android/FileUtils.java) when I tried the following JavaScript code on Samsung 
> S2 (GT-I9100) with Android 4.1.2:
> {code:title=my.js|borderStyle=solid}
> var sFileLocation = '/Android/data//assets/';   
> sFileLocation += filesToRemove[nFile];
> fileSystem.root.getFile(
>   sFileLocation,
>   null,
>   function(entry) {
>   entry.remove( function() {
>   console.log("file removed");
>   }, onError);
>   }, onGetFileError);
> {code}
> My investigation showed that the error code 1000 was caused by Java 
> NullPointerException from implentation of the method 
> fullPathForFilesystemPath in class *LocalFilesystem* because of the following 
> code:
> {code:title=LocalFilesystem.java|borderStyle=solid}
> private String fullPathForFilesystemPath(String absolutePath) {
>   if (absolutePath != null && 
> absolutePath.startsWith(this.fsRoot)) {
>   return absolutePath.substring(this.fsRoot.length());
>   }
>   return null;
>   }
> {code}
> The specified path at JavaScript snippet starts with / but its prefix does 
> not match the root of dir so in Android the Java method  
> fullPathForFilesystemPath returns *null* and leads to error *1000* at the 
> JavaScript. 
> The +JavaScript snippet works fine+ if the path is specified using any of the 
> following formats: *"Android/data//assets/"* or 
> *"/storage/sdcard0/Android/data//assets/"*.
> It is not exactly a bug but it is very inconvenient and not developer 
> friendly. I did not find anything about this behaviour at the docuemntation 
> of the plugin. It will be much better if error code such 
> FileError.ENCODING_ERR (5) or even FileError.NOT_FOUND_ERR (1) is returned. 
> May we modify the Java code and to update the documentation to make it more 
> friendly for developers?
> Best regards,
> Leon



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-9020) cordova.file undefined on WP8

2015-11-04 Thread Jason Ginchereau (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-9020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14990886#comment-14990886
 ] 

Jason Ginchereau commented on CB-9020:
--

This is maybe not a duplicate of CB-8257, if that one is referring to WP 8.0 
and this one is WP 8.1.

> cordova.file undefined on WP8
> -
>
> Key: CB-9020
> URL: https://issues.apache.org/jira/browse/CB-9020
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 2.0.0
> Environment: Windows Phone 8 emulator
>Reporter: Rex Park
>Priority: Critical
>
> I have some code that tries to list all of the files in www/json. It works 
> correctly on iOS and Android but fails on Windows Phone 8.1.
> The code is pretty straight forward:
> window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+'/www/json',
>  
> function(dirEntry){
> var directoryReader = dirEntry.createReader();
> directoryReader.readEntries(
> function(entries){
> ups_json_file_count = entries.length;
> var i;
> for (i=0; i < ups_json_file_count; i++) {
> $.getJSON("json/"+entries[i].name, parse_json_files);
> }
> },
> function(){
> console.log("Coudl Not Locate JSON Files. 2");
> }
> );
> }, 
> function(error){
> console.log("Could Not Locate JSON Directory. 1");
> }
> );
> After doing some digging I found that cordova.file is coming up as undefined. 
> The above code is being called inside of the onDeviceReady function.
> cordova-plugin-file 2.0.0 "File"
> cordova-plugin-file-transfer 1.0.0 "File Transfer"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Resolved] (CB-7253) window.requestFileSystem fails when no sd card is present and non-zero value is provided for size

2015-11-04 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau resolved CB-7253.
--
Resolution: Fixed

> window.requestFileSystem fails when no sd card is present and non-zero value 
> is provided for size
> -
>
> Key: CB-7253
> URL: https://issues.apache.org/jira/browse/CB-7253
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: I discovered this issue on a Nexus7 emulator running 
> android 4.4.2 with no sd card.
>Reporter: Vincent Scuorzo
>Assignee: Jason Ginchereau
>Priority: Minor
>  Labels: easyfix
>
> The problem is that when no external storage is present the size parameter is 
> compared to the available storage space on the internal file system which is 
> incorrectly reported as 0. After reading a post on stack overflow 
> (http://stackoverflow.com/questions/4799643/getting-all-the-total-and-available-space-on-android)
>  I noticed that they were checking available space in a different way so I 
> tried it and the issue went away.
> You can see this bug in action by setting up an emulator as I described and 
> running an app with the file plugin that can execute the following javascript:
> window.requestFileSystem(PERSISTENT, 1024, function(fs){ console.log(fs); }, 
> function(e){ console.log(e); });
> With the current release you will get an error related to reaching the 
> storage quota since the available space is reported incorrectly. Change line 
> 72 of src/android/DirectoryManager.java to read the following:
> freeSpace = 
> freeSpaceCalculation(Environment.getRootDirectory().getAbsolutePath());
> Run the same line of javascript as before and you will now have success, 
> assuming you actually have the available space.
> You can easily bypass this issue and access the filesystem by just passing 0 
> for the size but doing so will also circumvent the checks that ensure you 
> don't try to use more space than is available. In my case, my app was 
> handicapping itself because it thought it didn't have enough space to 
> download additional resources when it should not have had any issues.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Resolved] (CB-9752) getDirectory fails on valid directory with assets filesystem

2015-11-04 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau resolved CB-9752.
--
Resolution: Fixed

> getDirectory fails on valid directory with assets filesystem
> 
>
> Key: CB-9752
> URL: https://issues.apache.org/jira/browse/CB-9752
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Android, Plugin File
> Environment: cordova 5.3.3
> cordova android 4.0.0
> cordova-plugin-file 2.0.0
> *** using build-extras.gradle to speed up lookups (as per README.md for 
> plugin) ***
>Reporter: Denis Babineau
>Assignee: Jason Ginchereau
>
> The following JS snippet fails with "failed to get www directory":
> window.resolveLocalFileSystemURL(cordova.file.applicationDirectory, 
> function(appDir) {
> appDir.getDirectory('www', {create:false}, function(wwwDir) {
> console.log("success!");
> }, function() {
> console.log("failed to get www directory");
> });
> }, function() {
> console.log("Failed to get application directory");
> });
> I narrowed it down to AssetFilesystem.java's listAssets() method called from 
> isDirectory() which returns the "new String[0];" (assetPath = 'www/' in this 
> method) which in turn causes isDirectory() to return false.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Resolved] (CB-7273) Using cordova.file.applicationDirectory, Android, and reading the file

2015-11-04 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau resolved CB-7273.
--
Resolution: Cannot Reproduce

Does not repro for me anymore. I even added a new mobilespec test case to 
verify that a file can be read from under cordova.file.applicationDirectory.

> Using cordova.file.applicationDirectory, Android, and reading the file
> --
>
> Key: CB-7273
> URL: https://issues.apache.org/jira/browse/CB-7273
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: Android
>Reporter: Raymond Camden
>Assignee: Jason Ginchereau
>Priority: Minor
>
> I wrote a simple app that uses the file system API to read a file from the 
> www folder. The demo code may be found here:
> https://github.com/cfjedimaster/Cordova-Examples/blob/master/readtextfile/
> It uses this line essentially to handle the read:
> window.resolveLocalFileSystemURL(cordova.file.applicationDirectory + 
> "www/index.html", gotFile, fail);
> This works fine in iOS, but fails to work in Android.  While you can work 
> around this by just using a regular XHR get, the code really should work.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Closed] (CB-9752) getDirectory fails on valid directory with assets filesystem

2015-11-04 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau closed CB-9752.


> getDirectory fails on valid directory with assets filesystem
> 
>
> Key: CB-9752
> URL: https://issues.apache.org/jira/browse/CB-9752
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Android, Plugin File
> Environment: cordova 5.3.3
> cordova android 4.0.0
> cordova-plugin-file 2.0.0
> *** using build-extras.gradle to speed up lookups (as per README.md for 
> plugin) ***
>Reporter: Denis Babineau
>Assignee: Jason Ginchereau
>
> The following JS snippet fails with "failed to get www directory":
> window.resolveLocalFileSystemURL(cordova.file.applicationDirectory, 
> function(appDir) {
> appDir.getDirectory('www', {create:false}, function(wwwDir) {
> console.log("success!");
> }, function() {
> console.log("failed to get www directory");
> });
> }, function() {
> console.log("Failed to get application directory");
> });
> I narrowed it down to AssetFilesystem.java's listAssets() method called from 
> isDirectory() which returns the "new String[0];" (assetPath = 'www/' in this 
> method) which in turn causes isDirectory() to return false.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Closed] (CB-7273) Using cordova.file.applicationDirectory, Android, and reading the file

2015-11-04 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau closed CB-7273.


> Using cordova.file.applicationDirectory, Android, and reading the file
> --
>
> Key: CB-7273
> URL: https://issues.apache.org/jira/browse/CB-7273
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
> Environment: Android
>Reporter: Raymond Camden
>Assignee: Jason Ginchereau
>Priority: Minor
>
> I wrote a simple app that uses the file system API to read a file from the 
> www folder. The demo code may be found here:
> https://github.com/cfjedimaster/Cordova-Examples/blob/master/readtextfile/
> It uses this line essentially to handle the read:
> window.resolveLocalFileSystemURL(cordova.file.applicationDirectory + 
> "www/index.html", gotFile, fail);
> This works fine in iOS, but fails to work in Android.  While you can work 
> around this by just using a regular XHR get, the code really should work.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Resolved] (CB-8350) Android alias applicationDirectory is not readable

2015-11-04 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau resolved CB-8350.
--
Resolution: Cannot Reproduce

It seems to be working fine now. I added a mobilespec test case to verify that 
files can be read from under cordova.file.applicationDirectory.

> Android alias applicationDirectory is not readable
> --
>
> Key: CB-8350
> URL: https://issues.apache.org/jira/browse/CB-8350
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Reporter: Raymond Camden
>Assignee: Jason Ginchereau
>Priority: Minor
>
> The table for Android File System Layout shows 
> cordova.file.applicationDirectory as being readable. While technically it is 
> readable via XHR, the implication is that it is readable by the FileSystem 
> APIs, and it is not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Closed] (CB-7253) window.requestFileSystem fails when no sd card is present and non-zero value is provided for size

2015-11-04 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau closed CB-7253.


> window.requestFileSystem fails when no sd card is present and non-zero value 
> is provided for size
> -
>
> Key: CB-7253
> URL: https://issues.apache.org/jira/browse/CB-7253
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: I discovered this issue on a Nexus7 emulator running 
> android 4.4.2 with no sd card.
>Reporter: Vincent Scuorzo
>Assignee: Jason Ginchereau
>Priority: Minor
>  Labels: easyfix
>
> The problem is that when no external storage is present the size parameter is 
> compared to the available storage space on the internal file system which is 
> incorrectly reported as 0. After reading a post on stack overflow 
> (http://stackoverflow.com/questions/4799643/getting-all-the-total-and-available-space-on-android)
>  I noticed that they were checking available space in a different way so I 
> tried it and the issue went away.
> You can see this bug in action by setting up an emulator as I described and 
> running an app with the file plugin that can execute the following javascript:
> window.requestFileSystem(PERSISTENT, 1024, function(fs){ console.log(fs); }, 
> function(e){ console.log(e); });
> With the current release you will get an error related to reaching the 
> storage quota since the available space is reported incorrectly. Change line 
> 72 of src/android/DirectoryManager.java to read the following:
> freeSpace = 
> freeSpaceCalculation(Environment.getRootDirectory().getAbsolutePath());
> Run the same line of javascript as before and you will now have success, 
> assuming you actually have the available space.
> You can easily bypass this issue and access the filesystem by just passing 0 
> for the size but doing so will also circumvent the checks that ensure you 
> don't try to use more space than is available. In my case, my app was 
> handicapping itself because it thought it didn't have enough space to 
> download additional resources when it should not have had any issues.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Closed] (CB-8350) Android alias applicationDirectory is not readable

2015-11-04 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau closed CB-8350.


> Android alias applicationDirectory is not readable
> --
>
> Key: CB-8350
> URL: https://issues.apache.org/jira/browse/CB-8350
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Reporter: Raymond Camden
>Assignee: Jason Ginchereau
>Priority: Minor
>
> The table for Android File System Layout shows 
> cordova.file.applicationDirectory as being readable. While technically it is 
> readable via XHR, the implication is that it is readable by the FileSystem 
> APIs, and it is not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Resolved] (CB-9935) On Node.js version 5.0.0 Cordova CLI build, run and emulate commands don't work.

2015-11-03 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau resolved CB-9935.
--
   Resolution: Fixed
Fix Version/s: 5.4.0

> On Node.js version 5.0.0 Cordova CLI build, run and emulate commands don't 
> work.
> 
>
> Key: CB-9935
> URL: https://issues.apache.org/jira/browse/CB-9935
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: CLI
>Affects Versions: 5.3.2
> Environment: Cordova CLI: 5.3.3
> Gulp version:  CLI version 3.9.0
> Gulp local:   Local version 3.9.0
> Ionic Version: 1.1.0
> Ionic CLI Version: 1.7.7
> Ionic App Lib Version: 0.6.3
> ios-deploy version: 1.8.2
> ios-sim version: 5.0.3
> OS: Mac OS X El Capitan
> Node Version: v5.0.0
> Xcode version: Xcode 7.1 Build version 7B91b
>Reporter: Uğur Erkan
>Assignee: Jason Ginchereau
> Fix For: 5.4.0
>
>
>  Cordova CLI with Node.js 5.0.0 build, run and emulate commands don't work. 
> There isn't any output even verbose mode. I can't find any debug output, so 
> sorry about lack of information.
> Working workaround is node version switching, i'm using the n version 
> manager. https://github.com/tj/n 
> !https://i.imgur.com/1HG5ndp.png!
> {color:red}
> *It's affect Cordova CLI 5.3.3 version*
> 5.3.3 is latest version on NPM https://www.npmjs.com/package/cordova
> {color}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Assigned] (CB-9935) On Node.js version 5.0.0 Cordova CLI build, run and emulate commands don't work.

2015-11-02 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau reassigned CB-9935:


Assignee: Jason Ginchereau

> On Node.js version 5.0.0 Cordova CLI build, run and emulate commands don't 
> work.
> 
>
> Key: CB-9935
> URL: https://issues.apache.org/jira/browse/CB-9935
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: CLI
>Affects Versions: 5.3.2
> Environment: Cordova CLI: 5.3.3
> Gulp version:  CLI version 3.9.0
> Gulp local:   Local version 3.9.0
> Ionic Version: 1.1.0
> Ionic CLI Version: 1.7.7
> Ionic App Lib Version: 0.6.3
> ios-deploy version: 1.8.2
> ios-sim version: 5.0.3
> OS: Mac OS X El Capitan
> Node Version: v5.0.0
> Xcode version: Xcode 7.1 Build version 7B91b
>Reporter: Uğur Erkan
>Assignee: Jason Ginchereau
>
>  Cordova CLI with Node.js 5.0.0 build, run and emulate commands don't work. 
> There isn't any output even verbose mode. I can't find any debug output, so 
> sorry about lack of information.
> Working workaround is node version switching, i'm using the n version 
> manager. https://github.com/tj/n 
> !https://i.imgur.com/1HG5ndp.png!
> {color:red}
> *It's affect Cordova CLI 5.3.3 version*
> 5.3.3 is latest version on NPM https://www.npmjs.com/package/cordova
> {color}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-9935) On Node.js version 5.0.0 Cordova CLI build, run and emulate commands don't work.

2015-11-02 Thread Jason Ginchereau (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-9935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14986347#comment-14986347
 ] 

Jason Ginchereau commented on CB-9935:
--

I debugged this issue and I have a potential fix. I'll submit a PR soon.

There is an issue in the Q (promises) library used by cordova-lib, that was 
brought to the surface by a minor behavior change in the newer V8 engine used 
by Node v5. See the PR for details.

> On Node.js version 5.0.0 Cordova CLI build, run and emulate commands don't 
> work.
> 
>
> Key: CB-9935
> URL: https://issues.apache.org/jira/browse/CB-9935
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: CLI
>Affects Versions: 5.3.2
> Environment: Cordova CLI: 5.3.3
> Gulp version:  CLI version 3.9.0
> Gulp local:   Local version 3.9.0
> Ionic Version: 1.1.0
> Ionic CLI Version: 1.7.7
> Ionic App Lib Version: 0.6.3
> ios-deploy version: 1.8.2
> ios-sim version: 5.0.3
> OS: Mac OS X El Capitan
> Node Version: v5.0.0
> Xcode version: Xcode 7.1 Build version 7B91b
>Reporter: Uğur Erkan
>Assignee: Jason Ginchereau
>
>  Cordova CLI with Node.js 5.0.0 build, run and emulate commands don't work. 
> There isn't any output even verbose mode. I can't find any debug output, so 
> sorry about lack of information.
> Working workaround is node version switching, i'm using the n version 
> manager. https://github.com/tj/n 
> !https://i.imgur.com/1HG5ndp.png!
> {color:red}
> *It's affect Cordova CLI 5.3.3 version*
> 5.3.3 is latest version on NPM https://www.npmjs.com/package/cordova
> {color}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Resolved] (CB-9810) Mismatch between results of resolveLocalFileSystemURL and FileReader, throws error.

2015-10-29 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau resolved CB-9810.
--
Resolution: Invalid

> Mismatch between results of resolveLocalFileSystemURL and FileReader, throws 
> error.
> ---
>
> Key: CB-9810
> URL: https://issues.apache.org/jira/browse/CB-9810
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.0.0
> Environment: Android SDK 22
> Tested on an LG Nexus, Android 5.0.1
>Reporter: Leonel Gayard
>
> h2. The problem
> When reading a file with {{resolveLocalFileSystemURL}} followed by 
> {{FileReader.readAsText}},  the latter fails, with the error message 
> {{Uncaught TypeError: Failed to execute 'readAsText' on 'FileReader': 
> parameter 1 is not of type 'Blob'.}}
> cordova-plugin-file provides these functions, which match the W3C APIs for 
> File and File System: 
> [resolveLocalFileSystemURL|http://www.w3.org/TR/2011/WD-file-system-api-20110419/#widl-LocalFileSystem-resolveLocalFileSystemURL]
>  and [FileReader|http://www.w3.org/TR/FileAPI/#APIASynch].
> h2. Possible causes ?
> It seems the fileEntry object is created inside the Java code, as a 
> JSONObject (method 
> [Filesystem#makeEntryForURL|https://github.com/apache/cordova-plugin-file/blob/r3.0.0/src/android/Filesystem.java#L61];
>  therefore it does not implement the Javascript interfaces File or Blob.
> h2. Possible solution ?
> Looking at the source of 
> [FileReader.js|https://github.com/apache/cordova-plugin-file/blob/r3.0.0/www/FileReader.js#L130],
>  it seems the FileReader implemented by the plugin delegates to the 
> FileReader of the web view (at least, that's what the name of the variable 
> suggests, `realReader`.
> Also, the function in file FileReader.js [seems to rely on the attribute 
> localURL|https://github.com/apache/cordova-plugin-file/blob/r3.0.0/www/FileReader.js#L88]
>  of the file object, which is not part of the API.
> I made a quick hack on my local installation, to remove the call to the 
> "real" FileReader, and use the one written in Java; this fixed the issue, and 
> makes it possible to use FileReader.
> Tested on Android SDK 22, on an LG Nexus, Android 5.0.1.
> h2. Example
> The repo at https://github.com/leonelag/proto-file-plugin has an example of 
> an application trying to use the plugin to read and write files, and fails on 
> Android.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-9810) Mismatch between results of resolveLocalFileSystemURL and FileReader, throws error.

2015-10-29 Thread Jason Ginchereau (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-9810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14980925#comment-14980925
 ] 

Jason Ginchereau commented on CB-9810:
--

I checked the sample code and found a mistake in how it is using the API to 
read the file. As you point out, the FileReader.readAsText() expects a File 
object as its parameter. A FileEntry object is not itself a File (and is not 
intended to be), but it can give you one. You need to call the FileEntry.file() 
method to retrieve the File object, which can then be passed to readAsText(). 
When I modified the sample code accordingly, it worked.

> Mismatch between results of resolveLocalFileSystemURL and FileReader, throws 
> error.
> ---
>
> Key: CB-9810
> URL: https://issues.apache.org/jira/browse/CB-9810
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.0.0
> Environment: Android SDK 22
> Tested on an LG Nexus, Android 5.0.1
>Reporter: Leonel Gayard
>
> h2. The problem
> When reading a file with {{resolveLocalFileSystemURL}} followed by 
> {{FileReader.readAsText}},  the latter fails, with the error message 
> {{Uncaught TypeError: Failed to execute 'readAsText' on 'FileReader': 
> parameter 1 is not of type 'Blob'.}}
> cordova-plugin-file provides these functions, which match the W3C APIs for 
> File and File System: 
> [resolveLocalFileSystemURL|http://www.w3.org/TR/2011/WD-file-system-api-20110419/#widl-LocalFileSystem-resolveLocalFileSystemURL]
>  and [FileReader|http://www.w3.org/TR/FileAPI/#APIASynch].
> h2. Possible causes ?
> It seems the fileEntry object is created inside the Java code, as a 
> JSONObject (method 
> [Filesystem#makeEntryForURL|https://github.com/apache/cordova-plugin-file/blob/r3.0.0/src/android/Filesystem.java#L61];
>  therefore it does not implement the Javascript interfaces File or Blob.
> h2. Possible solution ?
> Looking at the source of 
> [FileReader.js|https://github.com/apache/cordova-plugin-file/blob/r3.0.0/www/FileReader.js#L130],
>  it seems the FileReader implemented by the plugin delegates to the 
> FileReader of the web view (at least, that's what the name of the variable 
> suggests, `realReader`.
> Also, the function in file FileReader.js [seems to rely on the attribute 
> localURL|https://github.com/apache/cordova-plugin-file/blob/r3.0.0/www/FileReader.js#L88]
>  of the file object, which is not part of the API.
> I made a quick hack on my local installation, to remove the call to the 
> "real" FileReader, and use the one written in Java; this fixed the issue, and 
> makes it possible to use FileReader.
> Tested on Android SDK 22, on an LG Nexus, Android 5.0.1.
> h2. Example
> The repo at https://github.com/leonelag/proto-file-plugin has an example of 
> an application trying to use the plugin to read and write files, and fails on 
> Android.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Assigned] (CB-8350) Android alias applicationDirectory is not readable

2015-10-29 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-8350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau reassigned CB-8350:


Assignee: Jason Ginchereau

> Android alias applicationDirectory is not readable
> --
>
> Key: CB-8350
> URL: https://issues.apache.org/jira/browse/CB-8350
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Reporter: Raymond Camden
>Assignee: Jason Ginchereau
>Priority: Minor
>
> The table for Android File System Layout shows 
> cordova.file.applicationDirectory as being readable. While technically it is 
> readable via XHR, the implication is that it is readable by the FileSystem 
> APIs, and it is not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Assigned] (CB-7253) window.requestFileSystem fails when no sd card is present and non-zero value is provided for size

2015-10-29 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-7253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau reassigned CB-7253:


Assignee: Jason Ginchereau

> window.requestFileSystem fails when no sd card is present and non-zero value 
> is provided for size
> -
>
> Key: CB-7253
> URL: https://issues.apache.org/jira/browse/CB-7253
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin File
>Affects Versions: 3.5.0
> Environment: I discovered this issue on a Nexus7 emulator running 
> android 4.4.2 with no sd card.
>Reporter: Vincent Scuorzo
>Assignee: Jason Ginchereau
>Priority: Minor
>  Labels: easyfix
>
> The problem is that when no external storage is present the size parameter is 
> compared to the available storage space on the internal file system which is 
> incorrectly reported as 0. After reading a post on stack overflow 
> (http://stackoverflow.com/questions/4799643/getting-all-the-total-and-available-space-on-android)
>  I noticed that they were checking available space in a different way so I 
> tried it and the issue went away.
> You can see this bug in action by setting up an emulator as I described and 
> running an app with the file plugin that can execute the following javascript:
> window.requestFileSystem(PERSISTENT, 1024, function(fs){ console.log(fs); }, 
> function(e){ console.log(e); });
> With the current release you will get an error related to reaching the 
> storage quota since the available space is reported incorrectly. Change line 
> 72 of src/android/DirectoryManager.java to read the following:
> freeSpace = 
> freeSpaceCalculation(Environment.getRootDirectory().getAbsolutePath());
> Run the same line of javascript as before and you will now have success, 
> assuming you actually have the available space.
> You can easily bypass this issue and access the filesystem by just passing 0 
> for the size but doing so will also circumvent the checks that ensure you 
> don't try to use more space than is available. In my case, my app was 
> handicapping itself because it thought it didn't have enough space to 
> download additional resources when it should not have had any issues.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Assigned] (CB-9752) getDirectory fails on valid directory with assets filesystem

2015-10-28 Thread Jason Ginchereau (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau reassigned CB-9752:


Assignee: Jason Ginchereau

> getDirectory fails on valid directory with assets filesystem
> 
>
> Key: CB-9752
> URL: https://issues.apache.org/jira/browse/CB-9752
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Android, Plugin File
> Environment: cordova 5.3.3
> cordova android 4.0.0
> cordova-plugin-file 2.0.0
> *** using build-extras.gradle to speed up lookups (as per README.md for 
> plugin) ***
>Reporter: Denis Babineau
>Assignee: Jason Ginchereau
>
> The following JS snippet fails with "failed to get www directory":
> window.resolveLocalFileSystemURL(cordova.file.applicationDirectory, 
> function(appDir) {
> appDir.getDirectory('www', {create:false}, function(wwwDir) {
> console.log("success!");
> }, function() {
> console.log("failed to get www directory");
> });
> }, function() {
> console.log("Failed to get application directory");
> });
> I narrowed it down to AssetFilesystem.java's listAssets() method called from 
> isDirectory() which returns the "new String[0];" (assetPath = 'www/' in this 
> method) which in turn causes isDirectory() to return false.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-9752) getDirectory fails on valid directory with assets filesystem

2015-10-28 Thread Jason Ginchereau (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-9752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14979202#comment-14979202
 ] 

Jason Ginchereau commented on CB-9752:
--

I've reproduced this bug, both with and without the cdvasset.manifest file 
added via the file plugin's build-extras.gradle. The fix looks simple; I'll 
submit a PR soon.

> getDirectory fails on valid directory with assets filesystem
> 
>
> Key: CB-9752
> URL: https://issues.apache.org/jira/browse/CB-9752
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Android, Plugin File
> Environment: cordova 5.3.3
> cordova android 4.0.0
> cordova-plugin-file 2.0.0
> *** using build-extras.gradle to speed up lookups (as per README.md for 
> plugin) ***
>Reporter: Denis Babineau
>Assignee: Jason Ginchereau
>
> The following JS snippet fails with "failed to get www directory":
> window.resolveLocalFileSystemURL(cordova.file.applicationDirectory, 
> function(appDir) {
> appDir.getDirectory('www', {create:false}, function(wwwDir) {
> console.log("success!");
> }, function() {
> console.log("failed to get www directory");
> });
> }, function() {
> console.log("Failed to get application directory");
> });
> I narrowed it down to AssetFilesystem.java's listAssets() method called from 
> isDirectory() which returns the "new String[0];" (assetPath = 'www/' in this 
> method) which in turn causes isDirectory() to return false.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



<    1   2