[jira] [Commented] (CB-6936) app crashes if webview is destroyed while dialog box open

2014-06-17 Thread Joe Bowser (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033467#comment-14033467
 ] 

Joe Bowser commented on CB-6936:


On Android, once a View is destroyed, the context for that view should be null, 
so v.getContext() should work better than checking for the URL.  I'm going to 
lower the priority, but I'll probably work on it anyway because this is 
interesting.

 app crashes if webview is destroyed while dialog box open
 -

 Key: CB-6936
 URL: https://issues.apache.org/jira/browse/CB-6936
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android
Affects Versions: 3.4.0
 Environment: Android 4.x on physical device
 Or any Android environment
Reporter: Shingo Toda
Assignee: Joe Bowser

 We have an Android application which implements an embedded WebView 
 container in which it executes customer Cordova apps.
 Under certain conditions our container needs to terminate the customer app, 
 and during this termination it calls {{CordovaWebView.destroy()}} to disable 
 CordovaWebView.
 But application may entirely crash during this termination in some scenarios. 
 For example:
 # call {{navigator.notification.alert}}, {{confirm}} or {{prompt}} and leave 
 popup dialog open
 # this termination is done for some reason while dialog box is till open
 # all views on CordovaWebView are released but dialog box still remains
 # attempt to close dialog by pressing button in the dialog
 # application crashes with Unknown exception.
 {code}
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176): 81508: Unknown exception 
 occurred.
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176): java.lang.NullPointerException
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 android.webkit.WebView.setNetworkAvailable(WebView.java:2639)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue$OnlineEventsBridgeMode$1.run(NativeToJsMessageQueue.java:305)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 android.app.Activity.runOnUiThread(Activity.java:4175)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue$OnlineEventsBridgeMode.onNativeToJsMessageAvailable(NativeToJsMessageQueue.java:313)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue.enqueueMessage(NativeToJsMessageQueue.java:253)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue.addPluginResult(NativeToJsMessageQueue.java:246)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.CordovaWebView.sendPluginResult(CordovaWebView.java:572)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.CallbackContext.sendPluginResult(CallbackContext.java:64)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.dialogs.Notification$1$1.onClick(Notification.java:150)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
 {code}
 h2. Problem
 Obviously CordovaWebView is already not available but dialog still exists. If 
 a user press button in dialog, {{onClick()}} gets called and consequently 
 {{CordovaWebView.setNetworkAvailable()}} gets called to send message from 
 queue to JavaScript even though WebView is already destroyed. As a result, 
 entire application crashes.
 h3. Workaround
 We made a method to check if WebView is destroyed or not.
 {code}
 private boolean isWebViewDestroyed() {
   final String url = webView.getUrl();
   if (url == null ||
   url.equals(about:blank)) {
   return true;
   } else {
   return false;
   }
 }
 {code}
 And check this before {{callbackContext.sendPluginResult()}} is called.
 {code}
 public synchronized void alert(final String message, final String title, 
 final String buttonLabel, final CallbackContext callbackContext) {
 final CordovaInterface cordova = this.cordova;
 Runnable runnable = new Runnable() {
 public void run() {
 AlertDialog.Builder dlg = new 
 AlertDialog.Builder(cordova.getActivity());
 dlg.setMessage(message);
 dlg.setTitle(title);
 dlg.setCancelable(true);
 dlg.setPositiveButton(buttonLabel,
 new AlertDialog.OnClickListener() {
 public void onClick(DialogInterface dialog, int 
 which) {
 dialog.dismiss();
 if (!isWebViewDestroyed()) {
 

[jira] [Updated] (CB-6936) app crashes if webview is destroyed while dialog box open

2014-06-17 Thread Joe Bowser (JIRA)

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

Joe Bowser updated CB-6936:
---

Component/s: (was: Plugin Dialogs)
   Priority: Minor  (was: Major)

Removing dialogs, because this could be any plugin.

 app crashes if webview is destroyed while dialog box open
 -

 Key: CB-6936
 URL: https://issues.apache.org/jira/browse/CB-6936
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android
Affects Versions: 3.4.0
 Environment: Android 4.x on physical device
 Or any Android environment
Reporter: Shingo Toda
Assignee: Joe Bowser
Priority: Minor

 We have an Android application which implements an embedded WebView 
 container in which it executes customer Cordova apps.
 Under certain conditions our container needs to terminate the customer app, 
 and during this termination it calls {{CordovaWebView.destroy()}} to disable 
 CordovaWebView.
 But application may entirely crash during this termination in some scenarios. 
 For example:
 # call {{navigator.notification.alert}}, {{confirm}} or {{prompt}} and leave 
 popup dialog open
 # this termination is done for some reason while dialog box is till open
 # all views on CordovaWebView are released but dialog box still remains
 # attempt to close dialog by pressing button in the dialog
 # application crashes with Unknown exception.
 {code}
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176): 81508: Unknown exception 
 occurred.
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176): java.lang.NullPointerException
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 android.webkit.WebView.setNetworkAvailable(WebView.java:2639)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue$OnlineEventsBridgeMode$1.run(NativeToJsMessageQueue.java:305)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 android.app.Activity.runOnUiThread(Activity.java:4175)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue$OnlineEventsBridgeMode.onNativeToJsMessageAvailable(NativeToJsMessageQueue.java:313)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue.enqueueMessage(NativeToJsMessageQueue.java:253)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue.addPluginResult(NativeToJsMessageQueue.java:246)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.CordovaWebView.sendPluginResult(CordovaWebView.java:572)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.CallbackContext.sendPluginResult(CallbackContext.java:64)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.dialogs.Notification$1$1.onClick(Notification.java:150)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
 {code}
 h2. Problem
 Obviously CordovaWebView is already not available but dialog still exists. If 
 a user press button in dialog, {{onClick()}} gets called and consequently 
 {{CordovaWebView.setNetworkAvailable()}} gets called to send message from 
 queue to JavaScript even though WebView is already destroyed. As a result, 
 entire application crashes.
 h3. Workaround
 We made a method to check if WebView is destroyed or not.
 {code}
 private boolean isWebViewDestroyed() {
   final String url = webView.getUrl();
   if (url == null ||
   url.equals(about:blank)) {
   return true;
   } else {
   return false;
   }
 }
 {code}
 And check this before {{callbackContext.sendPluginResult()}} is called.
 {code}
 public synchronized void alert(final String message, final String title, 
 final String buttonLabel, final CallbackContext callbackContext) {
 final CordovaInterface cordova = this.cordova;
 Runnable runnable = new Runnable() {
 public void run() {
 AlertDialog.Builder dlg = new 
 AlertDialog.Builder(cordova.getActivity());
 dlg.setMessage(message);
 dlg.setTitle(title);
 dlg.setCancelable(true);
 dlg.setPositiveButton(buttonLabel,
 new AlertDialog.OnClickListener() {
 public void onClick(DialogInterface dialog, int 
 which) {
 dialog.dismiss();
 if (!isWebViewDestroyed()) {
 callbackContext.sendPluginResult(new 
 PluginResult(PluginResult.Status.OK, 0));
 }
 }
 

[jira] [Commented] (CB-6928) Wrong behaviour transferring cacheable content

2014-06-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033546#comment-14033546
 ] 

ASF GitHub Bot commented on CB-6928:


Github user jpuerto commented on the pull request:


https://github.com/apache/cordova-plugin-file-transfer/pull/31#issuecomment-46279769
  
As commented in the dev mailing list, this patch is not valid. We need to 
return the caching status with the error callback so the developer can act 
accordingly.


 Wrong behaviour transferring cacheable content
 --

 Key: CB-6928
 URL: https://issues.apache.org/jira/browse/CB-6928
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin File Transfer
Affects Versions: 3.5.0
Reporter: Javier Puerto
Priority: Minor
 Attachments: CB-6928.diff


 Use case:
 Transfer resources from server to the device. To avoid unnecessary use of the 
 device bandwidth, the resources that exists already are checked with the 
 If-Modified-Since header so server can return 304 status code and update 
 just in case that is needed.
 Result for Android test:
 The plugin doesn't care about the status code, if the request is success, 
 open the InputStream and copy the content to the file. The problem is that a 
 HTTP status of 304 has no response and that leads to a corrupted file 
 transfer.
 Fix:
 If status code is 304, doesn't makes sense to process the InputStream. Read 
 the status code after connection and if it's 304, skip the copy process and 
 return the file entity like a success transfer.
 I've tested for Android only.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6928) Wrong behaviour transferring cacheable content

2014-06-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033547#comment-14033547
 ] 

ASF GitHub Bot commented on CB-6928:


Github user jpuerto closed the pull request at:

https://github.com/apache/cordova-plugin-file-transfer/pull/31


 Wrong behaviour transferring cacheable content
 --

 Key: CB-6928
 URL: https://issues.apache.org/jira/browse/CB-6928
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin File Transfer
Affects Versions: 3.5.0
Reporter: Javier Puerto
Priority: Minor
 Attachments: CB-6928.diff


 Use case:
 Transfer resources from server to the device. To avoid unnecessary use of the 
 device bandwidth, the resources that exists already are checked with the 
 If-Modified-Since header so server can return 304 status code and update 
 just in case that is needed.
 Result for Android test:
 The plugin doesn't care about the status code, if the request is success, 
 open the InputStream and copy the content to the file. The problem is that a 
 HTTP status of 304 has no response and that leads to a corrupted file 
 transfer.
 Fix:
 If status code is 304, doesn't makes sense to process the InputStream. Read 
 the status code after connection and if it's 304, skip the copy process and 
 return the file entity like a success transfer.
 I've tested for Android only.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6871) Windows8 - add ability to resolve ms-appdata urls for

2014-06-17 Thread Dirk-Jan Hoek (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033629#comment-14033629
 ] 

Dirk-Jan Hoek commented on CB-6871:
---

I'm having the same issue. As stated in CB-2419, 
'ms-appdata:///local/picture004.jpg' is now passed to success callback. There's 
hardly any info on this kind of url, and I don't have a clue how to use it.

This is supposed to work, but it doesn't work for me:
img src=ms-appdata:///local/picture004.jpg

So it seems there's no way we can Camera.getPicture to save a photo, show a 
preview using the above mentioned img-tag and upload it using the FileTransfer 
API?

 Windows8 - add ability to resolve ms-appdata urls for 
 --

 Key: CB-6871
 URL: https://issues.apache.org/jira/browse/CB-6871
 Project: Apache Cordova
  Issue Type: Improvement
  Components: Plugin File
Affects Versions: 3.5.0
Reporter: Cristian Badila

 This is especially important as the camera plugin right now returns a URL of 
 the following format when successfully capturing a photo:
 bq. ms-appdata:///local/ + storageFile.name
 This kind of URL format cannot be resolved by the file plugin right now so 
 the result returned by the camera plugin cannot be used by the file plugin in 
 any way.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6953) Error on building android project. Semicolon expected

2014-06-17 Thread Rick Gommers (JIRA)
Rick Gommers created CB-6953:


 Summary: Error on building android project. Semicolon expected
 Key: CB-6953
 URL: https://issues.apache.org/jira/browse/CB-6953
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, CLI
Affects Versions: 3.5.0
 Environment: Windows 7 64bit
Reporter: Rick Gommers
 Fix For: 3.6.0


I just installed Cordova 3.5.0-0.2.4.

Created fresh android project, tried to run it and this was the result:

-compile:
[javac] Compiling 3 source files to 
C:\CordovaProjects\menukaart\platforms\android\ant-build\classes
[javac] 
C:\CordovaProjects\menukaart\platforms\android\src\com\23ivh12b3b4\menukaart\MenuKaart.java:20:
 error: ';' expected
[javac] package com.23ivh12b3b4.menukaart;
[javac]^
[javac] 
C:\CordovaProjects\menukaart\platforms\android\ant-gen\com\23ivh12b3b4\menukaart\BuildConfig.java:2:
 error: ';' expected
[javac] package com.23ivh12b3b4.menukaart;
[javac]^
[javac] 
C:\CordovaProjects\menukaart\platforms\android\ant-gen\com\23ivh12b3b4\menukaart\R.java:8:
 error: ';' expected
[javac] package com.23ivh12b3b4.menukaart;
[javac]^
[javac] 3 errors

BUILD FAILED
C:\Eclipse\sdk\tools\ant\build.xml:720: The following error occurred while 
executing this line:
C:\Eclipse\sdk\tools\ant\build.xml:734: Compile failed; see the compiler error 
output for details.

Total time: 3 seconds

C:\CordovaProjects\menukaart\platforms\android\cordova\node_modules\q\q.js:126
throw e;
  ^
Error code 1 for command: cmd with args: 
/s,/c,ant,debug,-f,C:\CordovaProjects\menukaart\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-
gen
Command finished with error code 8: 
C:\CordovaProjects\menukaart\platforms\android\cordova\run.bat
Error: C:\CordovaProjects\menukaart\platforms\android\cordova\run.bat: Command 
failed with exit code 8
at ChildProcess.whenDone 
(C:\Users\RICKGO~1\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)

C:\CordovaProjects\menukaartcordova -v
3.5.0-0.2.4



--
This message was sent by Atlassian JIRA
(v6.2#6252)


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

2014-06-17 Thread Ian Clelland (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033770#comment-14033770
 ] 

Ian Clelland commented on CB-6938:
--

It looks like that wording was added for the most recent version of the spec -- 
it's in http://www.w3.org/TR/2012/WD-file-system-api-20120417/, but not in the 
previous version http://www.w3.org/TR/2011/WD-file-system-api-20110419/

(A similar note appears with the {{.moveTo}} method, and dates back to the 
original version of the document. It's just {{.copyoTo}} which had unspecified 
behaviour.)

We'll need to work up a couple of test cases for this, but otherwise I'm fine 
with adding it. The spec has been abandoned by the W3C, but this will at least 
ensure better compatibility with Chrome apps using the same API.

 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: Vladimir Avdonin

 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:
 } else if (bNewExists) {
 // the full destination should NOT already exist if a copy
 errCode = PATH_EXISTS_ERR;
 Suggested patch:
 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:error];
 +   bSuccess = YES;
 +if (bNewExists)
 +bSuccess = [fileMgr 
 removeItemAtPath:newFileSystemPath error:error];
 +if (bSuccess)
 +bSuccess = [fileMgr copyItemAtPath:srcFullPath 
 toPath:newFileSystemPath error:error];
  }
  } else { // move
  // iOS requires that destination must not exist before 
 calling moveTo



--
This message was sent by Atlassian JIRA
(v6.2#6252)


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

2014-06-17 Thread Ian Clelland (JIRA)

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

Ian Clelland updated CB-6938:
-

Description: 
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:error];
+   bSuccess = YES;
+if (bNewExists)
+bSuccess = [fileMgr removeItemAtPath:newFileSystemPath 
error:error];
+if (bSuccess)
+bSuccess = [fileMgr copyItemAtPath:srcFullPath 
toPath:newFileSystemPath error:error];
 }
 } else { // move
 // iOS requires that destination must not exist before calling 
moveTo
{code}

  was:
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:
} else if (bNewExists) {
// the full destination should NOT already exist if a copy
errCode = PATH_EXISTS_ERR;

Suggested patch:

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:error];
+   bSuccess = YES;
+if (bNewExists)
+bSuccess = [fileMgr removeItemAtPath:newFileSystemPath 
error:error];
+if (bSuccess)
+bSuccess = [fileMgr copyItemAtPath:srcFullPath 
toPath:newFileSystemPath error:error];
 }
 } else { // move
 // iOS requires that destination must not exist before calling 
moveTo



 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: Vladimir Avdonin

 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:error];
 +   bSuccess = YES;
 +if (bNewExists)
 + 

[jira] [Created] (CB-6954) Share events.js between cordova and plugman

2014-06-17 Thread Sergey Grebnov (JIRA)
Sergey Grebnov created CB-6954:
--

 Summary: Share events.js between cordova and plugman
 Key: CB-6954
 URL: https://issues.apache.org/jira/browse/CB-6954
 Project: Apache Cordova
  Issue Type: Bug
  Components: CordovaLib
Reporter: Sergey Grebnov
Assignee: Sergey Grebnov


Currently there are two instances of events.js under cordova and plugman 
folders which provide exactly the same functionality.

https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/plugman/events.js

https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/events.js

This is common functionality which must be shared among cordova and plugman so 
must be moved to some common folder (src/events.js???).  Similar to 
CordovaError and xml-helpers.js

It is also required to be able to reference to 'events' from shared code - as 
an example, common Hooks code which emits messages via 'events'.




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6954) Share events.js between cordova and plugman

2014-06-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033776#comment-14033776
 ] 

ASF GitHub Bot commented on CB-6954:


GitHub user sgrebnov opened a pull request:

https://github.com/apache/cordova-lib/pull/31

CB-6954 Share events.js between cordova and plugman

https://issues.apache.org/jira/browse/CB-6954

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/MSOpenTech/cordova-lib CB-6954

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-lib/pull/31.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #31


commit 97d8a86eb5c39f94e43d071630d04292db054757
Author: sgrebnov v-seg...@microsoft.com
Date:   2014-06-17T13:32:24Z

CB-6954 Share events.js between cordova and plugman




 Share events.js between cordova and plugman
 ---

 Key: CB-6954
 URL: https://issues.apache.org/jira/browse/CB-6954
 Project: Apache Cordova
  Issue Type: Bug
  Components: CordovaLib
Reporter: Sergey Grebnov
Assignee: Sergey Grebnov
  Labels: cordova, cordova-lib, plugman, refactoring

 Currently there are two instances of events.js under cordova and plugman 
 folders which provide exactly the same functionality.
 https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/plugman/events.js
 https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/events.js
 This is common functionality which must be shared among cordova and plugman 
 so must be moved to some common folder (src/events.js???).  Similar to 
 CordovaError and xml-helpers.js
 It is also required to be able to reference to 'events' from shared code - as 
 an example, common Hooks code which emits messages via 'events'.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6944) Media-Capture plugin on Android returns Canceled error when Accept image is selected

2014-06-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033789#comment-14033789
 ] 

ASF GitHub Bot commented on CB-6944:


GitHub user dzeims opened a pull request:

https://github.com/apache/cordova-plugin-media-capture/pull/18

CB-6944: Android: Fix file permission for camera app image media capture



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/dzeims/cordova-plugin-media-capture master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-media-capture/pull/18.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #18


commit 2467b6ffe559de2e3563bbde8c623ee137339b30
Author: dzeims dze...@users.noreply.github.com
Date:   2014-06-17T13:35:59Z

CB-6944: Android: Fix file permission for camera app image media capture




 Media-Capture plugin on Android returns Canceled error when Accept image is 
 selected
 

 Key: CB-6944
 URL: https://issues.apache.org/jira/browse/CB-6944
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin Media Capture
Affects Versions: 3.5.0
 Environment: Android 4.0.x, 4.1, 4.2, 4.3, 4.4
 Cordova 3.5.0-0.2.4
 Plugins:
 org.apache.cordova.file 1.2.0 File
 org.apache.cordova.media-capture 0.3.1 Capture
Reporter: James White
Priority: Critical
 Attachments: index.js


 Attempting to run the following:
 {noformat}
 navigator.device.capture.captureImage(function(mediaFiles) { 
 alert('success?');  },
 function(error)
 {
   navigator.notification.alert('Error code: ' + error.code + ' = ' + 
 error.message, null, 'Capture Error');
  },{ limit:1 });
 {noformat}
 always invokes the error callback with the object:
 {noformat}
 {message:Canceled., code:3}
 {noformat}
 even if the accept image option is selected.
 Android 4.4 behaves differently, where tapping on the accept image option 
 does nothing and instead of returning with the error, it remains on the 
 captured photo view.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6272) Fix subdir handling

2014-06-17 Thread Ian Clelland (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033790#comment-14033790
 ] 

Ian Clelland commented on CB-6272:
--

[~jsoref], ping? I'd like to start closing some of the blockers. Is this one 
resoved?

 Fix subdir handling
 ---

 Key: CB-6272
 URL: https://issues.apache.org/jira/browse/CB-6272
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugman
Affects Versions: 3.5.0
Reporter: Josh Soref
Assignee: Jonathan Bond
Priority: Blocker

 CB-6160 landed [~jbondc]'s ae2ce7ac6325d1c6558365b4be82e5a8ff0983b9
 which broke some portion of install:
 +if (dep.subdir) {
 +dep.subdir = path.join(dep.subdir.split('/'));
 ...
 -if (dep_subdir) {
 -dep_subdir = path.join.apply(null, 
 dep_subdir.split('/'));



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6955) href, WebView.goBack() or goForward() do not show view conponents of HTML

2014-06-17 Thread Shingo Toda (JIRA)
Shingo Toda created CB-6955:
---

 Summary: href, WebView.goBack() or goForward() do not show view 
conponents of HTML
 Key: CB-6955
 URL: https://issues.apache.org/jira/browse/CB-6955
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android
Affects Versions: 3.4.0
 Environment: Android 4.0.4 Galaxy S2
Reporter: Shingo Toda
Priority: Minor


This problem happens when app loads a HTML file by href, {{WebView.goBack()}} 
or {{WebView.goForward()}}.

Firstly I found this problem when I did test with mobilespec. When I touch 
Automatic Test, it looks like exactly the same page is loaded. After that, if 
I touch a part at the top of page where Run All Tests button should be, 
automatic test starts even though the button is not visible. Thus, it seems 
that view is not rendered but actually some of the DOM elements are loaded.

Also, {{goBack()}} and {{goForward()}} of (Cordova)WebView object do not work 
properly. Given that a page layout in application consists of two buttons and a 
embedded CordovaWebView. Callback methods are registered to those buttons to 
call {{goBack()}} and {{goForward()}}. Now three pages are in history and the 
last page is shown. Even if an app calls {{goBack()}}, the previous page is not 
rendered but it seems that, as described above, some components such as buttons 
(in DOM) exist but are just not visible. {{goForward()}} does work likewise.

This problem does not happen on Cordova 2.9 so I guess some changes in core 
modules in Cordova Android cause this but I couldn't identified the lines.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6249) Camera fails to return an actual FILE_URI it always returns content://

2014-06-17 Thread Ian Clelland (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033812#comment-14033812
 ] 

Ian Clelland commented on CB-6249:
--

[~drumaboy46] -- can we call this issue resolved?

I don't think that forcing Android 4.4+ to give up a file URL is the right 
solution; content URLs are more correct, and there's no guarantee that future 
versions of Android won't make it harder, or even impossible, to get a file url 
out of the Camera API. I think that the WebView will understand content urls in 
all cases, as does the file plugin, and so you can always use those urls in 
your application, or use the file plugin to copy the pictures somewhere more 
convenient.

 Camera fails to return an actual FILE_URI it always returns content://
 --

 Key: CB-6249
 URL: https://issues.apache.org/jira/browse/CB-6249
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, Plugin Camera, Plugin File
Affects Versions: 3.4.0
 Environment: Current Node Version
 v0.10.25
 Current Cordova CLI Version
 3.4.0-0.1.0
 Android
Reporter: Ralph S Theart
Assignee: Ian Clelland
  Labels: camera, file

 No matter what I do I can not get a url of file:///... all I get is 
 {code}
 content://media/external/images/media/1357
 {code}
 Here is my very simple code
 {code}
 navigator.camera.getPicture(function(imageURI){
console.log('GOT IMAGE: '+imageURI);
window.resolveLocalFileSystemURL(imageURI, function(entry){
   console.log(entry.name +   +entry.fullPath);
}, function(e){
   console.log('Some error occured: '+e.code);
}); 
 }, onPhotoFail, {
destinationType: 1, 
sourceType: pictureSource,
mediaType : Camera.MediaType.ALLMEDIA,
encodingType: 0,
allowEdit : false,
correctOrientation:true,
saveToPhotoAlbum: false,
quality: 50
 });
 {code}
 I always get content://... for the returned path from camera and even the 
 same thing when I resolve the url. Can you confirm this bug?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-5308) Contact.save() call failure callback even if contact data is successfully saved on device

2014-06-17 Thread Shingo Toda (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-5308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033818#comment-14033818
 ] 

Shingo Toda commented on CB-5308:
-

I think save() in Java should be like below.

{code:title=ContactManager#execute()|borderStyle=solid}
else if (action.equals(save)) {
final JSONObject contact = args.getJSONObject(0);
this.cordova.getThreadPool().execute(new Runnable() {
public void run() {
JSONObject res = null;
String id = contactAccessor.save(contact);
if (id != null) {
try {
// for new contact data
if( (contactAccessor.getJsonString(contact, id)) 
== null){
res = contactAccessor.getContactByRawId(id);
}
// for existing contact data
else {
res = contactAccessor.getContactById(id);
}
} catch (JSONException e) {
Log.e(LOG_TAG, JSON fail., e);
}
}
if (res != null) {
callbackContext.success(res);
} else {
callbackContext.sendPluginResult(new 
PluginResult(PluginResult.Status.ERROR, UNKNOWN_ERROR));
}
}
});
}
{code}

{code:title=ContactAccessorSdk5.java|borderStyle=solid}
public JSONObject getContactByRawId(String rawid) throws JSONException {
// Do the id query
Cursor c = 
mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
null,
ContactsContract.Data.RAW_CONTACT_ID +  = ? ,
new String[] { rawid },
ContactsContract.Data.RAW_CONTACT_ID +  ASC);

JSONArray fields = new JSONArray();
fields.put(*);

HashMapString, Boolean populate = buildPopulationSet(fields);

JSONArray contacts = populateContactArray(1, populate, c);

if (contacts.length() == 1) {
return contacts.getJSONObject(0);
} else {
return null;
}
}


public JSONObject getContactById(String id) throws JSONException {
// Do the id query
Cursor c = 
mApp.getActivity().getContentResolver().query(ContactsContract.Data.CONTENT_URI,
null,
ContactsContract.Data.CONTACT_ID +  = ? ,
new String[] { id },
ContactsContract.Data.CONTACT_ID +  ASC);

JSONArray fields = new JSONArray();
fields.put(*);

HashMapString, Boolean populate = buildPopulationSet(fields);

JSONArray contacts = populateContactArray(1, populate, c);

if (contacts.length() == 1) {
return contacts.getJSONObject(0);
} else {
return null;
}
}
{code}

I just expect:
   if id in JSONObject is null, a user want to save a new contact data
   else if id is not null, a user want to update a existing contact data

But I wonder if there may be a number of use cases or user operations which are 
not covered by that code.

 Contact.save() call failure callback even if contact data is successfully 
 saved on device
 -

 Key: CB-5308
 URL: https://issues.apache.org/jira/browse/CB-5308
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, mobile-spec, Plugin Contacts
Affects Versions: 3.1.0
 Environment: Android 4.1.2 physical device
Reporter: Shingo Toda
Priority: Minor

 When I run contact mobile-spec, following specs sometimes fail.
 - contacts.spec.6
 - contacts.spec.20
 - contacts.spec.21
 - contacts.spec.24
 In Java side, it looks that {{ContactAccessorSdk5.save()}} returns contact id 
 but {{ContactAccessorSdk5.getContactById()}} returns {{null}} instead of 
 contact data associated with the id. Actually some of contact data such as 
 Test Delete are found on my device so the save operation is actually done.
 This save() returns newId in the following code.
 {code:title=ContactAccessorSdk5.java|borderStyle=solid}
   //Add contact
 try {
 ContentProviderResult[] cpResults = 
 mApp.getActivity().getContentResolver().applyBatch(ContactsContract.AUTHORITY,
  ops);
 if (cpResults.length = 0) {
 newId = cpResults[0].uri.getLastPathSegment();
 }
 } catch (RemoteException e) {
 Log.e(LOG_TAG, e.getMessage(), e);
 } catch (OperationApplicationException e) {
 

[jira] [Resolved] (CB-6698) Plugman support for referencing Android libraries

2014-06-17 Thread Andrew Grieve (JIRA)

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

Andrew Grieve resolved CB-6698.
---

Resolution: Fixed

Fixed in 0.21.4-dev

 Plugman support for referencing Android libraries
 -

 Key: CB-6698
 URL: https://issues.apache.org/jira/browse/CB-6698
 Project: Apache Cordova
  Issue Type: New Feature
  Components: Plugman
Reporter: Martin Bektchiev
Assignee: Martin Bektchiev

 Make plugman capable of referencing an Android library project from within a 
 plugin. 
 Currently there's no viable way to do it and it is becoming common to try to 
 circumvent this limitation by abusing *plugin.xml* to (try to) merge a 
 library's resources, code and configuration. (see 
 https://github.com/wildabeast/BarcodeScanner)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6953) Error on building android project. Semicolon expected

2014-06-17 Thread Andrew Grieve (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033848#comment-14033848
 ] 

Andrew Grieve commented on CB-6953:
---

This happens because your project name starts with a number. You can work 
around it by having it not start with a number, but we should change our tools 
to catch this early.

 Error on building android project. Semicolon expected
 -

 Key: CB-6953
 URL: https://issues.apache.org/jira/browse/CB-6953
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, CLI
Affects Versions: 3.5.0
 Environment: Windows 7 64bit
Reporter: Rick Gommers
 Fix For: 3.6.0


 I just installed Cordova 3.5.0-0.2.4.
 Created fresh android project, tried to run it and this was the result:
 -compile:
 [javac] Compiling 3 source files to 
 C:\CordovaProjects\menukaart\platforms\android\ant-build\classes
 [javac] 
 C:\CordovaProjects\menukaart\platforms\android\src\com\23ivh12b3b4\menukaart\MenuKaart.java:20:
  error: ';' expected
 [javac] package com.23ivh12b3b4.menukaart;
 [javac]^
 [javac] 
 C:\CordovaProjects\menukaart\platforms\android\ant-gen\com\23ivh12b3b4\menukaart\BuildConfig.java:2:
  error: ';' expected
 [javac] package com.23ivh12b3b4.menukaart;
 [javac]^
 [javac] 
 C:\CordovaProjects\menukaart\platforms\android\ant-gen\com\23ivh12b3b4\menukaart\R.java:8:
  error: ';' expected
 [javac] package com.23ivh12b3b4.menukaart;
 [javac]^
 [javac] 3 errors
 BUILD FAILED
 C:\Eclipse\sdk\tools\ant\build.xml:720: The following error occurred while 
 executing this line:
 C:\Eclipse\sdk\tools\ant\build.xml:734: Compile failed; see the compiler 
 error output for details.
 Total time: 3 seconds
 C:\CordovaProjects\menukaart\platforms\android\cordova\node_modules\q\q.js:126
 throw e;
   ^
 Error code 1 for command: cmd with args: 
 /s,/c,ant,debug,-f,C:\CordovaProjects\menukaart\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-
 gen
 Command finished with error code 8: 
 C:\CordovaProjects\menukaart\platforms\android\cordova\run.bat
 Error: C:\CordovaProjects\menukaart\platforms\android\cordova\run.bat: 
 Command failed with exit code 8
 at ChildProcess.whenDone 
 (C:\Users\RICKGO~1\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
 at ChildProcess.EventEmitter.emit (events.js:98:17)
 at maybeClose (child_process.js:735:16)
 at Process.ChildProcess._handle.onexit (child_process.js:802:5)
 C:\CordovaProjects\menukaartcordova -v
 3.5.0-0.2.4



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6956) cordova platform update wp8 fails

2014-06-17 Thread DotNetWise (JIRA)
DotNetWise created CB-6956:
--

 Summary: cordova platform update wp8 fails
 Key: CB-6956
 URL: https://issues.apache.org/jira/browse/CB-6956
 Project: Apache Cordova
  Issue Type: Bug
  Components: CordovaJS
Affects Versions: 3.5.0, 3.4.0, 3.3.0, 3.2.0
 Environment: Windows / WP8
Reporter: DotNetWise
Priority: Blocker


https://github.com/phonegap/phonegap-cli/issues/235#issuecomment-46311294



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-5294) File input element not opening file picker in Android 4.4

2014-06-17 Thread Ian Clelland (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-5294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033857#comment-14033857
 ] 

Ian Clelland commented on CB-5294:
--

I see the same behaviour as Mike, on my N7 (4.4.3, KTU84L, Chrome 33.0.0.0). 
The files are renamed -- I don't know if that is a privacy measure, to avoid 
leaking information about the device or user -- but the information is always 
there.

I can get at the file through remote inspector:

{code}
› f = document.forms[0]
  ▶ form​…​/form​
› fe = f.children[0]
  input type=​file​
› fe.value
  C:\fakepath\image%3A2438
› fe.files[0]
  ▼ File {webkitRelativePath: , lastModifiedDate: Fri May 09 2014 14:53:33 
GMT-0400 (EDT), name: image%3A2438, type: , size: 8079…}
▶ lastModifiedDate: Fri May 09 2014 14:53:33 GMT-0400 (EDT)
  name: image%3A2438
  size: 8079
  type: 
  webkitRelativePath: 
▶ __proto__: File
{code}

{{C:\fakepath\image%3A2438}} is amusing, and is what makes me think that 
Chrome is deliberately obscuring the filenames: just making up *something* 
using the last filename component that looks like a full path.

 File input element not opening file picker in Android 4.4
 -

 Key: CB-5294
 URL: https://issues.apache.org/jira/browse/CB-5294
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android
Affects Versions: 3.1.0
 Environment: Android 4.4.2, partially fixed in Android 4.4.3
Reporter: Paul Kane
Assignee: Ian Clelland

 The file input field doesn't respond when clicked/tapped in Android 4.4. 
 Works fine in previous Android versions. This is regardless of whether the 
 Target Level is set to 18 or 19.
 To reproduce, I created a fresh Cordova 3.1.0 project for Android. The only 
 modification I made to the default (placeholder) index.html file was adding a 
 form element with a single input type=file element inside. Clicking the 
 Choose File button does nothing. No Logcat output or errors. Normally at 
 this point a dialogue would open allowing me to select an image from the 
 gallery or take a picture, which is what happens in older Android versions.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CB-5294) File input element not opening file picker in Android 4.4

2014-06-17 Thread Ian Clelland (JIRA)

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

Ian Clelland updated CB-5294:
-

Assignee: Joe Bowser  (was: Ian Clelland)

 File input element not opening file picker in Android 4.4
 -

 Key: CB-5294
 URL: https://issues.apache.org/jira/browse/CB-5294
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android
Affects Versions: 3.1.0
 Environment: Android 4.4.2, partially fixed in Android 4.4.3
Reporter: Paul Kane
Assignee: Joe Bowser

 The file input field doesn't respond when clicked/tapped in Android 4.4. 
 Works fine in previous Android versions. This is regardless of whether the 
 Target Level is set to 18 or 19.
 To reproduce, I created a fresh Cordova 3.1.0 project for Android. The only 
 modification I made to the default (placeholder) index.html file was adding a 
 form element with a single input type=file element inside. Clicking the 
 Choose File button does nothing. No Logcat output or errors. Normally at 
 this point a dialogue would open allowing me to select an image from the 
 gallery or take a picture, which is what happens in older Android versions.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6936) app crashes if webview is destroyed while dialog box open

2014-06-17 Thread Shingo Toda (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033861#comment-14033861
 ] 

Shingo Toda commented on CB-6936:
-

Thanks Joe very much for your advice.

Actually I want to fix this problem as soon as possible. If you are OK,  could 
you confirm that modification to Notification.java should work fine and does 
not harm the other plugins (if your advice for destroyed WebView check is 
incorporated)?

Also which one of the 'core' plugins do you know have this issue?

The patch would be made by us and used internally but I hope the solution will 
be found and it will be incorporated into future versions.

 app crashes if webview is destroyed while dialog box open
 -

 Key: CB-6936
 URL: https://issues.apache.org/jira/browse/CB-6936
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android
Affects Versions: 3.4.0
 Environment: Android 4.x on physical device
 Or any Android environment
Reporter: Shingo Toda
Assignee: Joe Bowser
Priority: Minor

 We have an Android application which implements an embedded WebView 
 container in which it executes customer Cordova apps.
 Under certain conditions our container needs to terminate the customer app, 
 and during this termination it calls {{CordovaWebView.destroy()}} to disable 
 CordovaWebView.
 But application may entirely crash during this termination in some scenarios. 
 For example:
 # call {{navigator.notification.alert}}, {{confirm}} or {{prompt}} and leave 
 popup dialog open
 # this termination is done for some reason while dialog box is till open
 # all views on CordovaWebView are released but dialog box still remains
 # attempt to close dialog by pressing button in the dialog
 # application crashes with Unknown exception.
 {code}
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176): 81508: Unknown exception 
 occurred.
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176): java.lang.NullPointerException
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 android.webkit.WebView.setNetworkAvailable(WebView.java:2639)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue$OnlineEventsBridgeMode$1.run(NativeToJsMessageQueue.java:305)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 android.app.Activity.runOnUiThread(Activity.java:4175)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue$OnlineEventsBridgeMode.onNativeToJsMessageAvailable(NativeToJsMessageQueue.java:313)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue.enqueueMessage(NativeToJsMessageQueue.java:253)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.NativeToJsMessageQueue.addPluginResult(NativeToJsMessageQueue.java:246)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.CordovaWebView.sendPluginResult(CordovaWebView.java:572)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.CallbackContext.sendPluginResult(CallbackContext.java:64)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 org.apache.cordova.dialogs.Notification$1$1.onClick(Notification.java:150)
 06-13 21:45:19.765: E/FSP_INTS-MAPS_AG(11176):at 
 com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:167)
 {code}
 h2. Problem
 Obviously CordovaWebView is already not available but dialog still exists. If 
 a user press button in dialog, {{onClick()}} gets called and consequently 
 {{CordovaWebView.setNetworkAvailable()}} gets called to send message from 
 queue to JavaScript even though WebView is already destroyed. As a result, 
 entire application crashes.
 h3. Workaround
 We made a method to check if WebView is destroyed or not.
 {code}
 private boolean isWebViewDestroyed() {
   final String url = webView.getUrl();
   if (url == null ||
   url.equals(about:blank)) {
   return true;
   } else {
   return false;
   }
 }
 {code}
 And check this before {{callbackContext.sendPluginResult()}} is called.
 {code}
 public synchronized void alert(final String message, final String title, 
 final String buttonLabel, final CallbackContext callbackContext) {
 final CordovaInterface cordova = this.cordova;
 Runnable runnable = new Runnable() {
 public void run() {
 AlertDialog.Builder dlg = new 
 AlertDialog.Builder(cordova.getActivity());
 dlg.setMessage(message);
 dlg.setTitle(title);
 dlg.setCancelable(true);
 dlg.setPositiveButton(buttonLabel,
 new 

[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP

2014-06-17 Thread Staci Cooper (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033878#comment-14033878
 ] 

Staci Cooper commented on CB-6924:
--

I've looked into this with Visual Studio's memory profiler and saw that the 
leak was an issue with the CordovaView. I thought that I had it isolated to the 
CordovaBrowser_Navigated handler, which injects scripts for the 
BrowserDecorators. I narrowed it down to ConsoleHelper, and suspected that the 
issue was related to the OnServiceClosing handler preventing garbage collection 
of the entire Main Page. Commenting out that section cleaned the leak. But 
after playing around with it for awhile and coming back to the code I wasn't 
able to recreate it. I must have been doing something else as well.

I noticed that the CordovaView has an 'IsBrowserInitialized' bool to prevent 
data clearing during page transitions. It is evaluated during the 
CordovaBrowser_Loaded handler, which returns if it is true and then sets it to 
true before continuing. Is the purpose of this to prevent the CordovaView from 
being reconstructed every time MainPage is loaded? (Which is currently the 
case). Or is this expected behavior?

 Memory leak navigating between native and hybrid pages in WP
 

 Key: CB-6924
 URL: https://issues.apache.org/jira/browse/CB-6924
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: Master
Reporter: Staci Cooper
Assignee: Jesse MacFadyen
 Attachments: memleak.zip


 Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the 
 start page. Then give it a button to navigate to the Cordova page, 
 MainPage.xaml
 Launch application to opening page (native).
 Click button to go to Cordova page.
 Click hardware back button to go to opening page.
 Repeat 4 times.
 When inspecting the memory profile, you see a steady increase in memory, and 
 5 copies of MainPage which have not been garbage collected (even if you force 
 garbage collection).
 If this is done enough times the app crashes due to surpassing memory limit.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6958) Port camera tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)
Staci Cooper created CB-6958:


 Summary: Port camera tests to plugin-test-framework
 Key: CB-6958
 URL: https://issues.apache.org/jira/browse/CB-6958
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Camera
Reporter: Staci Cooper
Assignee: Staci Cooper






--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6957) Battery tests need to be ported to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)
Staci Cooper created CB-6957:


 Summary: Battery tests need to be ported to plugin-test-framework
 Key: CB-6957
 URL: https://issues.apache.org/jira/browse/CB-6957
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Battery Status
Reporter: Staci Cooper
Assignee: Staci Cooper






--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6959) Port capture tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)
Staci Cooper created CB-6959:


 Summary: Port capture tests to plugin-test-framework
 Key: CB-6959
 URL: https://issues.apache.org/jira/browse/CB-6959
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Camera
Reporter: Staci Cooper
Assignee: Staci Cooper
Priority: Minor






--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6960) Port compass tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)
Staci Cooper created CB-6960:


 Summary: Port compass tests to plugin-test-framework
 Key: CB-6960
 URL: https://issues.apache.org/jira/browse/CB-6960
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Device Orientation
Reporter: Staci Cooper
Assignee: Staci Cooper
Priority: Minor






--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CB-6959) Port capture tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)

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

Staci Cooper updated CB-6959:
-

Component/s: (was: Plugin Camera)
 Plugin Media Capture

 Port capture tests to plugin-test-framework
 ---

 Key: CB-6959
 URL: https://issues.apache.org/jira/browse/CB-6959
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Media Capture
Reporter: Staci Cooper
Assignee: Staci Cooper
Priority: Minor





--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6961) Port file-transfer tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)
Staci Cooper created CB-6961:


 Summary: Port file-transfer tests to plugin-test-framework
 Key: CB-6961
 URL: https://issues.apache.org/jira/browse/CB-6961
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin File Transfer
Reporter: Staci Cooper
Assignee: Staci Cooper
Priority: Minor






--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6963) Port media tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)
Staci Cooper created CB-6963:


 Summary: Port media tests to plugin-test-framework
 Key: CB-6963
 URL: https://issues.apache.org/jira/browse/CB-6963
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Media
Reporter: Staci Cooper
Assignee: Staci Cooper
Priority: Minor






--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6964) Port network tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)
Staci Cooper created CB-6964:


 Summary: Port network tests to plugin-test-framework
 Key: CB-6964
 URL: https://issues.apache.org/jira/browse/CB-6964
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Media
Reporter: Staci Cooper
Assignee: Staci Cooper
Priority: Minor






--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6962) Port globalization tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)
Staci Cooper created CB-6962:


 Summary: Port globalization tests to plugin-test-framework
 Key: CB-6962
 URL: https://issues.apache.org/jira/browse/CB-6962
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Globalization
Reporter: Staci Cooper
Assignee: Staci Cooper
Priority: Minor






--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CB-6964) Port network tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)

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

Staci Cooper updated CB-6964:
-

Component/s: (was: Plugin Media)
 Plugin Network Information

 Port network tests to plugin-test-framework
 ---

 Key: CB-6964
 URL: https://issues.apache.org/jira/browse/CB-6964
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Network Information
Reporter: Staci Cooper
Assignee: Staci Cooper
Priority: Minor





--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6965) Port notification tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)
Staci Cooper created CB-6965:


 Summary: Port notification tests to plugin-test-framework
 Key: CB-6965
 URL: https://issues.apache.org/jira/browse/CB-6965
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Dialogs
Reporter: Staci Cooper
Assignee: Staci Cooper
Priority: Minor






--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6966) Port vibration tests to plugin-test-framework

2014-06-17 Thread Staci Cooper (JIRA)
Staci Cooper created CB-6966:


 Summary: Port vibration tests to plugin-test-framework
 Key: CB-6966
 URL: https://issues.apache.org/jira/browse/CB-6966
 Project: Apache Cordova
  Issue Type: Test
  Components: Plugin Vibration
Reporter: Staci Cooper
Assignee: Staci Cooper
Priority: Minor






--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (CB-6924) Memory leak navigating between native and hybrid pages in WP

2014-06-17 Thread Staci Cooper (JIRA)

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

Staci Cooper reassigned CB-6924:


Assignee: Staci Cooper  (was: Jesse MacFadyen)

 Memory leak navigating between native and hybrid pages in WP
 

 Key: CB-6924
 URL: https://issues.apache.org/jira/browse/CB-6924
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: Master
Reporter: Staci Cooper
Assignee: Staci Cooper
 Attachments: memleak.zip


 Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the 
 start page. Then give it a button to navigate to the Cordova page, 
 MainPage.xaml
 Launch application to opening page (native).
 Click button to go to Cordova page.
 Click hardware back button to go to opening page.
 Repeat 4 times.
 When inspecting the memory profile, you see a steady increase in memory, and 
 5 copies of MainPage which have not been garbage collected (even if you force 
 garbage collection).
 If this is done enough times the app crashes due to surpassing memory limit.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP

2014-06-17 Thread Staci Cooper (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14033985#comment-14033985
 ] 

Staci Cooper commented on CB-6924:
--

I did find the source of the leak. It's the event handlers added to the 
PhoneApplicationService.Current in both CordovaView.xaml.cs and in 
ConsoleHelper.cs. To fix it I want to unwire those event handlers in the 
unloaded event for CordovaView. My question is, does that fit in with the 
intended behavior of MainPage?

 Memory leak navigating between native and hybrid pages in WP
 

 Key: CB-6924
 URL: https://issues.apache.org/jira/browse/CB-6924
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: Master
Reporter: Staci Cooper
Assignee: Staci Cooper
 Attachments: memleak.zip


 Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the 
 start page. Then give it a button to navigate to the Cordova page, 
 MainPage.xaml
 Launch application to opening page (native).
 Click button to go to Cordova page.
 Click hardware back button to go to opening page.
 Repeat 4 times.
 When inspecting the memory profile, you see a steady increase in memory, and 
 5 copies of MainPage which have not been garbage collected (even if you force 
 garbage collection).
 If this is done enough times the app crashes due to surpassing memory limit.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


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

2014-06-17 Thread Matt Grande (JIRA)

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

Matt Grande updated CB-6967:


Description: 
Blackberry {{FileTransfer.download}} does not seem to work with {{File}} at 
version 1.2.0 (Jan 5, 2014).

*Steps to reproduce*

# Checkout 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}}.

  was:
Blackberry {{FileTransfer.download}}s do not seem to work with {{File}} at 
version 1.2.0 (Jan 5, 2014).

*Steps to reproduce*

# Checkout 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}}.


 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

 Blackberry {{FileTransfer.download}} does not seem to work with {{File}} at 
 version 1.2.0 (Jan 5, 2014).
 *Steps to reproduce*
 # Checkout 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.2#6252)


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

2014-06-17 Thread Matt Grande (JIRA)
Matt Grande created CB-6967:
---

 Summary: 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


Blackberry {{FileTransfer.download}}s do not seem to work with {{File}} at 
version 1.2.0 (Jan 5, 2014).

*Steps to reproduce*

# Checkout 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.2#6252)


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

2014-06-17 Thread Matt Grande (JIRA)

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

Matt Grande updated CB-6967:


Description: 
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}}.

  was:
Blackberry {{FileTransfer.download}} does not seem to work with {{File}} at 
version 1.2.0 (Jan 5, 2014).

*Steps to reproduce*

# Checkout 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}}.


 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

 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.2#6252)


[jira] [Commented] (CB-6954) Share events.js between cordova and plugman

2014-06-17 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034022#comment-14034022
 ] 

ASF subversion and git services commented on CB-6954:
-

Commit 6f7a67a78ceb9a6957e9b665ff935c72b2398c09 in cordova-lib's branch 
refs/heads/master from sgrebnov
[ https://git-wip-us.apache.org/repos/asf?p=cordova-lib.git;h=6f7a67a ]

CB-6954: Share events.js between cordova and plugman

github: close #31


 Share events.js between cordova and plugman
 ---

 Key: CB-6954
 URL: https://issues.apache.org/jira/browse/CB-6954
 Project: Apache Cordova
  Issue Type: Bug
  Components: CordovaLib
Reporter: Sergey Grebnov
Assignee: Sergey Grebnov
  Labels: cordova, cordova-lib, plugman, refactoring

 Currently there are two instances of events.js under cordova and plugman 
 folders which provide exactly the same functionality.
 https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/plugman/events.js
 https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/events.js
 This is common functionality which must be shared among cordova and plugman 
 so must be moved to some common folder (src/events.js???).  Similar to 
 CordovaError and xml-helpers.js
 It is also required to be able to reference to 'events' from shared code - as 
 an example, common Hooks code which emits messages via 'events'.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6954) Share events.js between cordova and plugman

2014-06-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034023#comment-14034023
 ] 

ASF GitHub Bot commented on CB-6954:


Github user asfgit closed the pull request at:

https://github.com/apache/cordova-lib/pull/31


 Share events.js between cordova and plugman
 ---

 Key: CB-6954
 URL: https://issues.apache.org/jira/browse/CB-6954
 Project: Apache Cordova
  Issue Type: Bug
  Components: CordovaLib
Reporter: Sergey Grebnov
Assignee: Sergey Grebnov
  Labels: cordova, cordova-lib, plugman, refactoring

 Currently there are two instances of events.js under cordova and plugman 
 folders which provide exactly the same functionality.
 https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/plugman/events.js
 https://github.com/apache/cordova-lib/blob/master/cordova-lib/src/cordova/events.js
 This is common functionality which must be shared among cordova and plugman 
 so must be moved to some common folder (src/events.js???).  Similar to 
 CordovaError and xml-helpers.js
 It is also required to be able to reference to 'events' from shared code - as 
 an example, common Hooks code which emits messages via 'events'.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP

2014-06-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034102#comment-14034102
 ] 

ASF GitHub Bot commented on CB-6924:


Github user stacic commented on the pull request:

https://github.com/apache/cordova-wp8/pull/41#issuecomment-46341089
  
I built mobile-spec with these changes and didn't see any new tests failing.


 Memory leak navigating between native and hybrid pages in WP
 

 Key: CB-6924
 URL: https://issues.apache.org/jira/browse/CB-6924
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: Master
Reporter: Staci Cooper
Assignee: Staci Cooper
 Attachments: memleak.zip


 Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the 
 start page. Then give it a button to navigate to the Cordova page, 
 MainPage.xaml
 Launch application to opening page (native).
 Click button to go to Cordova page.
 Click hardware back button to go to opening page.
 Repeat 4 times.
 When inspecting the memory profile, you see a steady increase in memory, and 
 5 copies of MainPage which have not been garbage collected (even if you force 
 garbage collection).
 If this is done enough times the app crashes due to surpassing memory limit.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP

2014-06-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034101#comment-14034101
 ] 

ASF GitHub Bot commented on CB-6924:


GitHub user stacic opened a pull request:

https://github.com/apache/cordova-wp8/pull/41

CB-6924 Fixed memory leak in WP page navigation

Occurred when navigating back and forth from native to hybrid page.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/stacic/cordova-wp8 CB-6924

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-wp8/pull/41.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #41


commit 0c5f0e393db026633afd89fec0684c0021d19df6
Author: Staci Cooper smcoo...@us.ibm.com
Date:   2014-06-17T17:43:54Z

CB-6924 Fixed memory leak in WP page navigation

Occurred when navigating back and forth from native to hybrid page.




 Memory leak navigating between native and hybrid pages in WP
 

 Key: CB-6924
 URL: https://issues.apache.org/jira/browse/CB-6924
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: Master
Reporter: Staci Cooper
Assignee: Staci Cooper
 Attachments: memleak.zip


 Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the 
 start page. Then give it a button to navigate to the Cordova page, 
 MainPage.xaml
 Launch application to opening page (native).
 Click button to go to Cordova page.
 Click hardware back button to go to opening page.
 Repeat 4 times.
 When inspecting the memory profile, you see a steady increase in memory, and 
 5 copies of MainPage which have not been garbage collected (even if you force 
 garbage collection).
 If this is done enough times the app crashes due to surpassing memory limit.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CB-6230) InAppBrowser closes after opening, instead of before

2014-06-17 Thread Jacob Weber (JIRA)

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

Jacob Weber updated CB-6230:


Affects Version/s: 3.5.0

 InAppBrowser closes after opening, instead of before
 

 Key: CB-6230
 URL: https://issues.apache.org/jira/browse/CB-6230
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, Plugin InAppBrowser
Affects Versions: 3.4.0, 3.5.0
Reporter: Jacob Weber

 In Cordova 3.4, with InAppBrowser 0.3.3, create a new project using the CLI. 
 In www/js/index.js, make the following change:
 {noformat}
 onDeviceReady: function() {
 app.receivedEvent('deviceready');
 document.addEventListener('click', function() {
 if (window.myWindow) window.myWindow.close();
   window.myWindow = window.open('http://www.google.com', _blank);
   });
 },
 {noformat}
 Tap the page once, and a browser will appear. Close the browser. Then tap the 
 app again. This time the browser will appear for a split second, then close 
 right away. The close() call seems to be happening after the subsequent 
 open() call, instead of before it.
 This was working in 3.3, with InAppBrowser 0.2.5.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6230) InAppBrowser closes after opening, instead of before

2014-06-17 Thread Jacob Weber (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034121#comment-14034121
 ] 

Jacob Weber commented on CB-6230:
-

Ping.

 InAppBrowser closes after opening, instead of before
 

 Key: CB-6230
 URL: https://issues.apache.org/jira/browse/CB-6230
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, Plugin InAppBrowser
Affects Versions: 3.4.0, 3.5.0
Reporter: Jacob Weber

 In Cordova 3.4, with InAppBrowser 0.3.3, create a new project using the CLI. 
 In www/js/index.js, make the following change:
 {noformat}
 onDeviceReady: function() {
 app.receivedEvent('deviceready');
 document.addEventListener('click', function() {
 if (window.myWindow) window.myWindow.close();
   window.myWindow = window.open('http://www.google.com', _blank);
   });
 },
 {noformat}
 Tap the page once, and a browser will appear. Close the browser. Then tap the 
 app again. This time the browser will appear for a split second, then close 
 right away. The close() call seems to be happening after the subsequent 
 open() call, instead of before it.
 This was working in 3.3, with InAppBrowser 0.2.5.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP

2014-06-17 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034141#comment-14034141
 ] 

ASF subversion and git services commented on CB-6924:
-

Commit 0c5f0e393db026633afd89fec0684c0021d19df6 in cordova-wp8's branch 
refs/heads/master from [~stacic]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-wp8.git;h=0c5f0e3 ]

CB-6924 Fixed memory leak in WP page navigation

Occurred when navigating back and forth from native to hybrid page.


 Memory leak navigating between native and hybrid pages in WP
 

 Key: CB-6924
 URL: https://issues.apache.org/jira/browse/CB-6924
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: Master
Reporter: Staci Cooper
Assignee: Staci Cooper
 Attachments: memleak.zip


 Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the 
 start page. Then give it a button to navigate to the Cordova page, 
 MainPage.xaml
 Launch application to opening page (native).
 Click button to go to Cordova page.
 Click hardware back button to go to opening page.
 Repeat 4 times.
 When inspecting the memory profile, you see a steady increase in memory, and 
 5 copies of MainPage which have not been garbage collected (even if you force 
 garbage collection).
 If this is done enough times the app crashes due to surpassing memory limit.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6924) Memory leak navigating between native and hybrid pages in WP

2014-06-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034142#comment-14034142
 ] 

ASF GitHub Bot commented on CB-6924:


Github user asfgit closed the pull request at:

https://github.com/apache/cordova-wp8/pull/41


 Memory leak navigating between native and hybrid pages in WP
 

 Key: CB-6924
 URL: https://issues.apache.org/jira/browse/CB-6924
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: Master
Reporter: Staci Cooper
Assignee: Staci Cooper
 Attachments: memleak.zip


 Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the 
 start page. Then give it a button to navigate to the Cordova page, 
 MainPage.xaml
 Launch application to opening page (native).
 Click button to go to Cordova page.
 Click hardware back button to go to opening page.
 Repeat 4 times.
 When inspecting the memory profile, you see a steady increase in memory, and 
 5 copies of MainPage which have not been garbage collected (even if you force 
 garbage collection).
 If this is done enough times the app crashes due to surpassing memory limit.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6873) Phase out FileHelper.java

2014-06-17 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034165#comment-14034165
 ] 

ASF subversion and git services commented on CB-6873:
-

Commit 3b27cd093ba1315e1445e6b071e4168a3afab659 in cordova-android's branch 
refs/heads/4.0.x from [~bowserj]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;h=3b27cd0 ]

CB-6873: Removing from cordova-android, still in the camera plugin


 Phase out FileHelper.java
 -

 Key: CB-6873
 URL: https://issues.apache.org/jira/browse/CB-6873
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, Plugin Camera
Reporter: Joe Bowser
 Fix For: 4.0.0


 The CordovaResourceApi isn't fully used by all the plugins, and worse yet, 
 for some reason we're copying the same class in numerous plugins, including 
 the camera.  We need to remove FileHelper from the plugin and instead just 
 use the CordovaResourceApi.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (CB-6924) Memory leak navigating between native and hybrid pages in WP

2014-06-17 Thread Staci Cooper (JIRA)

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

Staci Cooper resolved CB-6924.
--

Resolution: Fixed

Thanks for merging! Marking as resolved

 Memory leak navigating between native and hybrid pages in WP
 

 Key: CB-6924
 URL: https://issues.apache.org/jira/browse/CB-6924
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: Master
Reporter: Staci Cooper
Assignee: Staci Cooper
 Attachments: memleak.zip


 Context: Modify HelloWorld Cordova app for WP8 by adding a native page as the 
 start page. Then give it a button to navigate to the Cordova page, 
 MainPage.xaml
 Launch application to opening page (native).
 Click button to go to Cordova page.
 Click hardware back button to go to opening page.
 Repeat 4 times.
 When inspecting the memory profile, you see a steady increase in memory, and 
 5 copies of MainPage which have not been garbage collected (even if you force 
 garbage collection).
 If this is done enough times the app crashes due to surpassing memory limit.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CB-6944) Media-Capture plugin on Android returns Canceled error when Accept image is selected

2014-06-17 Thread James White (JIRA)

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

James White updated CB-6944:


Environment: 
Android 2.3.x,4.0.x, 4.1, 4.2, 4.3, 4.4
Cordova 3.5.0-0.2.4

Plugins:
org.apache.cordova.file 1.2.0 File
org.apache.cordova.media-capture 0.3.1 Capture

  was:
Android 4.0.x, 4.1, 4.2, 4.3, 4.4
Cordova 3.5.0-0.2.4

Plugins:
org.apache.cordova.file 1.2.0 File
org.apache.cordova.media-capture 0.3.1 Capture


 Media-Capture plugin on Android returns Canceled error when Accept image is 
 selected
 

 Key: CB-6944
 URL: https://issues.apache.org/jira/browse/CB-6944
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin Media Capture
Affects Versions: 3.5.0
 Environment: Android 2.3.x,4.0.x, 4.1, 4.2, 4.3, 4.4
 Cordova 3.5.0-0.2.4
 Plugins:
 org.apache.cordova.file 1.2.0 File
 org.apache.cordova.media-capture 0.3.1 Capture
Reporter: James White
Priority: Critical
 Attachments: index.js


 Attempting to run the following:
 {noformat}
 navigator.device.capture.captureImage(function(mediaFiles) { 
 alert('success?');  },
 function(error)
 {
   navigator.notification.alert('Error code: ' + error.code + ' = ' + 
 error.message, null, 'Capture Error');
  },{ limit:1 });
 {noformat}
 always invokes the error callback with the object:
 {noformat}
 {message:Canceled., code:3}
 {noformat}
 even if the accept image option is selected.
 Android 4.4 behaves differently, where tapping on the accept image option 
 does nothing and instead of returning with the error, it remains on the 
 captured photo view.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (CB-6705) platform add requires platforms and plugins dirs to exist

2014-06-17 Thread Jesse MacFadyen (JIRA)

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

Jesse MacFadyen resolved CB-6705.
-

   Resolution: Fixed
Fix Version/s: 3.5.0

 platform add requires platforms and plugins dirs to exist
 -

 Key: CB-6705
 URL: https://issues.apache.org/jira/browse/CB-6705
 Project: Apache Cordova
  Issue Type: Bug
  Components: CLI
Affects Versions: 3.4.0
 Environment: Ubuntu 12
Reporter: Sebastien Lorber
Assignee: Jesse MacFadyen
Priority: Trivial
 Fix For: 3.5.0

   Original Estimate: 2h
  Remaining Estimate: 2h

 {code}
 sebastien@sebastien-xps:stample-Phonegap (master *+)$ cordova platform add 
 android
 Creating android project...
 Creating Cordova project for the Android platform:
   Path: platforms/android
   Package: co.stample
   Name: stample-phonegap
   Android target: android-19
 Copying template files...
 shell.js: internal error
 Error: ENOENT, no such file or directory 'platforms/android/assets'
 at Object.fs.mkdirSync (fs.js:642:18)
 at 
 /home/sebastien/.cordova/lib/android/cordova/3.4.0/bin/node_modules/shelljs/src/cp.js:173:14
 at Array.forEach (native)
 at Object._cp 
 (/home/sebastien/.cordova/lib/android/cordova/3.4.0/bin/node_modules/shelljs/src/cp.js:156:11)
 at Object.cp 
 (/home/sebastien/.cordova/lib/android/cordova/3.4.0/bin/node_modules/shelljs/src/common.js:172:23)
 at 
 /home/sebastien/.cordova/lib/android/cordova/3.4.0/bin/lib/create.js:166:19
 at setShellFatal 
 (/home/sebastien/.cordova/lib/android/cordova/3.4.0/bin/lib/create.js:45:5)
 at 
 /home/sebastien/.cordova/lib/android/cordova/3.4.0/bin/lib/create.js:164:9
 at _fulfilled 
 (/home/sebastien/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:798:54)
 at self.promiseDispatch.done 
 (/home/sebastien/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:827:30)
 Error: /home/sebastien/.cordova/lib/android/cordova/3.4.0/bin/create: Command 
 failed with exit code 1
 at ChildProcess.whenDone 
 (/home/sebastien/Desktop/devhome/install/node-v0.10.24-linux-x64/lib/node_modules/cordova/src/superspawn.js:126:23)
 at ChildProcess.EventEmitter.emit (events.js:98:17)
 at maybeClose (child_process.js:735:16)
 at Process.ChildProcess._handle.onexit (child_process.js:802:5)
 {code}
 This seems to be caused because I choose to not version control the platforms 
 and plugins folders.
 If I do mkdir platforms I get the following error
 {code}
 sebastien@sebastien-xps:stample-Phonegap (master *+)$ mkdir platforms
 sebastien@sebastien-xps:stample-Phonegap (master *+)$ cordova platform add 
 android
 Creating android project...
 Creating Cordova project for the Android platform:
   Path: platforms/android
   Package: co.stample
   Name: stample-phonegap
   Android target: android-19
 Copying template files...
 Running: android update project --subprojects --path platforms/android 
 --target android-19 --library CordovaLib
 Resolved location of library project to: 
 /home/sebastien/Desktop/stample-Phonegap/platforms/android/CordovaLib
 Updated and renamed default.properties to project.properties
 Updated local.properties
 No project name specified, using Activity name 'stamplephonegap'.
 If you wish to change it, edit the first line of build.xml.
 Added file platforms/android/build.xml
 Added file platforms/android/proguard-project.txt
 Updated project.properties
 Updated local.properties
 No project name specified, using project folder name 'CordovaLib'.
 If you wish to change it, edit the first line of build.xml.
 Added file platforms/android/CordovaLib/build.xml
 Added file platforms/android/CordovaLib/proguard-project.txt
 Project successfully created.
 Error: ENOENT, no such file or directory 
 '/home/sebastien/Desktop/stample-Phonegap/plugins/android.json'
 at Object.fs.openSync (fs.js:427:18)
 at Object.fs.writeFileSync (fs.js:966:15)
 at Object.save_platform_json 
 (/home/sebastien/Desktop/devhome/install/node-v0.10.24-linux-x64/lib/node_modules/cordova/node_modules/plugman/src/util/config-changes.js:435:8)
 at PlatformMunger_process [as process] 
 (/home/sebastien/Desktop/devhome/install/node-v0.10.24-linux-x64/lib/node_modules/cordova/node_modules/plugman/src/util/config-changes.js:367:13)
 at Object.exports.process 
 (/home/sebastien/Desktop/devhome/install/node-v0.10.24-linux-x64/lib/node_modules/cordova/node_modules/plugman/src/util/config-changes.js:78:12)
 at Object.handlePrepare 
 (/home/sebastien/Desktop/devhome/install/node-v0.10.24-linux-x64/lib/node_modules/cordova/node_modules/plugman/src/prepare.js:73:20)
 at 
 

[jira] [Commented] (CB-6953) Error on building android project. Semicolon expected

2014-06-17 Thread Rick Gommers (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034380#comment-14034380
 ] 

Rick Gommers commented on CB-6953:
--

Ok Andrew, thx for the heads up!

 Error on building android project. Semicolon expected
 -

 Key: CB-6953
 URL: https://issues.apache.org/jira/browse/CB-6953
 Project: Apache Cordova
  Issue Type: Bug
  Components: Android, CLI
Affects Versions: 3.5.0
 Environment: Windows 7 64bit
Reporter: Rick Gommers
 Fix For: 3.6.0


 I just installed Cordova 3.5.0-0.2.4.
 Created fresh android project, tried to run it and this was the result:
 -compile:
 [javac] Compiling 3 source files to 
 C:\CordovaProjects\menukaart\platforms\android\ant-build\classes
 [javac] 
 C:\CordovaProjects\menukaart\platforms\android\src\com\23ivh12b3b4\menukaart\MenuKaart.java:20:
  error: ';' expected
 [javac] package com.23ivh12b3b4.menukaart;
 [javac]^
 [javac] 
 C:\CordovaProjects\menukaart\platforms\android\ant-gen\com\23ivh12b3b4\menukaart\BuildConfig.java:2:
  error: ';' expected
 [javac] package com.23ivh12b3b4.menukaart;
 [javac]^
 [javac] 
 C:\CordovaProjects\menukaart\platforms\android\ant-gen\com\23ivh12b3b4\menukaart\R.java:8:
  error: ';' expected
 [javac] package com.23ivh12b3b4.menukaart;
 [javac]^
 [javac] 3 errors
 BUILD FAILED
 C:\Eclipse\sdk\tools\ant\build.xml:720: The following error occurred while 
 executing this line:
 C:\Eclipse\sdk\tools\ant\build.xml:734: Compile failed; see the compiler 
 error output for details.
 Total time: 3 seconds
 C:\CordovaProjects\menukaart\platforms\android\cordova\node_modules\q\q.js:126
 throw e;
   ^
 Error code 1 for command: cmd with args: 
 /s,/c,ant,debug,-f,C:\CordovaProjects\menukaart\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-
 gen
 Command finished with error code 8: 
 C:\CordovaProjects\menukaart\platforms\android\cordova\run.bat
 Error: C:\CordovaProjects\menukaart\platforms\android\cordova\run.bat: 
 Command failed with exit code 8
 at ChildProcess.whenDone 
 (C:\Users\RICKGO~1\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
 at ChildProcess.EventEmitter.emit (events.js:98:17)
 at maybeClose (child_process.js:735:16)
 at Process.ChildProcess._handle.onexit (child_process.js:802:5)
 C:\CordovaProjects\menukaartcordova -v
 3.5.0-0.2.4



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6968) fix bashism (source) in update script and bb10-ndk-version

2014-06-17 Thread Josh Soref (JIRA)
Josh Soref created CB-6968:
--

 Summary: fix bashism (source) in update script and bb10-ndk-version
 Key: CB-6968
 URL: https://issues.apache.org/jira/browse/CB-6968
 Project: Apache Cordova
  Issue Type: Bug
  Components: BlackBerry
Reporter: Josh Soref
Assignee: Josh Soref


Ubuntu/Debian use dash as sh, not bash, which causes bashisms to be a problem.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6968) fix bashism (source) in update script and bb10-ndk-version

2014-06-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034387#comment-14034387
 ] 

ASF GitHub Bot commented on CB-6968:


GitHub user jsoref opened a pull request:

https://github.com/apache/cordova-blackberry/pull/163

CB-6968 fix bashism (source) in update script and bb10-ndk-version



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/blackberry/cordova-blackberry cb_6968

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-blackberry/pull/163.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #163


commit 1b80eca4cceddb58ddaa8556e2fc5449556ab5b2
Author: Josh Soref jso...@blackberry.com
Date:   2014-06-17T21:19:06Z

CB-6968 fix bashism (source) in update script and bb10-ndk-version




 fix bashism (source) in update script and bb10-ndk-version
 --

 Key: CB-6968
 URL: https://issues.apache.org/jira/browse/CB-6968
 Project: Apache Cordova
  Issue Type: Bug
  Components: BlackBerry
Reporter: Josh Soref
Assignee: Josh Soref

 Ubuntu/Debian use dash as sh, not bash, which causes bashisms to be a problem.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-3445) Move Cordova-Android Build Setup to Gradle

2014-06-17 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-3445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034411#comment-14034411
 ] 

ASF subversion and git services commented on CB-3445:
-

Commit fa189b32348325b278575641b0bdd27b81cca002 in cordova-android's branch 
refs/heads/4.0.x from [~iclelland]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;h=fa189b3 ]

CB-3445: Add an initial set of Gradle build scripts

These scripts will build an android project, in debug and release mode.
They also support additional library projects, such as Crosswalk, being
added to libraries.gradle (and settings.gradle). A flag can be set in
libraries.gradle to enable multi-architecture builds.


 Move Cordova-Android Build Setup to Gradle
 --

 Key: CB-3445
 URL: https://issues.apache.org/jira/browse/CB-3445
 Project: Apache Cordova
  Issue Type: Improvement
  Components: Android
Reporter: Joe Bowser
Assignee: Ian Clelland
Priority: Minor

 Currently we're using ant for our setup, and our setup can break every time 
 that the Android SDK updates and change its build.xml.  However, the Android 
 Team has created Gradle to be more robust such that it doesn't have the same 
 problems as ant-based scripts.
 This also has the advantage of using Android Studio for development instead 
 of Eclipse, and the ability for us to bundle resources, which is something we 
 haven't been able to do before.
 Moving to Gradle has numerous advantages, but will break scripts, so this is 
 to be moved in the post-3.0 timeframe.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CB-6945) Make Camera plugin independent from File plugin on windows 8

2014-06-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-6945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14034705#comment-14034705
 ] 

ASF GitHub Bot commented on CB-6945:


Github user asfgit closed the pull request at:

https://github.com/apache/cordova-plugin-camera/pull/33


 Make Camera plugin independent from File plugin on windows 8
 

 Key: CB-6945
 URL: https://issues.apache.org/jira/browse/CB-6945
 Project: Apache Cordova
  Issue Type: Improvement
  Components: Plugin Camera, Windows 8
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: camera, dependency, file, windows8

 After resolving https://issues.apache.org/jira/browse/CB-6920 and 
 https://issues.apache.org/jira/browse/CB-6613 Camera plugin uses native 
 Windows 8 functions to manage files instead of File plugin.
 So file plugin dependency is excess and we can remove it.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (CB-6945) Make Camera plugin independent from File plugin on windows 8

2014-06-17 Thread Jesse MacFadyen (JIRA)

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

Jesse MacFadyen resolved CB-6945.
-

Resolution: Fixed

Thanks Vlad!

 Make Camera plugin independent from File plugin on windows 8
 

 Key: CB-6945
 URL: https://issues.apache.org/jira/browse/CB-6945
 Project: Apache Cordova
  Issue Type: Improvement
  Components: Plugin Camera, Windows 8
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: camera, dependency, file, windows8

 After resolving https://issues.apache.org/jira/browse/CB-6920 and 
 https://issues.apache.org/jira/browse/CB-6613 Camera plugin uses native 
 Windows 8 functions to manage files instead of File plugin.
 So file plugin dependency is excess and we can remove it.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (CB-2420) On Windows 8 , FileTransfer.upload ignores the fileKey and params options

2014-06-17 Thread Jesse MacFadyen (JIRA)

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

Jesse MacFadyen resolved CB-2420.
-

   Resolution: Fixed
Fix Version/s: 2.6.0

 On Windows 8 , FileTransfer.upload ignores the fileKey and params options
 -

 Key: CB-2420
 URL: https://issues.apache.org/jira/browse/CB-2420
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin File Transfer, Windows 8
Affects Versions: 2.4.0
Reporter: Youval Bronicki
Assignee: Jesse MacFadyen
 Fix For: 2.6.0


 The problem seems to be in FileTransferProxy, which simply ignores the 
 options array.
 Here's a partial correction (there are additional options in the array):
 *Old Code:*
 var blob = MSApp.createBlobFromRandomAccessStream(storageFile.contentType, 
 stream);
 var formData = new FormData();
 formData.append(source\;filename=\ + storageFile.name + \, blob);
 *New Code:*
 var fileKey = options[2];
 var fileName = options[3];
 var params = options[5];
  
 var blob = MSApp.createBlobFromRandomAccessStream(storageFile.contentType, 
 stream);
 var formData = new FormData();
 formData.append(fileKey, blob, fileName);
 for (var key in params)
   formData.append(key, params[key]);
  



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (CB-6932) Cannot build wp8 under Chinese (Simplified) System locale

2014-06-17 Thread Jesse MacFadyen (JIRA)

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

Jesse MacFadyen resolved CB-6932.
-

Resolution: Fixed

 Cannot build wp8 under Chinese (Simplified) System locale
 -

 Key: CB-6932
 URL: https://issues.apache.org/jira/browse/CB-6932
 Project: Apache Cordova
  Issue Type: Bug
  Components: WP8
Affects Versions: 3.6.0
 Environment: Windows 8.1, Simlified Chinese locale
Reporter: Vladimir Kotikov
Assignee: Jesse MacFadyen
  Labels: chinese, locale, wp8
 Fix For: 3.6.0


 *Steps to reproduce:*
 # Set Region  Administrative  Change System Locale to Chinese (Simplified, 
 China).
 # Restart machine.
 # cordova create hello
 # cd hello
 # cordova platform add wp8
 # cordova build wp8
 Error appears.
 {noformat}
 D:\PROJECTS\Temp\test-bom\platforms\wp8\App.xaml(1,1,1,1): error : Invalid 
 character in the given encoding. Line 1, position 1. 
 [D:\PROJECTS\Temp\test-bom\platforms\wp8\HelloCordova.csproj]
 {noformat}
 There is a malformed files that changed during create process for the wp8 
 project under the Chinese system locale. It looks like create.js is 
 interpreting the initial file header incorrectly with the Chinese system 
 locale, then printing it out to the file.
 Build will fail under a different System locale as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CB-6969) Fix failing Windows 8 File tests

2014-06-17 Thread Jesse MacFadyen (JIRA)
Jesse MacFadyen created CB-6969:
---

 Summary: Fix failing Windows 8 File tests
 Key: CB-6969
 URL: https://issues.apache.org/jira/browse/CB-6969
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin File, Windows 8
Affects Versions: 3.5.0
Reporter: Jesse MacFadyen
Assignee: Jesse MacFadyen
 Fix For: 3.6.0


Recent changes to the common js and mobile spec tests have resulted in many 
windows8 failing tests. Fix 'em!

These tests fail when run alone:

file.spec.9.5
file.spec.52
file.spec.106
file.spec.107
file.spec.108
file.spec.121
file.spec.122
file.spec.123
file.spec.124
file.spec.126
file.spec.128

These tests pass when run alone, but fail when run as part of the whole test 
suite:

file.spec.116
file.spec.117
file.spec.118
file.spec.119
file.spec.120
file.spec.125
file.spec.127
file.spec.129




--
This message was sent by Atlassian JIRA
(v6.2#6252)