Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E2447200C17 for ; Fri, 10 Feb 2017 23:53:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E0C0A160B5C; Fri, 10 Feb 2017 22:53:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1139D160B4E for ; Fri, 10 Feb 2017 23:53:46 +0100 (CET) Received: (qmail 48564 invoked by uid 500); 10 Feb 2017 22:53:46 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 48553 invoked by uid 99); 10 Feb 2017 22:53:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2017 22:53:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id CA8A41A0575 for ; Fri, 10 Feb 2017 22:53:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id W8nT1JQDT_cz for ; Fri, 10 Feb 2017 22:53:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3B7C45F1B3 for ; Fri, 10 Feb 2017 22:53:44 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D8BD0E05F2 for ; Fri, 10 Feb 2017 22:53:42 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id BE36621D6C for ; Fri, 10 Feb 2017 22:53:41 +0000 (UTC) Date: Fri, 10 Feb 2017 22:53:41 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-12434) Stoping a Paused Recording throws file not found exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 10 Feb 2017 22:53:48 -0000 [ https://issues.apache.org/jira/browse/CB-12434?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D158619= 60#comment-15861960 ]=20 ASF GitHub Bot commented on CB-12434: ------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/cordova-plugin-media/pull/127 > Stoping a Paused Recording throws file not found exception > ---------------------------------------------------------- > > Key: CB-12434 > URL: https://issues.apache.org/jira/browse/CB-12434 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin Media > Affects Versions: 2.4.1 > Reporter: jcesarmobile > Assignee: jcesarmobile > Labels: android, easyfix > > Start recording > pause recording > stop recording > boom! > {code} > /storage/emulated/0/tmprecording-1486509338267.3gp: open failed: ENOENT (= No such file or directory) > java.io.= FileNotFoundException: /storage/emulated/0/tmprecording-1486509338267.3gp: = open failed: ENOENT (No such file or directory) > at l= ibcore.io.IoBridge.open(IoBridge.java:452) > at j= ava.io.FileInputStream.(FileInputStream.java:76) > at o= rg.apache.cordova.media.AudioPlayer.moveFile(AudioPlayer.java:213) > at o= rg.apache.cordova.media.AudioPlayer.stopRecording(AudioPlayer.java:271) > at o= rg.apache.cordova.media.AudioHandler.stopRecordingAudio(AudioHandler.java:2= 98) > at o= rg.apache.cordova.media.AudioHandler.execute(AudioHandler.java:121) > at o= rg.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98) > at o= rg.apache.cordova.PluginManager.exec(PluginManager.java:132) > at o= rg.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:57) > at o= rg.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41= ) > at o= rg.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) > at o= rg.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.ja= va:41) > at a= ndroid.os.Handler.dispatchMessage(Handler.java:102) > at a= ndroid.os.Looper.loop(Looper.java:148) > at a= ndroid.os.HandlerThread.run(HandlerThread.java:61) > Caused = by: android.system.ErrnoException: open failed: ENOENT (No such file or dir= ectory) > at l= ibcore.io.Posix.open(Native Method) > at l= ibcore.io.BlockGuardOs.open(BlockGuardOs.java:186) > at l= ibcore.io.IoBridge.open(IoBridge.java:438) > at j= ava.io.FileInputStream.(FileInputStream.java:76)=C2=A0 > at o= rg.apache.cordova.media.AudioPlayer.moveFile(AudioPlayer.java:213)=C2=A0 > at o= rg.apache.cordova.media.AudioPlayer.stopRecording(AudioPlayer.java:271)=C2= =A0 > at o= rg.apache.cordova.media.AudioHandler.stopRecordingAudio(AudioHandler.java:2= 98)=C2=A0 > at o= rg.apache.cordova.media.AudioHandler.execute(AudioHandler.java:121)=C2=A0 > at o= rg.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)=C2=A0 > at o= rg.apache.cordova.PluginManager.exec(PluginManager.java:132)=C2=A0 > at o= rg.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:57)=C2=A0 > at o= rg.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41= )=C2=A0 > at o= rg.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)=C2= =A0 > at o= rg.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.ja= va:41)=C2=A0 > at a= ndroid.os.Handler.dispatchMessage(Handler.java:102)=C2=A0 > at a= ndroid.os.Looper.loop(Looper.java:148)=C2=A0 > at a= ndroid.os.HandlerThread.run(HandlerThread.java:61)=C2=A0 > {code} > the problem is the file is added to the tempFiles list twice, once on pau= se and once on stop, so it's moved twice, and the second time it doesn't ex= ist anymore because it was moved. > It's an easy fix, just check if the tempFiles already contains the file o= n stopRecording > {code} > if (!this.tempFiles.contains(this.tempFile)) { > this.tempFiles.add(this.tempFile); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org