[jira] [Commented] (CB-7281) cordova plugin add issues nonsense EACCESS error
[ https://issues.apache.org/jira/browse/CB-7281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618183#comment-14618183 ] Trevor Best commented on CB-7281: - The ~/.npm directory is owned by root so the command: $ sudo chmod 777 ~/.npm Will enable you to continue without having to sudo each time. cordova plugin add issues nonsense EACCESS error -- Key: CB-7281 URL: https://issues.apache.org/jira/browse/CB-7281 Project: Apache Cordova Issue Type: Bug Components: Plugins Environment: ubuntu 14.04 Reporter: teo On a freshly created test application targeted at android, which works fine. I ran: $ cordova plugin add nl.sylvain.cordova.osc Fetching plugin nl.sylvain.cordova.osc via plugin registry Error: EACCES, mkdir '/home/teo/tmp/npm-20870-r97koGWy' That doesn't make sense, as /home/teo is my home directory (I was running the above command as teo). There's no reason why that mkdir command should get an access denied error (if that's what EACCESS means). This worked: $ sudo cordova plugin add nl.sylvain.cordova.osc however, there's no reason why sudo should be needed. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-9332) Update `npm` and `semver` dependencies for cordova
Vladimir Kotikov created CB-9332: Summary: Update `npm` and `semver` dependencies for cordova Key: CB-9332 URL: https://issues.apache.org/jira/browse/CB-9332 Project: Apache Cordova Issue Type: Improvement Components: CordovaLib Reporter: Vladimir Kotikov Assignee: Vladimir Kotikov There are the following dependencies for cordova-lib are outdated and should be updated: * npm 1.3.4 to 2.7.5 * npmconf 0.1.16 to 2.1.1 * semver 2.0.11 to 4.3.3 However, the update was blocked due to issues with publishing to CPR and npm@1.3.4. Since the CPR going to became a read-only, we get a chance to update these dependencies. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-9333) Icon or splash screen file that has readonly attribute causes cordova prapare to fail
Roman Viskin created CB-9333: Summary: Icon or splash screen file that has readonly attribute causes cordova prapare to fail Key: CB-9333 URL: https://issues.apache.org/jira/browse/CB-9333 Project: Apache Cordova Issue Type: Bug Components: CLI Environment: Windows 8 Reporter: Roman Viskin Steps to reproduce: Create project. cordova platform add android --save Edit config.xml, add icon src=res/icon.png / Where res.icon.png is file with readonly attribute set. Run cordova prepare. Error: EPERM, operation not permitted error will raise, with attached stack trace. Remove read only attributre, run cordova prepare again. The prepare will run successfully. Bug: read only attribute should not cause the failure. --- at Object.fs.unlinkSync (fs.js:765:18) at android_parser.deleteDefaultResource (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:80:20) at android_parser.handleIcons (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:143:10) at android_parser.update_from_config (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:214:10) at android_parser.update_project (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:335:14) at C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:126:27 at Array.map (native) at C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:70:40 at _fulfilled (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:787:54) at self.promiseDispatch.done (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:816:30) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9330) Remove 'plugman publish' functionality from cordova-lib
[ https://issues.apache.org/jira/browse/CB-9330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618225#comment-14618225 ] ASF GitHub Bot commented on CB-9330: GitHub user vladimir-kotikov opened a pull request: https://github.com/apache/cordova-lib/pull/254 CB-9330 Removes 'plugman publish' related functionality See [CB-9330](https://issues.apache.org/jira/browse/CB-9330) for more details. You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-lib CB-9330 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-lib/pull/254.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 #254 commit a1e4655cbebdf2c8c36e419c6716a9891d3541da Author: Vladimir Kotikov v-vlk...@microsoft.com Date: 2015-07-08T08:36:36Z CB-9330 Removes 'plugman publish' related functionality Remove 'plugman publish' functionality from cordova-lib Key: CB-9330 URL: https://issues.apache.org/jira/browse/CB-9330 Project: Apache Cordova Issue Type: Improvement Reporter: Vladimir Kotikov Assignee: Vladimir Kotikov Due to CPR write (publish) access shutdown starting from July 15 we need to make some changes to remove CPR publishing related functionality from Cordova. Things, that might be removed: 1. 'plugman publish/unpublish' commands, 2. 'registry.publish/unpublish' methods and all related stuff in cordova-lib. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9330) Remove 'plugman publish' functionality from cordova-lib
[ https://issues.apache.org/jira/browse/CB-9330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618218#comment-14618218 ] ASF GitHub Bot commented on CB-9330: GitHub user vladimir-kotikov opened a pull request: https://github.com/apache/cordova-plugman/pull/84 CB-9330 Adds notice about removed plugman commands See [CB-9330](https://issues.apache.org/jira/browse/CB-9330) for more details You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugman CB-9330 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugman/pull/84.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 #84 commit ffd8def3a915d8da174d218aac9da0d33d047971 Author: Vladimir Kotikov v-vlk...@microsoft.com Date: 2015-07-08T08:30:17Z CB-9330 Adds notice about removed plugman commands Remove 'plugman publish' functionality from cordova-lib Key: CB-9330 URL: https://issues.apache.org/jira/browse/CB-9330 Project: Apache Cordova Issue Type: Improvement Reporter: Vladimir Kotikov Assignee: Vladimir Kotikov Due to CPR write (publish) access shutdown starting from July 15 we need to make some changes to remove CPR publishing related functionality from Cordova. Things, that might be removed: 1. 'plugman publish/unpublish' commands, 2. 'registry.publish/unpublish' methods and all related stuff in cordova-lib. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Updated] (CB-9333) Icon or splash screen file that has readonly attribute causes cordova prapare to fail
[ https://issues.apache.org/jira/browse/CB-9333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roman Viskin updated CB-9333: - Description: Steps to reproduce: Create project. cordova platform add android --save Edit config.xml, add icon src=res/icon.png / Where res/icon.png is file with readonly attribute set. Run cordova prepare. Error: EPERM, operation not permitted error will raise, with attached stack trace. Remove read only attributre, run cordova prepare again. The prepare will run successfully. Bug: read only attribute should not cause the failure. --- at Object.fs.unlinkSync (fs.js:765:18) at android_parser.deleteDefaultResource (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:80:20) at android_parser.handleIcons (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:143:10) at android_parser.update_from_config (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:214:10) at android_parser.update_project (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:335:14) at C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:126:27 at Array.map (native) at C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:70:40 at _fulfilled (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:787:54) at self.promiseDispatch.done (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:816:30) was: Steps to reproduce: Create project. cordova platform add android --save Edit config.xml, add icon src=res/icon.png / Where res.icon.png is file with readonly attribute set. Run cordova prepare. Error: EPERM, operation not permitted error will raise, with attached stack trace. Remove read only attributre, run cordova prepare again. The prepare will run successfully. Bug: read only attribute should not cause the failure. --- at Object.fs.unlinkSync (fs.js:765:18) at android_parser.deleteDefaultResource (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:80:20) at android_parser.handleIcons (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:143:10) at android_parser.update_from_config (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:214:10) at android_parser.update_project (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:335:14) at C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:126:27 at Array.map (native) at C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:70:40 at _fulfilled (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:787:54) at self.promiseDispatch.done (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:816:30) Icon or splash screen file that has readonly attribute causes cordova prapare to fail - Key: CB-9333 URL: https://issues.apache.org/jira/browse/CB-9333 Project: Apache Cordova Issue Type: Bug Components: CLI Environment: Windows 8 Reporter: Roman Viskin Steps to reproduce: Create project. cordova platform add android --save Edit config.xml, add icon src=res/icon.png / Where res/icon.png is file with readonly attribute set. Run cordova prepare. Error: EPERM, operation not permitted error will raise, with attached stack trace. Remove read only attributre, run cordova prepare again. The prepare will run successfully. Bug: read only attribute should not cause the failure. --- at Object.fs.unlinkSync (fs.js:765:18) at android_parser.deleteDefaultResource (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:80:20) at android_parser.handleIcons (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:143:10) at android_parser.update_from_config (C:\Users\romanv\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\metadata\android_parser.js:214:10) at
[jira] [Commented] (CB-9329) cordova-ios medic tests are not getting test results
[ https://issues.apache.org/jira/browse/CB-9329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618217#comment-14618217 ] Shazron Abdullah commented on CB-9329: -- We need to: 1. Install the cordova-whitelist-plugin (https://github.com/apache/cordova-mobile-spec/blob/e96809046401243c4cfbea6272d7982f13b30008/createmobilespec/createmobilespec.js#L213) 2. Convert the access tags to allow-navigation tags to make the Whitelist tests pass. However, there is a deficiency in the new whitelist plugin. Even though access tags in the docs are strongly discouraged, we don't say that it is not supported in the plugin, which it is not supported on iOS. We encourage people to use CSP which is great in the context of the webpage, but not native code. The native code here is processed in CDVURLProtocol, which delegates to CDVViewController::shouldAllowRequestForURL, which will always return NO. This can be demonstrated in the FileTransfer plugin tests. Not sure how this is to be handled, for native requests. We could bring back the access tag usage, but this is essentially the legacy whitelist plugin. If we do, it gets confusing since we have CSP and access tags, and we are actively discouraging usage of access (even though Android whitelist still uses it). cordova-ios medic tests are not getting test results Key: CB-9329 URL: https://issues.apache.org/jira/browse/CB-9329 Project: Apache Cordova Issue Type: Bug Components: Medic Reporter: Shazron Abdullah Labels: cordova-ios-4.0.x http://ci.apache.org/builders/cordova-ios/builds/21/steps/running-tests/logs/stdio Timed out. My guess is it's a whitelist/CSP thing. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-9334) PluginManager permit only one plugin to remap the URI
Simon Pireyn created CB-9334: Summary: PluginManager permit only one plugin to remap the URI Key: CB-9334 URL: https://issues.apache.org/jira/browse/CB-9334 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 3.7.1 Reporter: Simon Pireyn If a plugin return an URI and not null, the plugin manager stop calling remapUri and use the value returned. It doesn't allow another plugin to check or remap the URI ex: JsHybuggerPlugin gets all URL to eventually add content://jsHybugger.org/ before every url. Or if I need with one plugin to replace myserver:// with http://myserver; and in another to replace {placeholders} or watherver. PluginManager should loop every plugins before returning the remapped URI. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9292) throw ConcurrentModificationException sometimes
[ https://issues.apache.org/jira/browse/CB-9292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618842#comment-14618842 ] Joe Bowser commented on CB-9292: Do you have any way to reproduce this issue? throw ConcurrentModificationException sometimes --- Key: CB-9292 URL: https://issues.apache.org/jira/browse/CB-9292 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 3.6.4 Environment: Hardware Model: 2014813 Hardware Brand: Xiaomi Hardware Product Code: 2014813 Android OS Version: 4.4.4 Hardware Model: SM-N9006 Hardware Brand: samsung Hardware Product Code: h3gzc Android OS Version: 4.4.2 Reporter: Derek Chia Crashed app with Cordova Android 3.6.4 org.apache.cordova.network-information 0.2.15 Exception Stack Trace: {code} java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x410 (has extras) } in org.apache.cordova.networkinformation.NetworkManager$1@42e23190 at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:782) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5335) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) at dalvik.system.NativeStart.main(Native Method) Caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806) at java.util.HashMap$ValueIterator.next(HashMap.java:838) at org.apache.cordova.PluginManager.postMessage(PluginManager.java:271) at org.apache.cordova.CordovaWebView.postMessage(CordovaWebView.java:514) at org.apache.cordova.networkinformation.NetworkManager.sendUpdate(NetworkManager.java:223) at org.apache.cordova.networkinformation.NetworkManager.updateConnectionInfo(NetworkManager.java:174) at org.apache.cordova.networkinformation.NetworkManager.access$000(NetworkManager.java:38) at org.apache.cordova.networkinformation.NetworkManager$1.onReceive(NetworkManager.java:105) at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:772) ... 9 more {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9331) getFreeDiskSpace() returns 0 on iOS
[ https://issues.apache.org/jira/browse/CB-9331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618833#comment-14618833 ] ASF GitHub Bot commented on CB-9331: Github user edades commented on the pull request: https://github.com/apache/cordova-plugin-file/pull/125#issuecomment-119638131 Hi, sorry for write here. I have a problem with this plugin, this interrupt the load of cordova.js, and my page refresh all the time. And this problem is only when i install this plugin. Check the screenshots. Thanks :) ![captura de pantalla 2015-07-08 a las 12 04 29](https://cloud.githubusercontent.com/assets/401513/8575367/04297278-2572-11e5-8669-fc81a953c4e8.png) ![captura de pantalla 2015-07-08 a las 12 04 45](https://cloud.githubusercontent.com/assets/401513/8575368/04478d62-2572-11e5-9639-4919b32cd8a8.png) ![captura de pantalla 2015-07-08 a las 12 07 31](https://cloud.githubusercontent.com/assets/401513/8575434/55ed8554-2572-11e5-8e96-441090902710.png) getFreeDiskSpace() returns 0 on iOS --- Key: CB-9331 URL: https://issues.apache.org/jira/browse/CB-9331 Project: Apache Cordova Issue Type: Bug Components: Plugin File Environment: iOS device or emulator Reporter: Gaven Henry Priority: Minor Original Estimate: 1h Remaining Estimate: 1h getFreeDiskSpace() method of the file plugin will always return 0 on the iOS emulator or on an iOS device -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618864#comment-14618864 ] ASF GitHub Bot commented on CB-9283: Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34167579 --- Diff: template/cordova/lib/package.js --- @@ -130,58 +145,47 @@ module.exports.findDevice = function (target) { }; // returns array of available devices names -module.exports.listDevices = function () { -return utils.getAppDeployUtils().then(function(appDeployUtils) { -return exec('' + appDeployUtils + ' /enumeratedevices').then(function(output) { -return Q.resolve(output.split('\n').map(function(line) { -var match = /\s*(\d)+\s+(.*)/.exec(line); -return match match[2]; -}).filter(function (line) { -return line; -})); +module.exports.listDevices = function (deploymentTool) { + +return deploymentTool.enumerateDevices().then(function(deviceList) { +return deviceList.map(function(device) { +return device.toString(); }); -}); -}; - -function installAppToPhone(appDeployUtils, package, target, update) { -// /installlaunch option sometimes fails with 'Error: The parameter is incorrect.' -// so we use separate steps to /install or /update and then /launch -var cmd = update ? '/update' : '/install'; -console.log('Installing application...'); -return spawn(appDeployUtils, [cmd, package.appx, '/targetdevice:' + target]); -} +}, function(e) { +console.warn('Failed to enumerate devices'); +console.warn(e); -function runAppOnPhone(appDeployUtils, target) { -return Q().then(function() { -return module.exports.getAppId(path.join(__dirname, '..', '..')); -}).then(function(appId) { -console.log('Running application... '); -return spawn(appDeployUtils, ['/launch', appId, '/targetdevice:' + target]); +throw e; }); -} +}; + function uninstallAppFromPhone(appDeployUtils, package, target) { console.log('Attempting to remove previously installed application...'); -return spawn(appDeployUtils, ['/uninstall', package.phoneId, '/targetdevice:' + target]); +return appDeployUtils.uninstallAppPackage(package.phoneId, target); } // deploys specified phone package to device/emulator and launches it -module.exports.deployToPhone = function (package, deployTarget, targetWindows10) { -var getTarget = deployTarget == 'device' ? Q('de') : -deployTarget == 'emulator' ? Q('xd') : module.exports.findDevice(deployTarget); - -return getTarget.then(function(target) { -return utils.getAppDeployUtils(targetWindows10).then(function(appDeployUtils) { +module.exports.deployToPhone = function (package, deployTarget, targetWindows10, deploymentTool) { +var deployment; +if (deploymentTool) { +deployment = Q(deploymentTool); +} +else { +deployment = utils.getAppDeployUtils(targetWindows10); +} -return uninstallAppFromPhone(appDeployUtils, package, target).then( +return deployment.then(function(deploymentTool) { +return module.exports.findDevice(deploymentTool, deployTarget).then(function(target) { +return uninstallAppFromPhone(deploymentTool, package, target).then( function() {}, function() {}).then(function() { -return installAppToPhone(appDeployUtils, package, target, false); -}).then(function() { -return runAppOnPhone(appDeployUtils, target); -}, function(error) { +// shouldUpdate = false because we've already uninstalled +return deploymentTool.installAppPackage(package.appx, target, true, false); --- End diff -- It's not clear from looking at the code what the literal `true` stands for unless I got to definition of the function `installAppPackage`. Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type: Improvement Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza The Windows 10 SDK includes a new deployment tool, WinAppDeployCmd, which supercedes Windows Phone 8.1's AppDeployCmd. Its command line
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618866#comment-14618866 ] ASF GitHub Bot commented on CB-9283: Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34167789 --- Diff: template/cordova/lib/run.js --- @@ -155,7 +155,8 @@ module.exports.help = function () { console.log('--appx=8.1-win|8.1-phone|uap'); console.log(' : Overrides windows-target-version to build Windows 8.1, '); console.log(' Windows Phone 8.1, or Windows 10.'); -console.log(''); +console.log('--win10tools : Uses Windows 10 deployment tools (used for a Windows 8.1 app when'); --- End diff -- Fair enough - I remember we faced the same thing with xapDeploy and appDeploy. :) Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type: Improvement Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza The Windows 10 SDK includes a new deployment tool, WinAppDeployCmd, which supercedes Windows Phone 8.1's AppDeployCmd. Its command line interface is incompatible. This task is to migrate to WinAppDeployCmd. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-9292) throw ConcurrentModificationException sometimes
[ https://issues.apache.org/jira/browse/CB-9292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618842#comment-14618842 ] Joe Bowser edited comment on CB-9292 at 7/8/15 4:11 PM: Do you have any way to reproduce this issue? Are there any other plugins installed with network-information? was (Author: bowserj): Do you have any way to reproduce this issue? throw ConcurrentModificationException sometimes --- Key: CB-9292 URL: https://issues.apache.org/jira/browse/CB-9292 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 3.6.4 Environment: Hardware Model: 2014813 Hardware Brand: Xiaomi Hardware Product Code: 2014813 Android OS Version: 4.4.4 Hardware Model: SM-N9006 Hardware Brand: samsung Hardware Product Code: h3gzc Android OS Version: 4.4.2 Reporter: Derek Chia Crashed app with Cordova Android 3.6.4 org.apache.cordova.network-information 0.2.15 Exception Stack Trace: {code} java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x410 (has extras) } in org.apache.cordova.networkinformation.NetworkManager$1@42e23190 at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:782) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5335) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) at dalvik.system.NativeStart.main(Native Method) Caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806) at java.util.HashMap$ValueIterator.next(HashMap.java:838) at org.apache.cordova.PluginManager.postMessage(PluginManager.java:271) at org.apache.cordova.CordovaWebView.postMessage(CordovaWebView.java:514) at org.apache.cordova.networkinformation.NetworkManager.sendUpdate(NetworkManager.java:223) at org.apache.cordova.networkinformation.NetworkManager.updateConnectionInfo(NetworkManager.java:174) at org.apache.cordova.networkinformation.NetworkManager.access$000(NetworkManager.java:38) at org.apache.cordova.networkinformation.NetworkManager$1.onReceive(NetworkManager.java:105) at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:772) ... 9 more {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Updated] (CB-9282) Plugin File for Android seems to require trailing slash to identify a directory
[ https://issues.apache.org/jira/browse/CB-9282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joe Bowser updated CB-9282: --- Priority: Minor (was: Major) Plugin File for Android seems to require trailing slash to identify a directory --- Key: CB-9282 URL: https://issues.apache.org/jira/browse/CB-9282 Project: Apache Cordova Issue Type: Bug Components: Android, Plugin File Affects Versions: 2.1.0 Reporter: Adriano Di Giovanni Priority: Minor Looking at LocalFileSystemURL.java, lines 39~55 ```java public static LocalFilesystemURL parse(Uri uri) { if (!FILESYSTEM_PROTOCOL.equals(uri.getScheme())) { return null; } String path = uri.getPath(); if (path.length() 1) { return null; } int firstSlashIdx = path.indexOf('/', 1); if (firstSlashIdx 0) { return null; } String fsName = path.substring(1, firstSlashIdx); path = path.substring(firstSlashIdx); boolean isDirectory = path.charAt(path.length() - 1) == '/'; return new LocalFilesystemURL(uri, fsName, path, isDirectory); } ``` I found that operations on urls like cdvfile://localhost/persistent (without trailing slash) don't work because firstSlashIds 0. Looking at line 53, Plugin file relies on trailing slash to know in advance if uri is a directory. I can't find any mention of that in the docs. I find that relying on trailing slashes to identify a directory imposes a burden for client code that must normalize all paths before calling any Plugin File function. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-6936) app crashes if webview is destroyed while dialog box open
[ https://issues.apache.org/jira/browse/CB-6936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618854#comment-14618854 ] Joe Bowser commented on CB-6936: [~talsh87] Your issue is completely different from this issue. Can you please create a new issue? 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-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618800#comment-14618800 ] ASF GitHub Bot commented on CB-9283: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34164191 --- Diff: template/cordova/lib/run.js --- @@ -155,7 +155,8 @@ module.exports.help = function () { console.log('--appx=8.1-win|8.1-phone|uap'); console.log(' : Overrides windows-target-version to build Windows 8.1, '); console.log(' Windows Phone 8.1, or Windows 10.'); -console.log(''); +console.log('--win10tools : Uses Windows 10 deployment tools (used for a Windows 8.1 app when'); --- End diff -- Because Windows 8.1 tools currently can't deploy to an 8.1 app to a Windows 10 device. Hence the parenthetical and the following line. Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type: Improvement Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza The Windows 10 SDK includes a new deployment tool, WinAppDeployCmd, which supercedes Windows Phone 8.1's AppDeployCmd. Its command line interface is incompatible. This task is to migrate to WinAppDeployCmd. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618804#comment-14618804 ] ASF GitHub Bot commented on CB-9283: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34164434 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,275 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that
[jira] [Commented] (CB-812) Update Whitelisting Documentation for iOS
[ https://issues.apache.org/jira/browse/CB-812?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618808#comment-14618808 ] Martin Vavrovic commented on CB-812: Hello, I'm trying to find out, whether it is possible to allow a cross-protocol exception. The use-case is: local app (file://...) provides access to a web portal/resources via an embedded IFRAME (https://...), and needs to have basic access to the remote content. Is this possible in iOS, and if so, could the documentation mention this case? Thanks. Update Whitelisting Documentation for iOS - Key: CB-812 URL: https://issues.apache.org/jira/browse/CB-812 Project: Apache Cordova Issue Type: Sub-task Components: Docs, iOS Affects Versions: Master Environment: [/docs/en/edge/guide/white-list/index.md|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-docs.git;a=blob;f=docs/en/edge/guide/white-list/index.md;h=77a4def46c80cbde819e4211af2cff2264195913;hb=HEAD] Reporter: Michael Brooks Assignee: Shazron Abdullah Priority: Minor Fix For: 1.8.0 Please complete the iOS section on whitelist configuration and include any syntax quirks. The specified syntax is based on the [W3C Widget Access specification|http://www.w3.org/TR/widgets-access/]. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9334) PluginManager permit only one plugin to remap the URI
[ https://issues.apache.org/jira/browse/CB-9334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618810#comment-14618810 ] ASF GitHub Bot commented on CB-9334: GitHub user spirann opened a pull request: https://github.com/apache/cordova-android/pull/195 CB-9334 loop on CordovaPlugins before returning remapped Uri This is a fix for https://issues.apache.org/jira/browse/CB-9334 Because sometimes you need more than one plugin to handle your Uri's. Looping on all plugins before returning the remapped Uri. You can merge this pull request into a Git repository by running: $ git pull https://github.com/spirann/cordova-android 3.7.x Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-android/pull/195.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 #195 commit 2a2c8b4fbacc4707104f3f2740b1f80e1fbf8d42 Author: Simon Pireyn spir...@gmail.com Date: 2015-07-08T15:34:21Z CB-9334 loop on CordovaPlugins before returning remapped Uri commit f72f6cd30dbab153e33e625d2ae1d2ac04a0cc0c Author: Simon Pireyn spir...@gmail.com Date: 2015-07-08T15:51:57Z CB-9334 loop on CordovaPlugins before returning remapped Uri commit 3e8948650c6a42487c980b7ee396c966a9533878 Author: Simon Pireyn spir...@gmail.com Date: 2015-07-08T15:54:52Z Check is not bitwise PluginManager permit only one plugin to remap the URI - Key: CB-9334 URL: https://issues.apache.org/jira/browse/CB-9334 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 3.7.1 Reporter: Simon Pireyn Labels: android, plugins If a plugin return an URI and not null, the plugin manager stop calling remapUri and use the value returned. It doesn't allow another plugin to check or remap the URI ex: JsHybuggerPlugin gets all URL to eventually add content://jsHybugger.org/ before every url. Or if I need with one plugin to replace myserver:// with http://myserver; and in another to replace {placeholders} or watherver. PluginManager should loop every plugins before returning the remapped URI. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618829#comment-14618829 ] ASF GitHub Bot commented on CB-9283: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34165767 --- Diff: template/cordova/lib/target-list.js --- @@ -17,20 +17,21 @@ under the License. */ -var devices = require('./package'), +var deploy = require('./deployment'), args = process.argv.slice(2); // help/usage function function help() { console.log(''); -console.log('Usage: node target-list.js [ --emulators | --devices | --started_emulators | --all ]'); +console.log('Usage: node target-list.js [--win10] [ --emulators | --devices | --started_emulators | --all ]'); +console.log('--win10 : Chooses to list Windows 10 devices (Windows 8.1 is default).'); console.log('--emulators : List the possible target emulators availible.'); -console.log('--devices : List the possible target devices availible. *NOT IMPLEMENTED YET*'); +console.log('--devices : List the possible target devices availible.'); console.log('--started_emulators : List any started emulators availible. *NOT IMPLEMENTED YET*'); console.log('--all : List all available devices'); console.log('examples:'); console.log('node target-list.js --emulators'); -console.log('node target-list.js --devices'); +console.log('node target-list.js --win10 --devices'); --- End diff -- Yeah, this is a complicated question, and I'm not sure what the right answer is right now. The Windows 8.1 tool actually enumerates Windows 10 emulators, but it can't deploy to them. Conversely, the Windows 10 tool does not presently enumerate Windows 10 emulators (because it also can't deploy to them). The Windows 8.1 tool is fast, the Windows 10 tool is slow (it does network probing). We could possibly display both, but most likely we would end up simply having the following list, for example: 0. Device (device) [Windows 8.1 tools] 1. Mobile 4 inch 512MB 10.0.10176.0 (emulator) [Windows 8.1 tools] 2. Mobile 4 inch 1GB 10.0.10176.0 (emulator) [Windows 8.1 tools] 3. Mobile 5 inch 1GB 10.0.10176.0 (emulator) [Windows 8.1 tools] 4. Mobile 6 inch 2GB 10.0.10176.0 (emulator) [Windows 8.1 tools] 5. Windows Phone 8.1 4 inch 512MB (emulator) [Windows 8.1 tools] 6. Windows Phone 8.1 4 inch 1GB (emulator) [Windows 8.1 tools] 7. Windows Phone 8.1 5 inch 1GB (emulator) [Windows 8.1 tools] 8. Windows Phone 8.1 6 inch 2GB (emulator) [Windows 8.1 tools] 9. Lumia 1520 (RM-940) (device) [Windows 10 tools] 0 and 9 end up being the same thing, which is problematic. I just don't know which is better: to repeat devices, or to have an option that picks is my target device Windows 8.1 or Windows 10? I landed on the option choice, for compatibility reasons (opt into the new behavior). Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type: Improvement Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza The Windows 10 SDK includes a new deployment tool, WinAppDeployCmd, which supercedes Windows Phone 8.1's AppDeployCmd. Its command line interface is incompatible. This task is to migrate to WinAppDeployCmd. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618838#comment-14618838 ] ASF GitHub Bot commented on CB-9283: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34166452 --- Diff: template/cordova/lib/package.js --- @@ -113,16 +112,32 @@ function getPackageName(platformPath) { // returns one of available devices which name match with provided string // return rejected promise if device with name specified not found -module.exports.findDevice = function (target) { +module.exports.findDevice = function (deploymentTool, target) { target = target.toLowerCase(); -return module.exports.listDevices().then(function(deviceList) { +return deploymentTool.enumerateDevices().then(function(deviceList) { // CB-7617 since we use partial match shorter names should go first, // example case is ['Emulator 8.1 WVGA 4 inch 512MB', 'Emulator 8.1 WVGA 4 inch'] -var sortedList = deviceList.concat().sort(function (l, r) { return l.length r.length; }); -for (var idx in sortedList){ -if (sortedList[idx].toLowerCase().indexOf(target) -1) { -// we should return index based on original list -return Q.resolve(deviceList.indexOf(sortedList[idx])); +// In CB-9283, we need to differentiate between emulator, device, and target. +// So, for emulators to honor the above CB-7617, we preserve the original behavior. +// Else, we choose either the target by ID (DeviceInfo.index) or if it's just device, +// we choose the default (aka first) device. +if (target === 'emulator') { +var sortedList = deviceList.concat().sort(function (l, r) { return l.toString().length r.toString().length; }); --- End diff -- concat() returns a copy of the original array. http://swingpants.com/2009/03/12/fastest-way-to-copy-an-array-concat-or-slice0/ Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type: Improvement Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza The Windows 10 SDK includes a new deployment tool, WinAppDeployCmd, which supercedes Windows Phone 8.1's AppDeployCmd. Its command line interface is incompatible. This task is to migrate to WinAppDeployCmd. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-9316) CB-8382 Breaks plugins that directly used CordovaInterface methods
[ https://issues.apache.org/jira/browse/CB-9316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618824#comment-14618824 ] Joe Bowser edited comment on CB-9316 at 7/8/15 4:10 PM: This is too big of an API change to reverse. We're going to have to find another way to set the activityResultCallback. I'm going to set this as Won't fix was (Author: bowserj): This is too big of an API change to reverse. We're going to have to find another way to set the activityResultCallback. CB-8382 Breaks plugins that directly used CordovaInterface methods -- Key: CB-9316 URL: https://issues.apache.org/jira/browse/CB-9316 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 5.0.0, 5.1.2 Reporter: Blake Israel Labels: Android CB-8382 breaks plugins that relied on manually calling CordovaInterface methods from CordovaActivity. Plugins need the ability to manually set the activityResultCallback in cases where they use third party libraries which launch intents manually. Example: FacebookSDK -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618836#comment-14618836 ] ASF GitHub Bot commented on CB-9283: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34166300 --- Diff: template/cordova/lib/package.js --- @@ -113,16 +112,32 @@ function getPackageName(platformPath) { // returns one of available devices which name match with provided string // return rejected promise if device with name specified not found -module.exports.findDevice = function (target) { +module.exports.findDevice = function (deploymentTool, target) { target = target.toLowerCase(); -return module.exports.listDevices().then(function(deviceList) { +return deploymentTool.enumerateDevices().then(function(deviceList) { // CB-7617 since we use partial match shorter names should go first, // example case is ['Emulator 8.1 WVGA 4 inch 512MB', 'Emulator 8.1 WVGA 4 inch'] -var sortedList = deviceList.concat().sort(function (l, r) { return l.length r.length; }); -for (var idx in sortedList){ -if (sortedList[idx].toLowerCase().indexOf(target) -1) { -// we should return index based on original list -return Q.resolve(deviceList.indexOf(sortedList[idx])); +// In CB-9283, we need to differentiate between emulator, device, and target. +// So, for emulators to honor the above CB-7617, we preserve the original behavior. +// Else, we choose either the target by ID (DeviceInfo.index) or if it's just device, +// we choose the default (aka first) device. +if (target === 'emulator') { +var sortedList = deviceList.concat().sort(function (l, r) { return l.toString().length r.toString().length; }); +for (var idx in sortedList){ --- End diff -- Yeah I didn't want to mess with this code and end up breaking something downstream. It seems to have been working for us up until now. Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type: Improvement Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza The Windows 10 SDK includes a new deployment tool, WinAppDeployCmd, which supercedes Windows Phone 8.1's AppDeployCmd. Its command line interface is incompatible. This task is to migrate to WinAppDeployCmd. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618870#comment-14618870 ] ASF GitHub Bot commented on CB-9283: Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34168004 --- Diff: template/cordova/lib/target-list.js --- @@ -17,20 +17,21 @@ under the License. */ -var devices = require('./package'), +var deploy = require('./deployment'), args = process.argv.slice(2); // help/usage function function help() { console.log(''); -console.log('Usage: node target-list.js [ --emulators | --devices | --started_emulators | --all ]'); +console.log('Usage: node target-list.js [--win10] [ --emulators | --devices | --started_emulators | --all ]'); +console.log('--win10 : Chooses to list Windows 10 devices (Windows 8.1 is default).'); console.log('--emulators : List the possible target emulators availible.'); -console.log('--devices : List the possible target devices availible. *NOT IMPLEMENTED YET*'); +console.log('--devices : List the possible target devices availible.'); console.log('--started_emulators : List any started emulators availible. *NOT IMPLEMENTED YET*'); console.log('--all : List all available devices'); console.log('examples:'); console.log('node target-list.js --emulators'); -console.log('node target-list.js --devices'); +console.log('node target-list.js --win10 --devices'); --- End diff -- Fair enough - this is more complicated than it should be. :8ball: Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type: Improvement Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza The Windows 10 SDK includes a new deployment tool, WinAppDeployCmd, which supercedes Windows Phone 8.1's AppDeployCmd. Its command line interface is incompatible. This task is to migrate to WinAppDeployCmd. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618874#comment-14618874 ] ASF GitHub Bot commented on CB-9283: Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34168225 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,275 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that feature
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618789#comment-14618789 ] ASF GitHub Bot commented on CB-9283: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34163428 --- Diff: spec/unit/deployment.spec.js --- @@ -0,0 +1,282 @@ +/** +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +License); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/ + +var rewire = require('rewire'), +deployment = rewire('../../template/cordova/lib/deployment'), +run= deployment.__get__('run'), +Q = require('q'), + +AppDeployCmdTool = deployment.__get__('AppDeployCmdTool'), +WinAppDeployCmdTool = deployment.__get__('WinAppDeployCmdTool'); + +var TEST_APP_PACKAGE_NAME = 'c:\\testapppackage.appx', +TEST_APP_PACKAGE_ID = '12121212-3434-3434-3434-567856785678'; + +describe('The correct version of the app deployment tool is obtained.', function() { + +it('Provides an AppDeployCmdTool when 8.1 is requested.', function() { + +var tool = deployment.getDeploymentTool('8.1'); +expect(tool instanceof AppDeployCmdTool).toBe(true); + +}); + +it('Provides a WinAppDeployCmdTool when 10.0 is requested.', function() { + +var tool = deployment.getDeploymentTool('10.0'); +expect(tool instanceof WinAppDeployCmdTool).toBe(true); + +}); + +}); + +describe('Windows 10 deployment interacts with the file system as expected.', function() { + +function runMock(cmd, args, cwd) { +expect(cmd).toBe('c:\\Program Files (x86)\\Windows Kits\\10\\bin\\x86\\WinAppDeployCmd.exe'); +switch (args[0]) { +case 'devices': +var output = 'Windows App Deployment Tool\r\nVersion 10.0.0.0\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\n\r\nDiscovering devices...\r\nIP Address GUID Model/Name\r\n127.0.0.1 0015-b21e-0da9--Lumia 1520 (RM-940)\r\n10.120.70.172 ----00155d61953200155D619532\r\n10.120.68.150 ----00155d01176500155D011765\r\nDone.'; +return Q(output); + +case 'update': +case 'install': +expect(args[2]).toBe(TEST_APP_PACKAGE_NAME); +expect(args[4]).toBe('127.0.0.1'); +return Q(''); + +case 'uninstall': +expect(args[2]).toBe(TEST_APP_PACKAGE_ID); +expect(args[4]).toBe('10.120.68.150'); +return Q(''); + +} +} + +var mockedProgramFiles = process.env['ProgramFiles(x86)']; +beforeEach(function() { +deployment.__set__('run', runMock); +process.env['ProgramFiles(x86)'] = 'c:\\Program Files (x86)'; +}); +afterEach(function() { +deployment.__set__('run', run); +if (mockedProgramFiles) { +process.env['ProgramFiles(x86)'] = mockedProgramFiles; +} else { +delete process.env['ProgramFiles(x86)']; +} +}); + +it('enumerateDevices returns a valid set of objects', function() { +var deploymentTool = deployment.getDeploymentTool('10.0'); +var done = false; +deploymentTool.enumerateDevices().then(function(deviceList) { + +expect(deviceList.length).toBe(3); +expect(deviceList[0].name).toBe('Lumia 1520 (RM-940)'); +expect(deviceList[0].index).toBe(0); +expect(deviceList[0].type).toBe('device'); + +done = true; + +}); + +waitsFor(function() { return done; }); +}); + +it('installAppPackage passes the correct
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618796#comment-14618796 ] ASF GitHub Bot commented on CB-9283: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34163912 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,275 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); +d.reject(e); +} +return d.promise; +} + +function DeploymentTool() { + +} + +/** + * Determines whether the requested version of the deployment tool is available. + * @returns True if the deployment tool can function; false if not. + */ +DeploymentTool.prototype.isAvailable = function() { +return fs.existsSync(this.path); +}; + +/** + * Enumerates devices attached to the development machine. + * @returns A Promise for an array of objects, which should be passed into other functions to represent the device. + * @remarks The returned objects contain 'index', 'name', and 'type' properties indicating basic information about them, + *which is limited to the information provided by the system. Other properties may also be included, but they are + *specific to the deployment tool which created them and are likely used internally. + */ +DeploymentTool.prototype.enumerateDevices = function() { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Installs an app package to the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param pathToAppxPackage The path to the .appx package to install. + * @param targetDevice An object returned from a successful call to enumerateDevices. + * @shouldLaunch Indicates whether to launch the app after installing it. + * @shouldUpdate Indicates whether to explicitly update the app, or install clean. + * @pin Optionally provided if the device requires pairing for deployment. + */ +DeploymentTool.prototype.installAppPackage = function(pathToAppxPackage, targetDevice, shouldLaunch, shouldUpdate, pin) { +return Q.reject('May not use DeploymentTool directly, instead get an instance from DeploymentTool.getDeploymentTool()'); +}; + +/** + * Uninstalls an app package from the target device. + * @returns A Promise which will be fulfilled on success or rejected on failure. + * @param packageInfo The app package name or Phone GUID representing the app. + * @param targetDevice An object returned from a successful call to enumerateDevices. + */ +DeploymentTool.prototype.uninstallAppPackage = function(packageInfo, targetDevice) { +return Q.reject('Unable to uninstall any app packages because that
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618798#comment-14618798 ] ASF GitHub Bot commented on CB-9283: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34164096 --- Diff: template/cordova/lib/package.js --- @@ -130,58 +145,47 @@ module.exports.findDevice = function (target) { }; // returns array of available devices names -module.exports.listDevices = function () { -return utils.getAppDeployUtils().then(function(appDeployUtils) { -return exec('' + appDeployUtils + ' /enumeratedevices').then(function(output) { -return Q.resolve(output.split('\n').map(function(line) { -var match = /\s*(\d)+\s+(.*)/.exec(line); -return match match[2]; -}).filter(function (line) { -return line; -})); +module.exports.listDevices = function (deploymentTool) { + +return deploymentTool.enumerateDevices().then(function(deviceList) { +return deviceList.map(function(device) { +return device.toString(); }); -}); -}; - -function installAppToPhone(appDeployUtils, package, target, update) { -// /installlaunch option sometimes fails with 'Error: The parameter is incorrect.' -// so we use separate steps to /install or /update and then /launch -var cmd = update ? '/update' : '/install'; -console.log('Installing application...'); -return spawn(appDeployUtils, [cmd, package.appx, '/targetdevice:' + target]); -} +}, function(e) { +console.warn('Failed to enumerate devices'); +console.warn(e); -function runAppOnPhone(appDeployUtils, target) { -return Q().then(function() { -return module.exports.getAppId(path.join(__dirname, '..', '..')); -}).then(function(appId) { -console.log('Running application... '); -return spawn(appDeployUtils, ['/launch', appId, '/targetdevice:' + target]); +throw e; }); -} +}; + function uninstallAppFromPhone(appDeployUtils, package, target) { console.log('Attempting to remove previously installed application...'); -return spawn(appDeployUtils, ['/uninstall', package.phoneId, '/targetdevice:' + target]); +return appDeployUtils.uninstallAppPackage(package.phoneId, target); } // deploys specified phone package to device/emulator and launches it -module.exports.deployToPhone = function (package, deployTarget, targetWindows10) { -var getTarget = deployTarget == 'device' ? Q('de') : -deployTarget == 'emulator' ? Q('xd') : module.exports.findDevice(deployTarget); - -return getTarget.then(function(target) { -return utils.getAppDeployUtils(targetWindows10).then(function(appDeployUtils) { +module.exports.deployToPhone = function (package, deployTarget, targetWindows10, deploymentTool) { +var deployment; +if (deploymentTool) { +deployment = Q(deploymentTool); +} +else { +deployment = utils.getAppDeployUtils(targetWindows10); +} -return uninstallAppFromPhone(appDeployUtils, package, target).then( +return deployment.then(function(deploymentTool) { +return module.exports.findDevice(deploymentTool, deployTarget).then(function(target) { +return uninstallAppFromPhone(deploymentTool, package, target).then( function() {}, function() {}).then(function() { -return installAppToPhone(appDeployUtils, package, target, false); -}).then(function() { -return runAppOnPhone(appDeployUtils, target); -}, function(error) { +// shouldUpdate = false because we've already uninstalled +return deploymentTool.installAppPackage(package.appx, target, true, false); --- End diff -- I don't understand this comment. Code comments should specify why you do something when it isn't immediately clear, not just repeat the code in comment form. Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type: Improvement Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza The Windows 10 SDK includes a new deployment tool, WinAppDeployCmd, which supercedes Windows Phone 8.1's
[jira] [Resolved] (CB-9316) CB-8382 Breaks plugins that directly used CordovaInterface methods
[ https://issues.apache.org/jira/browse/CB-9316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joe Bowser resolved CB-9316. Resolution: Won't Fix This is too big of an API change to reverse. We're going to have to find another way to set the activityResultCallback. CB-8382 Breaks plugins that directly used CordovaInterface methods -- Key: CB-9316 URL: https://issues.apache.org/jira/browse/CB-9316 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 5.0.0, 5.1.2 Reporter: Blake Israel Labels: Android CB-8382 breaks plugins that relied on manually calling CordovaInterface methods from CordovaActivity. Plugins need the ability to manually set the activityResultCallback in cases where they use third party libraries which launch intents manually. Example: FacebookSDK -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618845#comment-14618845 ] ASF GitHub Bot commented on CB-9283: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34166637 --- Diff: template/cordova/lib/deployment.js --- @@ -0,0 +1,275 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + License); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var Q = require('q'), +fs= require('fs'), +/* jshint ignore:start */ // 'path' only used in ignored blocks +path = require('path'), +/* jshint ignore:end */ +proc = require('child_process'); + +// neither 'exec' nor 'spawn' was sufficient because we need to pass arguments via spawn +// but also need to be able to capture stdout / stderr +function run(cmd, args, opt_cwd) { +var d = Q.defer(); +try { +var child = proc.spawn(cmd, args, {cwd: opt_cwd, maxBuffer: 1024000}); +var stdout = '', stderr = ''; +child.stdout.on('data', function(s) { stdout += s; }); +child.stderr.on('data', function(s) { stderr += s; }); +child.on('exit', function(code) { +if (code) { +d.reject(stderr); +} else { +d.resolve(stdout); +} +}); +} catch(e) { +console.error('error caught: ' + e); --- End diff -- This function is based on spawn.js, modified only to capture stdout/stderr. The comment is a fair question, but I thought I'd preserve consistency in this case. Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type: Improvement Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza The Windows 10 SDK includes a new deployment tool, WinAppDeployCmd, which supercedes Windows Phone 8.1's AppDeployCmd. Its command line interface is incompatible. This task is to migrate to WinAppDeployCmd. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618859#comment-14618859 ] ASF GitHub Bot commented on CB-9283: Github user robpaveza commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34167364 --- Diff: template/cordova/lib/package.js --- @@ -113,16 +112,32 @@ function getPackageName(platformPath) { // returns one of available devices which name match with provided string // return rejected promise if device with name specified not found -module.exports.findDevice = function (target) { +module.exports.findDevice = function (deploymentTool, target) { target = target.toLowerCase(); -return module.exports.listDevices().then(function(deviceList) { +return deploymentTool.enumerateDevices().then(function(deviceList) { // CB-7617 since we use partial match shorter names should go first, // example case is ['Emulator 8.1 WVGA 4 inch 512MB', 'Emulator 8.1 WVGA 4 inch'] -var sortedList = deviceList.concat().sort(function (l, r) { return l.length r.length; }); -for (var idx in sortedList){ -if (sortedList[idx].toLowerCase().indexOf(target) -1) { -// we should return index based on original list -return Q.resolve(deviceList.indexOf(sortedList[idx])); +// In CB-9283, we need to differentiate between emulator, device, and target. +// So, for emulators to honor the above CB-7617, we preserve the original behavior. +// Else, we choose either the target by ID (DeviceInfo.index) or if it's just device, +// we choose the default (aka first) device. +if (target === 'emulator') { +var sortedList = deviceList.concat().sort(function (l, r) { return l.toString().length r.toString().length; }); --- End diff -- Heh, that's ActionScript, but since it all comes from ES3 it's still true. Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type: Improvement Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza The Windows 10 SDK includes a new deployment tool, WinAppDeployCmd, which supercedes Windows Phone 8.1's AppDeployCmd. Its command line interface is incompatible. This task is to migrate to WinAppDeployCmd. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-9335) Windows quality-of-life improvements
Rob Paveza created CB-9335: -- Summary: Windows quality-of-life improvements Key: CB-9335 URL: https://issues.apache.org/jira/browse/CB-9335 Project: Apache Cordova Issue Type: Bug Components: Windows Reporter: Rob Paveza Assignee: Rob Paveza Priority: Trivial --archs argument doesn't document its separator but it supports multiple parameters -- the Windows 8 project is the startup project if opening the solution file, but it should be 8.1. (Consider removing the Windows 8 project from the main solution file anyway). -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Updated] (CB-8082) Wrap intent calls with checks for Camera
[ https://issues.apache.org/jira/browse/CB-8082?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joe Bowser updated CB-8082: --- Summary: Wrap intent calls with checks for Camera (was: Wrap intent calls with checks) Wrap intent calls with checks for Camera Key: CB-8082 URL: https://issues.apache.org/jira/browse/CB-8082 Project: Apache Cordova Issue Type: Improvement Components: Android Reporter: Joe Bowser Assignee: Joe Bowser As seen on CB-8059, we need to check if intents exist before using them. This could become a huge plugin for Media Capture and Camera, especially if you're trying to use Google TV. It'd be nice if we could wrap this in a utility method and expose it to plugin developers who want to do this. http://www.grokkingandroid.com/checking-intent-availability/ -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-9316) CB-8382 Breaks plugins that directly used CordovaInterface methods
[ https://issues.apache.org/jira/browse/CB-9316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618824#comment-14618824 ] Joe Bowser edited comment on CB-9316 at 7/8/15 5:21 PM: This is too big of an API change to reverse. You can access the CordovaInterface directly from the plugin now. I'm going to set this as Won't fix was (Author: bowserj): This is too big of an API change to reverse. We're going to have to find another way to set the activityResultCallback. I'm going to set this as Won't fix CB-8382 Breaks plugins that directly used CordovaInterface methods -- Key: CB-9316 URL: https://issues.apache.org/jira/browse/CB-9316 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 5.0.0, 5.1.2 Reporter: Blake Israel Labels: Android CB-8382 breaks plugins that relied on manually calling CordovaInterface methods from CordovaActivity. Plugins need the ability to manually set the activityResultCallback in cases where they use third party libraries which launch intents manually. Example: FacebookSDK -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9292) throw ConcurrentModificationException sometimes
[ https://issues.apache.org/jira/browse/CB-9292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619028#comment-14619028 ] Karen Tran commented on CB-9292: The main fix for this exception was in CB-8031, but that should already be in cordova-android 3.6.4. Should try cherrypicking fix in CB-8411 too. That fixed this exception for me. throw ConcurrentModificationException sometimes --- Key: CB-9292 URL: https://issues.apache.org/jira/browse/CB-9292 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 3.6.4 Environment: Hardware Model: 2014813 Hardware Brand: Xiaomi Hardware Product Code: 2014813 Android OS Version: 4.4.4 Hardware Model: SM-N9006 Hardware Brand: samsung Hardware Product Code: h3gzc Android OS Version: 4.4.2 Reporter: Derek Chia Crashed app with Cordova Android 3.6.4 org.apache.cordova.network-information 0.2.15 Exception Stack Trace: {code} java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x410 (has extras) } in org.apache.cordova.networkinformation.NetworkManager$1@42e23190 at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:782) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5335) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) at dalvik.system.NativeStart.main(Native Method) Caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806) at java.util.HashMap$ValueIterator.next(HashMap.java:838) at org.apache.cordova.PluginManager.postMessage(PluginManager.java:271) at org.apache.cordova.CordovaWebView.postMessage(CordovaWebView.java:514) at org.apache.cordova.networkinformation.NetworkManager.sendUpdate(NetworkManager.java:223) at org.apache.cordova.networkinformation.NetworkManager.updateConnectionInfo(NetworkManager.java:174) at org.apache.cordova.networkinformation.NetworkManager.access$000(NetworkManager.java:38) at org.apache.cordova.networkinformation.NetworkManager$1.onReceive(NetworkManager.java:105) at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:772) ... 9 more {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9060) [Android] CordovaWebViewImpl.showWebPage loads in WebView AND launches intent
[ https://issues.apache.org/jira/browse/CB-9060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619342#comment-14619342 ] Dan Polivy commented on CB-9060: [~bowserj] have you been able to repro this with the gist I provided? [Android] CordovaWebViewImpl.showWebPage loads in WebView AND launches intent - Key: CB-9060 URL: https://issues.apache.org/jira/browse/CB-9060 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 4.0.0 Reporter: Dan Polivy Assignee: Joe Bowser Priority: Minor With cordova-android@4.0.0 and the new whitelist functionality, it seems that calls to CordovaWebView.showWebPage (via CordovaWebViewImpl implementation) are getting launched both in the app WebView AND via Intent in the system browser. This happens when, for example, the Cordova app is hosted remotely, so the actual URL is a http://www.somedomain.com/url, and the developer has included the following in config.xml: !-- Allow links to web pages to open in a browser -- allow-intent href=http://*/*; / allow-intent href=https://*/*; / Then, if in the app, there is a call to showWebPage with a URL at http://www.somedomain.com, it will launch in both places. Should there be a return statement at Line 216 to prevent any attempt to load the URL externally, if we actually load it internally? https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaWebViewImpl.java#L216 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-9337) enable use of access tags for native code network requests
Shazron Abdullah created CB-9337: Summary: enable use of access tags for native code network requests Key: CB-9337 URL: https://issues.apache.org/jira/browse/CB-9337 Project: Apache Cordova Issue Type: Bug Components: Plugin Whitelist Environment: iOS 8 Reporter: Shazron Abdullah Assignee: Shazron Abdullah Priority: Blocker Usage of the CSP is inadequate because that governs network requests in the UIWebView. We need to re-enable access tag parsing and create a CDVAccessWhitelistPlugin (similar to the legacy whitelist) so native code network requests can be whitelisted. Note this filter is through CDVURLProtocol, where it checks the viewController for shouldAllowRequestForURL -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9329) cordova-ios medic tests are not getting test results
[ https://issues.apache.org/jira/browse/CB-9329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619431#comment-14619431 ] Shazron Abdullah commented on CB-9329: -- We still need access tags: see CB-9337 cordova-ios medic tests are not getting test results Key: CB-9329 URL: https://issues.apache.org/jira/browse/CB-9329 Project: Apache Cordova Issue Type: Bug Components: Medic Reporter: Shazron Abdullah Labels: cordova-ios-4.0.x http://ci.apache.org/builders/cordova-ios/builds/21/steps/running-tests/logs/stdio Timed out. My guess is it's a whitelist/CSP thing. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-7081) Issue when Cordova upgrade from 2.9 to 3.5
[ https://issues.apache.org/jira/browse/CB-7081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619452#comment-14619452 ] Emmanuel Goldstein commented on CB-7081: Rajesh, you wrote Ok. I managed to fix this issue. about the JSON exception problem. Could you please explain me how you did it? I'm stuck with a similar issue. Thanks a lot! Issue when Cordova upgrade from 2.9 to 3.5 -- Key: CB-7081 URL: https://issues.apache.org/jira/browse/CB-7081 Project: Apache Cordova Issue Type: Bug Components: Android, CordovaJS Affects Versions: 3.5.0 Reporter: Rajesh Kumar I recently upgraded my cordova app from v2.9 to v3.5. When I start my app, I see a JSONException in the logcat console as below: 07-05 16:04:48.457: W/System.err(1917): org.json.JSONException: Value App at 0 of type java.lang.String cannot be converted to int 07-05 16:04:48.457: W/System.err(1917): at org.json.JSON.typeMismatch(JSON.java:100) 07-05 16:04:48.457: W/System.err(1917): at org.json.JSONArray.getInt(JSONArray.java:357) 07-05 16:04:48.457: W/System.err(1917): at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:214) This exception occurs inside the `onJsPrompt()` method of `CordovaChromeClient.java`, when the code tries to read the first element of array. The json array comes from javascript and should be having 4 parameters (bridge secret, service, action, callbackId), but it has only 3. The bridge secret is not present. This call is made from the core plugin `cordova/android/promptbasednativeapi` inside cordova.js. I guess the cordova.js which comes with the cordova download from official cordova site is not correct? I need to know how to pass the bridge secret from js to java. Can someone help me? -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9336) Fix Globalization plugin init on Windows 10
[ https://issues.apache.org/jira/browse/CB-9336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619196#comment-14619196 ] ASF GitHub Bot commented on CB-9336: GitHub user daserge opened a pull request: https://github.com/apache/cordova-plugin-globalization/pull/38 CB-9336 Fix Globalization plugin init on Windows 10 [Jira issue](https://issues.apache.org/jira/browse/CB-9336) You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-globalization CB-9336 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-globalization/pull/38.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 #38 commit ae945c7a6c97aebab0865589ea06ec0e0732f840 Author: daserge dase...@yandex.ru Date: 2015-07-08T19:05:06Z CB-9336 Fix Globalization plugin init on Windows 10 Fix Globalization plugin init on Windows 10 --- Key: CB-9336 URL: https://issues.apache.org/jira/browse/CB-9336 Project: Apache Cordova Issue Type: Bug Components: Plugin Globalization Environment: Windows 10 Reporter: Sergey Shakhnazarov {noformat} SCRIPT87: Unhandled exception at line 291, column 5 in ms-appx-web://org.apache.mobilespec/www/plugins/cordova-plugin-globalization/src/windows/GlobalizationProxy.js 0x80070057 - JavaScript runtime error: The parameter is incorrect. System.Globalization.CultureNotFoundException: Culture is not supported. Parameter name: name undefined is an invalid culture identifier. at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) at GlobalizationProxy.GlobalizationProxy.SetLocale(String name) WinRT information: System.Globalization.CultureNotFoundException: Culture is not supported. Parameter name: name undefined is an invalid culture identifier. at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) at GlobalizationProxy.GlobalizationProxy.SetLocale(String name) {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9295) Google Analytics for Docs website
[ https://issues.apache.org/jira/browse/CB-9295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619390#comment-14619390 ] ASF GitHub Bot commented on CB-9295: Github user nikhilkh commented on the pull request: https://github.com/apache/cordova-docs/pull/295#issuecomment-119734040 I merged this one 2f620e6. I had a typo in my commit message and this PR remained open. Can you please close it? Google Analytics for Docs website - Key: CB-9295 URL: https://issues.apache.org/jira/browse/CB-9295 Project: Apache Cordova Issue Type: Bug Components: Docs Reporter: Nikhil Khandelwal Currently, our docs website references an incorrect ID for GA. We should use the code below to add the new tracking ID. We should ideally replace the ID of *all* versions of our document - not just the current edge version Tracking ID: UA-64283057-1 {code:javascript} script (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-64283057-1', 'auto'); ga('send', 'pageview'); /script {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9330) Remove 'plugman publish' functionality from cordova-lib
[ https://issues.apache.org/jira/browse/CB-9330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619462#comment-14619462 ] ASF GitHub Bot commented on CB-9330: Github user purplecabbage commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/254#discussion_r34204394 --- Diff: cordova-lib/src/plugman/plugman.js --- @@ -169,35 +160,6 @@ plugman.commands = { } }); }, - -'publish' : function(cli_opts) { --- End diff -- +1 to leaving the function stubs around for a bit and simply have them output that this functionality is not supported anymore. Remove 'plugman publish' functionality from cordova-lib Key: CB-9330 URL: https://issues.apache.org/jira/browse/CB-9330 Project: Apache Cordova Issue Type: Improvement Reporter: Vladimir Kotikov Assignee: Vladimir Kotikov Due to CPR write (publish) access shutdown starting from July 15 we need to make some changes to remove CPR publishing related functionality from Cordova. Things, that might be removed: 1. 'plugman publish/unpublish' commands, 2. 'registry.publish/unpublish' methods and all related stuff in cordova-lib. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9330) Remove 'plugman publish' functionality from cordova-lib
[ https://issues.apache.org/jira/browse/CB-9330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619401#comment-14619401 ] ASF GitHub Bot commented on CB-9330: Github user nikhilkh commented on a diff in the pull request: https://github.com/apache/cordova-lib/pull/254#discussion_r34200986 --- Diff: cordova-lib/src/plugman/plugman.js --- @@ -169,35 +160,6 @@ plugman.commands = { } }); }, - -'publish' : function(cli_opts) { --- End diff -- I wonder if these commands should still be exposed but with a meaningful console.error message on either having to use the older version of plugman current or if we decide to make CPR read-only - stating that as such. Remove 'plugman publish' functionality from cordova-lib Key: CB-9330 URL: https://issues.apache.org/jira/browse/CB-9330 Project: Apache Cordova Issue Type: Improvement Reporter: Vladimir Kotikov Assignee: Vladimir Kotikov Due to CPR write (publish) access shutdown starting from July 15 we need to make some changes to remove CPR publishing related functionality from Cordova. Things, that might be removed: 1. 'plugman publish/unpublish' commands, 2. 'registry.publish/unpublish' methods and all related stuff in cordova-lib. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9060) [Android] CordovaWebViewImpl.showWebPage loads in WebView AND launches intent
[ https://issues.apache.org/jira/browse/CB-9060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619404#comment-14619404 ] Joe Bowser commented on CB-9060: Haven't gotten around to this one yet. Everyone at Adobe went on Vacation right when you wrote this, and I'm still doing catch up. I'll probably look at this later today or early tomorrow. [Android] CordovaWebViewImpl.showWebPage loads in WebView AND launches intent - Key: CB-9060 URL: https://issues.apache.org/jira/browse/CB-9060 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 4.0.0 Reporter: Dan Polivy Assignee: Joe Bowser Priority: Minor With cordova-android@4.0.0 and the new whitelist functionality, it seems that calls to CordovaWebView.showWebPage (via CordovaWebViewImpl implementation) are getting launched both in the app WebView AND via Intent in the system browser. This happens when, for example, the Cordova app is hosted remotely, so the actual URL is a http://www.somedomain.com/url, and the developer has included the following in config.xml: !-- Allow links to web pages to open in a browser -- allow-intent href=http://*/*; / allow-intent href=https://*/*; / Then, if in the app, there is a call to showWebPage with a URL at http://www.somedomain.com, it will launch in both places. Should there be a return statement at Line 216 to prevent any attempt to load the URL externally, if we actually load it internally? https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/CordovaWebViewImpl.java#L216 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9292) throw ConcurrentModificationException sometimes
[ https://issues.apache.org/jira/browse/CB-9292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619232#comment-14619232 ] Joe Bowser commented on CB-9292: [~ktop500] So, this is already fixed in master and we can close this issue? throw ConcurrentModificationException sometimes --- Key: CB-9292 URL: https://issues.apache.org/jira/browse/CB-9292 Project: Apache Cordova Issue Type: Bug Components: Android Affects Versions: 3.6.4 Environment: Hardware Model: 2014813 Hardware Brand: Xiaomi Hardware Product Code: 2014813 Android OS Version: 4.4.4 Hardware Model: SM-N9006 Hardware Brand: samsung Hardware Product Code: h3gzc Android OS Version: 4.4.2 Reporter: Derek Chia Crashed app with Cordova Android 3.6.4 org.apache.cordova.network-information 0.2.15 Exception Stack Trace: {code} java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x410 (has extras) } in org.apache.cordova.networkinformation.NetworkManager$1@42e23190 at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:782) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5335) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) at dalvik.system.NativeStart.main(Native Method) Caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806) at java.util.HashMap$ValueIterator.next(HashMap.java:838) at org.apache.cordova.PluginManager.postMessage(PluginManager.java:271) at org.apache.cordova.CordovaWebView.postMessage(CordovaWebView.java:514) at org.apache.cordova.networkinformation.NetworkManager.sendUpdate(NetworkManager.java:223) at org.apache.cordova.networkinformation.NetworkManager.updateConnectionInfo(NetworkManager.java:174) at org.apache.cordova.networkinformation.NetworkManager.access$000(NetworkManager.java:38) at org.apache.cordova.networkinformation.NetworkManager$1.onReceive(NetworkManager.java:105) at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:772) ... 9 more {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Closed] (CB-7667) [Camera] iOS8: Handle case where camera is not authorized
[ https://issues.apache.org/jira/browse/CB-7667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dan Polivy closed CB-7667. -- Closing as this PR has been incorporated. [Camera] iOS8: Handle case where camera is not authorized - Key: CB-7667 URL: https://issues.apache.org/jira/browse/CB-7667 Project: Apache Cordova Issue Type: Sub-task Components: Plugin Camera, Plugin Media Capture Affects Versions: 3.5.0 Environment: iOS 8 Reporter: Dan Polivy Assignee: Shazron Abdullah Priority: Minor In iOS 8, it's possible for the camera to be disabled for any given app; in iOS 7, this was only possible in certain regions (e.g. China). If the camera is disabled, and someone launches the Camera plugin to capture an image from the camera, they'll just get the camera UI with a black screen, and no indication that the camera permission is disabled for the app. A better UX would be to show the user a prompt indicating that the camera permission is disabled, and (on iOS 8) providing a button to take them to the Settings app to change it. As of iOS 7, there's a new API to test whether the app has access to capture the desired media type: https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVCaptureDevice_Class/index.html#//apple_ref/occ/clm/AVCaptureDevice/authorizationStatusForMediaType: [AVCaptureDevice authorizationStatusForMediaType:mediaType]; -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9295) Google Analytics for Docs website
[ https://issues.apache.org/jira/browse/CB-9295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619392#comment-14619392 ] ASF GitHub Bot commented on CB-9295: Github user nikhilkh commented on the pull request: https://github.com/apache/cordova-docs/pull/295#issuecomment-119734093 Thanks for the contribution! Google Analytics for Docs website - Key: CB-9295 URL: https://issues.apache.org/jira/browse/CB-9295 Project: Apache Cordova Issue Type: Bug Components: Docs Reporter: Nikhil Khandelwal Currently, our docs website references an incorrect ID for GA. We should use the code below to add the new tracking ID. We should ideally replace the ID of *all* versions of our document - not just the current edge version Tracking ID: UA-64283057-1 {code:javascript} script (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-64283057-1', 'auto'); ga('send', 'pageview'); /script {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9295) Google Analytics for Docs website
[ https://issues.apache.org/jira/browse/CB-9295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619388#comment-14619388 ] ASF subversion and git services commented on CB-9295: - Commit 2f620e6cff23bb8fd8d7f3f6f390be2146135c00 in cordova-docs's branch refs/heads/master from [~akurdyumov] [ https://git-wip-us.apache.org/repos/asf?p=cordova-docs.git;h=2f620e6 ] CB-9295 Add GA analytics code on the Cordova Docs page. This closes #9295 Google Analytics for Docs website - Key: CB-9295 URL: https://issues.apache.org/jira/browse/CB-9295 Project: Apache Cordova Issue Type: Bug Components: Docs Reporter: Nikhil Khandelwal Currently, our docs website references an incorrect ID for GA. We should use the code below to add the new tracking ID. We should ideally replace the ID of *all* versions of our document - not just the current edge version Tracking ID: UA-64283057-1 {code:javascript} script (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-64283057-1', 'auto'); ga('send', 'pageview'); /script {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-9330) Remove 'plugman publish' functionality from cordova-lib
Vladimir Kotikov created CB-9330: Summary: Remove 'plugman publish' functionality from cordova-lib Key: CB-9330 URL: https://issues.apache.org/jira/browse/CB-9330 Project: Apache Cordova Issue Type: Improvement Reporter: Vladimir Kotikov Assignee: Vladimir Kotikov Due to CPR write (publish) access shutdown starting from July 15 we need to make some changes to remove CPR publishing related functionality from Cordova. Things, that might be removed: 1. 'plugman publish/unpublish' commands, 2. 'registry.publish/unpublish' methods and all related stuff in cordova-lib. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-9331) getFreeDiskSpace() returns 0 on iOS
Gaven Henry created CB-9331: --- Summary: getFreeDiskSpace() returns 0 on iOS Key: CB-9331 URL: https://issues.apache.org/jira/browse/CB-9331 Project: Apache Cordova Issue Type: Bug Components: Plugin File Environment: iOS device or emulator Reporter: Gaven Henry Priority: Minor getFreeDiskSpace() method of the file plugin will always return 0 on the iOS emulator or on an iOS device -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9331) getFreeDiskSpace() returns 0 on iOS
[ https://issues.apache.org/jira/browse/CB-9331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618104#comment-14618104 ] ASF GitHub Bot commented on CB-9331: GitHub user ghenry22 opened a pull request: https://github.com/apache/cordova-plugin-file/pull/125 CB-9331 cordova-plugin-file resolves CB-9331, correct the value queried on iOS devices so that free getFreeDiskSpace() returns a valid value instead of always returning 0. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ghenry22/cordova-plugin-file master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-file/pull/125.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 #125 commit 655ab124586a0431e21431f28ba02db1718fdeb3 Author: ghenry22 ghenr...@gmail.com Date: 2015-07-07T10:29:28Z CB-6703cordova-plugin-file Fix getFreeSpace always returns 0 on iOS getFreeDiskSpace() returns 0 on iOS --- Key: CB-9331 URL: https://issues.apache.org/jira/browse/CB-9331 Project: Apache Cordova Issue Type: Bug Components: Plugin File Environment: iOS device or emulator Reporter: Gaven Henry Priority: Minor Original Estimate: 1h Remaining Estimate: 1h getFreeDiskSpace() method of the file plugin will always return 0 on the iOS emulator or on an iOS device -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-6703) getFreeDiskSpace() unused, not in the .js interface
[ https://issues.apache.org/jira/browse/CB-6703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618106#comment-14618106 ] Gaven Henry commented on CB-6703: - Ok cool no problem, I have closed my previous pull request. Have opened a new issue in Jira CB-9331 and submitted a pull request for that Jira ID which will resolve the returning 0 issue. getFreeDiskSpace() unused, not in the .js interface --- Key: CB-6703 URL: https://issues.apache.org/jira/browse/CB-6703 Project: Apache Cordova Issue Type: Bug Components: Plugin File Reporter: Shazron Abdullah Assignee: Shazron Abdullah This is because it's not part of the w3c spec. Remove? Consequently I was made aware of this because of a PR: https://github.com/apache/cordova-plugin-file/pull/45 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9295) Google Analytics for Docs website
[ https://issues.apache.org/jira/browse/CB-9295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618117#comment-14618117 ] ASF GitHub Bot commented on CB-9295: Github user kant2002 commented on the pull request: https://github.com/apache/cordova-docs/pull/295#issuecomment-119465537 To update the file index.js should be distributed to all versions. Google Analytics for Docs website - Key: CB-9295 URL: https://issues.apache.org/jira/browse/CB-9295 Project: Apache Cordova Issue Type: Bug Components: Docs Reporter: Nikhil Khandelwal Currently, our docs website references an incorrect ID for GA. We should use the code below to add the new tracking ID. We should ideally replace the ID of *all* versions of our document - not just the current edge version Tracking ID: UA-64283057-1 {code:javascript} script (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-64283057-1', 'auto'); ga('send', 'pageview'); /script {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9295) Google Analytics for Docs website
[ https://issues.apache.org/jira/browse/CB-9295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618115#comment-14618115 ] ASF GitHub Bot commented on CB-9295: Github user kant2002 commented on the pull request: https://github.com/apache/cordova-docs/pull/295#issuecomment-119465461 Ok, so I drop it. Google Analytics for Docs website - Key: CB-9295 URL: https://issues.apache.org/jira/browse/CB-9295 Project: Apache Cordova Issue Type: Bug Components: Docs Reporter: Nikhil Khandelwal Currently, our docs website references an incorrect ID for GA. We should use the code below to add the new tracking ID. We should ideally replace the ID of *all* versions of our document - not just the current edge version Tracking ID: UA-64283057-1 {code:javascript} script (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-64283057-1', 'auto'); ga('send', 'pageview'); /script {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-6703) getFreeDiskSpace() unused, not in the .js interface
[ https://issues.apache.org/jira/browse/CB-6703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618076#comment-14618076 ] jcesarmobile commented on CB-6703: -- What I mean is, your pull request doesn't fix this issue (CB-6703), you should create a new issue for getFreeDiskSpace() returning 0 on iOS, and change your pull request with the new id you get when you create the new issue. getFreeDiskSpace() unused, not in the .js interface --- Key: CB-6703 URL: https://issues.apache.org/jira/browse/CB-6703 Project: Apache Cordova Issue Type: Bug Components: Plugin File Reporter: Shazron Abdullah Assignee: Shazron Abdullah This is because it's not part of the w3c spec. Remove? Consequently I was made aware of this because of a PR: https://github.com/apache/cordova-plugin-file/pull/45 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-6703) getFreeDiskSpace() unused, not in the .js interface
[ https://issues.apache.org/jira/browse/CB-6703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618056#comment-14618056 ] jcesarmobile commented on CB-6703: -- That fix the iOS returning 0 issue, but this issue is about not having getFreeDiskSpace() javascript interface getFreeDiskSpace() unused, not in the .js interface --- Key: CB-6703 URL: https://issues.apache.org/jira/browse/CB-6703 Project: Apache Cordova Issue Type: Bug Components: Plugin File Reporter: Shazron Abdullah Assignee: Shazron Abdullah This is because it's not part of the w3c spec. Remove? Consequently I was made aware of this because of a PR: https://github.com/apache/cordova-plugin-file/pull/45 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-6703) getFreeDiskSpace() unused, not in the .js interface
[ https://issues.apache.org/jira/browse/CB-6703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14618065#comment-14618065 ] Gaven Henry commented on CB-6703: - Yes but there is no point having a js interface if the underlying function is broken and always returning 0. So here is step one, make the underlying function actually work on iOS. You can then immediately use ngCordova which gives you a js interface to getFreeDiskSpace(). If you like once my PR above is merged then you could ask Nic to merge his js interface into the official plugin so it is available directly as well as through the ngCordova layer, it would be a simple thing to add. getFreeDiskSpace() unused, not in the .js interface --- Key: CB-6703 URL: https://issues.apache.org/jira/browse/CB-6703 Project: Apache Cordova Issue Type: Bug Components: Plugin File Reporter: Shazron Abdullah Assignee: Shazron Abdullah This is because it's not part of the w3c spec. Remove? Consequently I was made aware of this because of a PR: https://github.com/apache/cordova-plugin-file/pull/45 -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9094) [android] Splashscreen is incorrectly hidden after delay if show is called with no timeout
[ https://issues.apache.org/jira/browse/CB-9094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619350#comment-14619350 ] ASF GitHub Bot commented on CB-9094: Github user dpolivy commented on the pull request: https://github.com/apache/cordova-plugin-splashscreen/pull/49#issuecomment-119727865 @stevengill @infil00p Any possibility of reviewing this before the next release? [android] Splashscreen is incorrectly hidden after delay if show is called with no timeout -- Key: CB-9094 URL: https://issues.apache.org/jira/browse/CB-9094 Project: Apache Cordova Issue Type: Bug Components: Plugin SplashScreen Reporter: Dan Polivy Priority: Minor The Android SplashScreen plugin's showSplashScreen() method takes a parameter that determines whether the splashscreen should be hidden after a configurable delay. If an initial call to show the splash screen comes in with a delay, but while it is visible a second call comes in to show the splashscreen WITHOUT a delay, the splash screen will still be removed after the initial delay. In this scenario, I would expect that, due to the second call to show without auto-hiding, the splash screen would stay visible until the hide() method is called. Repro steps: 1. Splash screen is automatically shown on startup (e.g. showSplashScreen(true) is called in plugin initializer). If no SplashScreenDelay is specified in config.xml, then a default of 3s is used. 2. While the splash screen is still visible, the user calls navigator.splashscreen.show() from code (meaning it should be shown without a timeout, e.g. showSplashScreen(false) is called from onMessage). Actual: Splash screen disappears after delay. Expected: Splash screen should stay visible until hide() is explicitly called. -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9295) Google Analytics for Docs website
[ https://issues.apache.org/jira/browse/CB-9295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619367#comment-14619367 ] ASF GitHub Bot commented on CB-9295: Github user nikhilkh commented on the pull request: https://github.com/apache/cordova-docs/pull/295#issuecomment-119730497 I see - I can take a stab at updating all the older versions on the svn repo that has our website. Google Analytics for Docs website - Key: CB-9295 URL: https://issues.apache.org/jira/browse/CB-9295 Project: Apache Cordova Issue Type: Bug Components: Docs Reporter: Nikhil Khandelwal Currently, our docs website references an incorrect ID for GA. We should use the code below to add the new tracking ID. We should ideally replace the ID of *all* versions of our document - not just the current edge version Tracking ID: UA-64283057-1 {code:javascript} script (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-64283057-1', 'auto'); ga('send', 'pageview'); /script {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-9338) Issue when Cordova upgrade from 3.5 to 4.0.2
Emmanuel Goldstein created CB-9338: -- Summary: Issue when Cordova upgrade from 3.5 to 4.0.2 Key: CB-9338 URL: https://issues.apache.org/jira/browse/CB-9338 Project: Apache Cordova Issue Type: Bug Components: Android, CordovaJS Affects Versions: 4.0.1 Reporter: Emmanuel Goldstein I recently upgraded my cordova app from v3.5.0 to 4.0.2. When I start my app, I see a JSONException in the logcat console as below: W/System.err( 4761): org.json.JSONException: Value PluginManager at 0 of type java.lang.String cannot be converted to int W/System.err( 4761):at org.json.JSON.typeMismatch(JSON.java:100) W/System.err( 4761):at org.json.JSONArray.getInt(JSONArray.java:357) W/System.err( 4761):at org.apache.cordova.CordovaBridge.promptOnJsPrompt(CordovaBridge.java:131) W/System.err( 4761):at org.apache.cordova.engine.SystemWebChromeClient.onJsPrompt(SystemWebChromeClient.java:119) W/System.err( 4761):at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:655) W/System.err( 4761):at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err( 4761):at android.os.Looper.loop(Looper.java:137) W/System.err( 4761):at android.app.ActivityThread.main(ActivityThread.java:4745) W/System.err( 4761):at java.lang.reflect.Method.invokeNative(Native Method) W/System.err( 4761):at java.lang.reflect.Method.invoke(Method.java:511) W/System.err( 4761):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) W/System.err( 4761):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) W/System.err( 4761):at dalvik.system.NativeStart.main(Native Method) D/dalvikvm( 4761): GC_CONCURRENT freed 122K, 3% free 8470K/8711K, paused 0ms+1ms, total 4ms D/TilesManager( 4761): new EGLContext from framework: b81ec3d0 D/GLWebViewState( 4761): Reinit shader D/GLWebViewState( 4761): Reinit transferQueue W/System.err( 4761): org.json.JSONException: Value App at 0 of type java.lang.String cannot be converted to int W/System.err( 4761):at org.json.JSON.typeMismatch(JSON.java:100) W/System.err( 4761):at org.json.JSONArray.getInt(JSONArray.java:357) W/System.err( 4761):at org.apache.cordova.CordovaBridge.promptOnJsPrompt(CordovaBridge.java:131) W/System.err( 4761):at org.apache.cordova.engine.SystemWebChromeClient.onJsPrompt(SystemWebChromeClient.java:119) W/System.err( 4761):at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:655) W/System.err( 4761):at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err( 4761):at android.os.Looper.loop(Looper.java:137) W/System.err( 4761):at android.app.ActivityThread.main(ActivityThread.java:4745) W/System.err( 4761):at java.lang.reflect.Method.invokeNative(Native Method) W/System.err( 4761):at java.lang.reflect.Method.invoke(Method.java:511) W/System.err( 4761):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) W/System.err( 4761):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) W/System.err( 4761):at dalvik.system.NativeStart.main(Native Method) W/System.err( 4761): org.json.JSONException: Value File at 0 of type java.lang.String cannot be converted to int W/System.err( 4761):at org.json.JSON.typeMismatch(JSON.java:100) W/System.err( 4761):at org.json.JSONArray.getInt(JSONArray.java:357) W/System.err( 4761):at org.apache.cordova.CordovaBridge.promptOnJsPrompt(CordovaBridge.java:131) W/System.err( 4761):at org.apache.cordova.engine.SystemWebChromeClient.onJsPrompt(SystemWebChromeClient.java:119) W/System.err( 4761):at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:655) W/System.err( 4761):at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err( 4761):at android.os.Looper.loop(Looper.java:137) W/System.err( 4761):at android.app.ActivityThread.main(ActivityThread.java:4745) W/System.err( 4761):at java.lang.reflect.Method.invokeNative(Native Method) W/System.err( 4761):at java.lang.reflect.Method.invoke(Method.java:511) W/System.err( 4761):at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) W/System.err( 4761):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) W/System.err( 4761):at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 333): Activity destroy timeout for ActivityRecord{53626250 com.test.app/.MainActivity} I/Web Console( 4761): deviceready has not fired after 5 seconds. at file:///data/data/com.test.app/files/target/android/cordova.js:1154 I/Web Console( 4761): Channel not fired: onFileSystemPathsReady at file:///data/data/com.test.app/files/target/android/cordova.js:1147 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CB-9283) Windows 10: Migrate to new deployment infrastructure
[ https://issues.apache.org/jira/browse/CB-9283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619920#comment-14619920 ] ASF GitHub Bot commented on CB-9283: Github user TimBarham commented on a diff in the pull request: https://github.com/apache/cordova-windows/pull/96#discussion_r34224410 --- Diff: template/cordova/lib/package.js --- @@ -130,58 +145,47 @@ module.exports.findDevice = function (target) { }; // returns array of available devices names -module.exports.listDevices = function () { -return utils.getAppDeployUtils().then(function(appDeployUtils) { -return exec('' + appDeployUtils + ' /enumeratedevices').then(function(output) { -return Q.resolve(output.split('\n').map(function(line) { -var match = /\s*(\d)+\s+(.*)/.exec(line); -return match match[2]; -}).filter(function (line) { -return line; -})); +module.exports.listDevices = function (deploymentTool) { + +return deploymentTool.enumerateDevices().then(function(deviceList) { +return deviceList.map(function(device) { +return device.toString(); }); -}); -}; - -function installAppToPhone(appDeployUtils, package, target, update) { -// /installlaunch option sometimes fails with 'Error: The parameter is incorrect.' -// so we use separate steps to /install or /update and then /launch -var cmd = update ? '/update' : '/install'; -console.log('Installing application...'); -return spawn(appDeployUtils, [cmd, package.appx, '/targetdevice:' + target]); -} +}, function(e) { +console.warn('Failed to enumerate devices'); +console.warn(e); -function runAppOnPhone(appDeployUtils, target) { -return Q().then(function() { -return module.exports.getAppId(path.join(__dirname, '..', '..')); -}).then(function(appId) { -console.log('Running application... '); -return spawn(appDeployUtils, ['/launch', appId, '/targetdevice:' + target]); +throw e; }); -} +}; + function uninstallAppFromPhone(appDeployUtils, package, target) { console.log('Attempting to remove previously installed application...'); -return spawn(appDeployUtils, ['/uninstall', package.phoneId, '/targetdevice:' + target]); +return appDeployUtils.uninstallAppPackage(package.phoneId, target); } // deploys specified phone package to device/emulator and launches it -module.exports.deployToPhone = function (package, deployTarget, targetWindows10) { -var getTarget = deployTarget == 'device' ? Q('de') : -deployTarget == 'emulator' ? Q('xd') : module.exports.findDevice(deployTarget); - -return getTarget.then(function(target) { -return utils.getAppDeployUtils(targetWindows10).then(function(appDeployUtils) { +module.exports.deployToPhone = function (package, deployTarget, targetWindows10, deploymentTool) { +var deployment; +if (deploymentTool) { +deployment = Q(deploymentTool); +} +else { +deployment = utils.getAppDeployUtils(targetWindows10); +} -return uninstallAppFromPhone(appDeployUtils, package, target).then( +return deployment.then(function(deploymentTool) { +return module.exports.findDevice(deploymentTool, deployTarget).then(function(target) { +return uninstallAppFromPhone(deploymentTool, package, target).then( function() {}, function() {}).then(function() { -return installAppToPhone(appDeployUtils, package, target, false); -}).then(function() { -return runAppOnPhone(appDeployUtils, target); -}, function(error) { +// shouldUpdate = false because we've already uninstalled +return deploymentTool.installAppPackage(package.appx, target, true, false); --- End diff -- :+1: It's a common recommendation for literal Boolean arguments in particular to name them at the call point to aid readability. Since JavaScript doesn't support named arguments, the usual approach is to include an inline comment, so: ```js return deploymentTool.installAppPackage(package.appx, target, /*shouldLaunch*/ true, /*somethingElse*/ false); ``` Windows 10: Migrate to new deployment infrastructure Key: CB-9283 URL: https://issues.apache.org/jira/browse/CB-9283 Project: Apache Cordova Issue Type:
[jira] [Commented] (CB-9295) Google Analytics for Docs website
[ https://issues.apache.org/jira/browse/CB-9295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619821#comment-14619821 ] ASF GitHub Bot commented on CB-9295: Github user kant2002 closed the pull request at: https://github.com/apache/cordova-docs/pull/295 Google Analytics for Docs website - Key: CB-9295 URL: https://issues.apache.org/jira/browse/CB-9295 Project: Apache Cordova Issue Type: Bug Components: Docs Reporter: Nikhil Khandelwal Currently, our docs website references an incorrect ID for GA. We should use the code below to add the new tracking ID. We should ideally replace the ID of *all* versions of our document - not just the current edge version Tracking ID: UA-64283057-1 {code:javascript} script (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-64283057-1', 'auto'); ga('send', 'pageview'); /script {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9337) enable use of access tags for native code network requests
[ https://issues.apache.org/jira/browse/CB-9337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619523#comment-14619523 ] ASF subversion and git services commented on CB-9337: - Commit b2143d928a84f62531da3887df35bc3ce480ebdc in cordova-plugin-whitelist's branch refs/heads/master from [~shazron] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-whitelist.git;h=b2143d9 ] CB-9337 - enable use of access tags for native code network requests enable use of access tags for native code network requests Key: CB-9337 URL: https://issues.apache.org/jira/browse/CB-9337 Project: Apache Cordova Issue Type: Bug Components: Plugin Whitelist Environment: iOS 8 Reporter: Shazron Abdullah Assignee: Shazron Abdullah Priority: Blocker Usage of the CSP is inadequate because that governs network requests in the UIWebView. We need to re-enable access tag parsing and create a CDVAccessWhitelistPlugin (similar to the legacy whitelist) so native code network requests can be whitelisted. Note this filter is through CDVURLProtocol, where it checks the viewController for shouldAllowRequestForURL -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-9339) Sensor status is unavailable in Nexus 7 devices
Murat Sutunc created CB-9339: Summary: Sensor status is unavailable in Nexus 7 devices Key: CB-9339 URL: https://issues.apache.org/jira/browse/CB-9339 Project: Apache Cordova Issue Type: Bug Components: Android, Plugin Device Motion Reporter: Murat Sutunc Assignee: Murat Sutunc -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9331) getFreeDiskSpace() returns 0 on iOS
[ https://issues.apache.org/jira/browse/CB-9331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14619663#comment-14619663 ] ASF GitHub Bot commented on CB-9331: Github user ghenry22 commented on the pull request: https://github.com/apache/cordova-plugin-file/pull/125#issuecomment-119771695 Hi edades, I don't think that is relevant to this pull request, I have this plugin (with and without this pull request) in my project and it works fine. Please make sure that you are testing on a physical device, it looks like maybe you are testing on Chrome? Deviceready will not fire if you are not using a physical device (or an appropriate emulator). In your screenshot I see device ready has not fired which seems to confirm this. Anyway I would suggest searching around a bit as you won't be likely to get much response to a post here as the question doesn't relate to this pull request. getFreeDiskSpace() returns 0 on iOS --- Key: CB-9331 URL: https://issues.apache.org/jira/browse/CB-9331 Project: Apache Cordova Issue Type: Bug Components: Plugin File Environment: iOS device or emulator Reporter: Gaven Henry Priority: Minor Original Estimate: 1h Remaining Estimate: 1h getFreeDiskSpace() method of the file plugin will always return 0 on the iOS emulator or on an iOS device -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-9336) Fix Globalization plugin init on Windows 10
Sergey Shakhnazarov created CB-9336: --- Summary: Fix Globalization plugin init on Windows 10 Key: CB-9336 URL: https://issues.apache.org/jira/browse/CB-9336 Project: Apache Cordova Issue Type: Bug Components: Plugin Globalization Environment: Windows 10 Reporter: Sergey Shakhnazarov {noformat} SCRIPT87: Unhandled exception at line 291, column 5 in ms-appx-web://org.apache.mobilespec/www/plugins/cordova-plugin-globalization/src/windows/GlobalizationProxy.js 0x80070057 - JavaScript runtime error: The parameter is incorrect. System.Globalization.CultureNotFoundException: Culture is not supported. Parameter name: name undefined is an invalid culture identifier. at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) at GlobalizationProxy.GlobalizationProxy.SetLocale(String name) WinRT information: System.Globalization.CultureNotFoundException: Culture is not supported. Parameter name: name undefined is an invalid culture identifier. at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride) at GlobalizationProxy.GlobalizationProxy.SetLocale(String name) {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org