Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A7A4109F8 for ; Mon, 17 Mar 2014 20:50:54 +0000 (UTC) Received: (qmail 41083 invoked by uid 500); 17 Mar 2014 20:50:53 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 40954 invoked by uid 500); 17 Mar 2014 20:50:52 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 40747 invoked by uid 99); 17 Mar 2014 20:50:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2014 20:50:49 +0000 Date: Mon, 17 Mar 2014 20:50:49 +0000 (UTC) From: "David Normington (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-6243) FileEntry.toURL() "cdvfile://localhost/persistent/file://" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-6243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13938365#comment-13938365 ] David Normington commented on CB-6243: -------------------------------------- Thanks for responding. I did as you said and it has stopped the above error but now have a new error: {code}W/System.err( 1798): java.net.MalformedURLException: No installed handlers for this URL W/System.err( 1798): at org.apache.cordova.file.FileUtils.resolveLocalFileSystemURI(FileUtils.java:550) W/System.err( 1798): at org.apache.cordova.file.FileUtils.access$200(FileUtils.java:49) W/System.err( 1798): at org.apache.cordova.file.FileUtils$12.run(FileUtils.java:311) W/System.err( 1798): at org.apache.cordova.file.FileUtils$23.run(FileUtils.java:477) W/System.err( 1798): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) W/System.err( 1798): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) W/System.err( 1798): at java.lang.Thread.run(Thread.java:841){code} Seems to be a problem with handling file:// in resolveFileSystemURI now. > FileEntry.toURL() "cdvfile://localhost/persistent/file://" > ---------------------------------------------------------- > > Key: CB-6243 > URL: https://issues.apache.org/jira/browse/CB-6243 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File > Affects Versions: 3.4.0 > Environment: Android 4.4 using Genymotion emulator > Reporter: David Normington > Assignee: Ian Clelland > Labels: android, cdvfile > > When I run something like this: > {code} > window.resolveLocalFileSystemURL('file:///storage/emulated/0/DCIM/Camera/1394726081689.jpg', function(entry) { > console.log(entry.fullPath); > console.log(entry.toURL()); > entry.file(fileSuccess, fail); > }); > {code} > The logcat shows this result: > {code} > I/chromium( 3022): [INFO:CONSOLE(28)] "file:///storage/emulated/0/DCIM/Camera/1394726081689.jpg", source: file:///android_asset/www/js/pdf.js (28) > I/chromium( 3022): [INFO:CONSOLE(29)] "cdvfile://localhost/temporary/file://storage/emulated/0/DCIM/Camera/1394726081689.jpg", source: file:///android_asset/www/js/pdf.js (29) > W/System.err( 2928): java.io.FileNotFoundException: File: cdvfile://localhost/persistent/file://storage/emulated/0/DCIM/Camera/1394726081689.jpg does not exist. > W/System.err( 2928): at org.apache.cordova.file.FileUtils.getFileMetadata(FileUtils.java:953) > W/System.err( 2928): at org.apache.cordova.file.FileUtils.access$400(FileUtils.java:53) > W/System.err( 2928): at org.apache.cordova.file.FileUtils$14.run(FileUtils.java:220) > W/System.err( 2928): at org.apache.cordova.file.FileUtils$23.run(FileUtils.java:325) > W/System.err( 2928): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) > W/System.err( 2928): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) > W/System.err( 2928): at java.lang.Thread.run(Thread.java:841) > {code} > As you can see the second console.log has the cdvfile protocol with the file protocol appended to the end. I'm sure this is causing the following error. Seems that the same code runs perfectly on iOS returning the correct URLs: > {code} > [Log] /cdv_photo_001.jpg > [Log] cdvfile://localhost/temporary/cdv_photo_001.jpg > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)