[jira] [Commented] (CB-13614) Asset tag create only works if file is targeted to root directory
[ https://issues.apache.org/jira/browse/CB-13614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279739#comment-16279739 ] ASF GitHub Bot commented on CB-13614: - purplecabbage closed pull request #49: CB-13614: (browser) Fix asset copy bug. URL: https://github.com/apache/cordova-browser/pull/49 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/bin/template/cordova/browser_handler.js b/bin/template/cordova/browser_handler.js index 3e12c25..da1be3f 100644 --- a/bin/template/cordova/browser_handler.js +++ b/bin/template/cordova/browser_handler.js @@ -120,6 +120,9 @@ module.exports = { if (fs.statSync(src).isDirectory()) { shell.cp('-Rf', src + '/*', dest); } else { +if (path.parse(asset.target).dir !== '') { +shell.mkdir('-p', path.parse(dest).dir); +} shell.cp('-f', src, dest); } }, diff --git a/spec/browser_handler.spec.js b/spec/browser_handler.spec.js index 70a0682..1654b75 100644 --- a/spec/browser_handler.spec.js +++ b/spec/browser_handler.spec.js @@ -24,10 +24,10 @@ var path = require('path'); describe('Asset install tests', function () { var fsstatMock; -var asset = { itemType: 'asset', src: 'someSrc/ServiceWorker.js', target: 'ServiceWorker.js' }; +var asset = { itemType: 'asset', src: path.join('someSrc', 'ServiceWorker.js'), target: 'ServiceWorker.js' }; +var assetWithPath = { itemType: 'asset', src: path.join('someSrc', 'reformat.js'), target: path.join('js', 'deepdown', 'reformat.js') }; var plugin_dir = 'pluginDir'; var wwwDest = 'dest'; -var cpPath = path.join(plugin_dir, asset.src); it('if src is a directory, should be called with cp, -Rf', function () { var cp = spyOn(shell, 'cp').and.returnValue('-Rf'); @@ -40,8 +40,9 @@ describe('Asset install tests', function () { browser_handler.asset.install(asset, plugin_dir, wwwDest); expect(cp).toHaveBeenCalledWith('-Rf', jasmine.any(String), path.join('dest', asset.target)); }); -it('if src is not a directory, should be called with cp, -f', function () { +it('if src is not a directory and asset has no path, should be called with cp, -f', function () { var cp = spyOn(shell, 'cp').and.returnValue('-f'); +var mkdir = spyOn(shell, 'mkdir'); fsstatMock = { isDirectory: function () { return false; @@ -49,6 +50,20 @@ describe('Asset install tests', function () { }; spyOn(fs, 'statSync').and.returnValue(fsstatMock); browser_handler.asset.install(asset, plugin_dir, wwwDest); -expect(cp).toHaveBeenCalledWith('-f', cpPath, path.join('dest', asset.target)); +expect(mkdir).not.toHaveBeenCalled(); +expect(cp).toHaveBeenCalledWith('-f', path.join('pluginDir', 'someSrc', 'ServiceWorker.js'), path.join('dest', 'ServiceWorker.js')); +}); +it('if src is not a directory and asset has a path, should be called with cp, -f', function () { +var cp = spyOn(shell, 'cp').and.returnValue('-f'); +var mkdir = spyOn(shell, 'mkdir'); +fsstatMock = { +isDirectory: function () { +return false; +} +}; +spyOn(fs, 'statSync').and.returnValue(fsstatMock); +browser_handler.asset.install(assetWithPath, plugin_dir, wwwDest); +expect(mkdir).toHaveBeenCalledWith('-p', path.join('dest', 'js', 'deepdown')); +expect(cp).toHaveBeenCalledWith('-f', path.join('pluginDir', 'someSrc', 'reformat.js'), path.join('dest', 'js', 'deepdown', 'reformat.js')); }); }); This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Asset tag create only works if file is targeted to root directory > - > > Key: CB-13614 > URL: https://issues.apache.org/jira/browse/CB-13614 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-browser >Affects Versions: 5.0.1 >Reporter: George Campbell >Assignee: Jesse MacFadyen > > Inside a plugin.xml file, > > results in: > cp: copyFileSync: could not write to dest file > (code=ENOENT):/Users/campbelg/IdeaProjects/wms-circ-app/platforms/browser/platform_www/style/inappbrowser.css > Related to
[jira] [Commented] (CB-13614) Asset tag create only works if file is targeted to root directory
[ https://issues.apache.org/jira/browse/CB-13614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279731#comment-16279731 ] ASF subversion and git services commented on CB-13614: -- Commit 31070d9b2f376e601fabbb0da836dcf8e5212011 in cordova-browser's branch refs/heads/master from [~auso] [ https://gitbox.apache.org/repos/asf?p=cordova-browser.git;h=31070d9 ] Merge pull request #48 from audreyso/CB-13562 CB-13562 : fixed asset tag when adding push plugin to browser CB-13614 Create file path before copying asset Fixes a bug that prevented copying over plugin assets that were nested in folders by creating a directory path before the copy command. CB-13614 Allow assets with a path to copy over correctly. CB-13614 Remove commented out code. > Asset tag create only works if file is targeted to root directory > - > > Key: CB-13614 > URL: https://issues.apache.org/jira/browse/CB-13614 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-browser >Affects Versions: 5.0.1 >Reporter: George Campbell >Assignee: Jesse MacFadyen > > Inside a plugin.xml file, > > results in: > cp: copyFileSync: could not write to dest file > (code=ENOENT):/Users/campbelg/IdeaProjects/wms-circ-app/platforms/browser/platform_www/style/inappbrowser.css > Related to CB-13562, which fixed the case of an asset file whose target was > the root directory. This bug is for assets whose target contains a directory. > The expected behavior is described by the plugin.xml documentation: > https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#asset -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13614) Asset tag create only works if file is targeted to root directory
[ https://issues.apache.org/jira/browse/CB-13614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279733#comment-16279733 ] ASF subversion and git services commented on CB-13614: -- Commit 64a3b432936e400f33b0ee6b00034365fe44ce01 in cordova-browser's branch refs/heads/master from [~campbelg] [ https://gitbox.apache.org/repos/asf?p=cordova-browser.git;h=64a3b43 ] CB-13614 create intermediate file paths > Asset tag create only works if file is targeted to root directory > - > > Key: CB-13614 > URL: https://issues.apache.org/jira/browse/CB-13614 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-browser >Affects Versions: 5.0.1 >Reporter: George Campbell >Assignee: Jesse MacFadyen > > Inside a plugin.xml file, > > results in: > cp: copyFileSync: could not write to dest file > (code=ENOENT):/Users/campbelg/IdeaProjects/wms-circ-app/platforms/browser/platform_www/style/inappbrowser.css > Related to CB-13562, which fixed the case of an asset file whose target was > the root directory. This bug is for assets whose target contains a directory. > The expected behavior is described by the plugin.xml documentation: > https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#asset -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13614) Asset tag create only works if file is targeted to root directory
[ https://issues.apache.org/jira/browse/CB-13614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279732#comment-16279732 ] ASF subversion and git services commented on CB-13614: -- Commit 31070d9b2f376e601fabbb0da836dcf8e5212011 in cordova-browser's branch refs/heads/master from [~auso] [ https://gitbox.apache.org/repos/asf?p=cordova-browser.git;h=31070d9 ] Merge pull request #48 from audreyso/CB-13562 CB-13562 : fixed asset tag when adding push plugin to browser CB-13614 Create file path before copying asset Fixes a bug that prevented copying over plugin assets that were nested in folders by creating a directory path before the copy command. CB-13614 Allow assets with a path to copy over correctly. CB-13614 Remove commented out code. > Asset tag create only works if file is targeted to root directory > - > > Key: CB-13614 > URL: https://issues.apache.org/jira/browse/CB-13614 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-browser >Affects Versions: 5.0.1 >Reporter: George Campbell >Assignee: Jesse MacFadyen > > Inside a plugin.xml file, > > results in: > cp: copyFileSync: could not write to dest file > (code=ENOENT):/Users/campbelg/IdeaProjects/wms-circ-app/platforms/browser/platform_www/style/inappbrowser.css > Related to CB-13562, which fixed the case of an asset file whose target was > the root directory. This bug is for assets whose target contains a directory. > The expected behavior is described by the plugin.xml documentation: > https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#asset -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13614) Asset tag create only works if file is targeted to root directory
[ https://issues.apache.org/jira/browse/CB-13614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279734#comment-16279734 ] ASF subversion and git services commented on CB-13614: -- Commit 6fd835553d98553928643b2643db75e237fc79f3 in cordova-browser's branch refs/heads/master from [~campbelg] [ https://gitbox.apache.org/repos/asf?p=cordova-browser.git;h=6fd8355 ] CB-13614 Fix tests for windows style paths > Asset tag create only works if file is targeted to root directory > - > > Key: CB-13614 > URL: https://issues.apache.org/jira/browse/CB-13614 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-browser >Affects Versions: 5.0.1 >Reporter: George Campbell >Assignee: Jesse MacFadyen > > Inside a plugin.xml file, > > results in: > cp: copyFileSync: could not write to dest file > (code=ENOENT):/Users/campbelg/IdeaProjects/wms-circ-app/platforms/browser/platform_www/style/inappbrowser.css > Related to CB-13562, which fixed the case of an asset file whose target was > the root directory. This bug is for assets whose target contains a directory. > The expected behavior is described by the plugin.xml documentation: > https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#asset -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13562) Asset tag creates a directory with same name of targeted file
[ https://issues.apache.org/jira/browse/CB-13562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279729#comment-16279729 ] ASF subversion and git services commented on CB-13562: -- Commit 31070d9b2f376e601fabbb0da836dcf8e5212011 in cordova-browser's branch refs/heads/master from [~auso] [ https://gitbox.apache.org/repos/asf?p=cordova-browser.git;h=31070d9 ] Merge pull request #48 from audreyso/CB-13562 CB-13562 : fixed asset tag when adding push plugin to browser CB-13614 Create file path before copying asset Fixes a bug that prevented copying over plugin assets that were nested in folders by creating a directory path before the copy command. CB-13614 Allow assets with a path to copy over correctly. CB-13614 Remove commented out code. > Asset tag creates a directory with same name of targeted file > - > > Key: CB-13562 > URL: https://issues.apache.org/jira/browse/CB-13562 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-browser >Affects Versions: 5.0.1 >Reporter: Simon MacDonald >Assignee: Jesse MacFadyen > Labels: reproduced, triaged > > Asset tag appears to be broken in the browser platform. According to the docs > at http://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#asset when > you add an asset tag like: > {code:xml} > > {code} > it should copy www/foo.js to platforms/browser/www/foo.js but instead it > creates a subdirectory called foo.js and the full path to the file is > platforms/browser/www/foo.js/foo.js. > If you want to duplicate this issue please create a new project then: > cordova platform add browser@5.0.1 > cordova plugin add phonegap-plugin-push > cordova build browser > then you will see that > platforms/browser/www/ServiceWorker.js/ServiceWorker.js exists when it should > be platforms/browser/www/ServiceWorker.js. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13614) Asset tag create only works if file is targeted to root directory
[ https://issues.apache.org/jira/browse/CB-13614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279730#comment-16279730 ] ASF subversion and git services commented on CB-13614: -- Commit 31070d9b2f376e601fabbb0da836dcf8e5212011 in cordova-browser's branch refs/heads/master from [~auso] [ https://gitbox.apache.org/repos/asf?p=cordova-browser.git;h=31070d9 ] Merge pull request #48 from audreyso/CB-13562 CB-13562 : fixed asset tag when adding push plugin to browser CB-13614 Create file path before copying asset Fixes a bug that prevented copying over plugin assets that were nested in folders by creating a directory path before the copy command. CB-13614 Allow assets with a path to copy over correctly. CB-13614 Remove commented out code. > Asset tag create only works if file is targeted to root directory > - > > Key: CB-13614 > URL: https://issues.apache.org/jira/browse/CB-13614 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-browser >Affects Versions: 5.0.1 >Reporter: George Campbell >Assignee: Jesse MacFadyen > > Inside a plugin.xml file, > > results in: > cp: copyFileSync: could not write to dest file > (code=ENOENT):/Users/campbelg/IdeaProjects/wms-circ-app/platforms/browser/platform_www/style/inappbrowser.css > Related to CB-13562, which fixed the case of an asset file whose target was > the root directory. This bug is for assets whose target contains a directory. > The expected behavior is described by the plugin.xml documentation: > https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#asset -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13562) Asset tag creates a directory with same name of targeted file
[ https://issues.apache.org/jira/browse/CB-13562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279728#comment-16279728 ] ASF subversion and git services commented on CB-13562: -- Commit 31070d9b2f376e601fabbb0da836dcf8e5212011 in cordova-browser's branch refs/heads/master from [~auso] [ https://gitbox.apache.org/repos/asf?p=cordova-browser.git;h=31070d9 ] Merge pull request #48 from audreyso/CB-13562 CB-13562 : fixed asset tag when adding push plugin to browser CB-13614 Create file path before copying asset Fixes a bug that prevented copying over plugin assets that were nested in folders by creating a directory path before the copy command. CB-13614 Allow assets with a path to copy over correctly. CB-13614 Remove commented out code. > Asset tag creates a directory with same name of targeted file > - > > Key: CB-13562 > URL: https://issues.apache.org/jira/browse/CB-13562 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-browser >Affects Versions: 5.0.1 >Reporter: Simon MacDonald >Assignee: Jesse MacFadyen > Labels: reproduced, triaged > > Asset tag appears to be broken in the browser platform. According to the docs > at http://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#asset when > you add an asset tag like: > {code:xml} > > {code} > it should copy www/foo.js to platforms/browser/www/foo.js but instead it > creates a subdirectory called foo.js and the full path to the file is > platforms/browser/www/foo.js/foo.js. > If you want to duplicate this issue please create a new project then: > cordova platform add browser@5.0.1 > cordova plugin add phonegap-plugin-push > cordova build browser > then you will see that > platforms/browser/www/ServiceWorker.js/ServiceWorker.js exists when it should > be platforms/browser/www/ServiceWorker.js. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13510) Copy/Paste functionality is not working for iOS native components.
[ https://issues.apache.org/jira/browse/CB-13510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279498#comment-16279498 ] ASF GitHub Bot commented on CB-13510: - codecov-io commented on issue #352: CB-13510: (iOS) Removed clipboard workaround, which was braking copy/paste functional iOS 11 URL: https://github.com/apache/cordova-ios/pull/352#issuecomment-349498236 # [Codecov](https://codecov.io/gh/apache/cordova-ios/pull/352?src=pr&el=h1) Report > Merging [#352](https://codecov.io/gh/apache/cordova-ios/pull/352?src=pr&el=desc) into [master](https://codecov.io/gh/apache/cordova-ios/commit/4f873f7b931f080b0ed2edd31502571ae93b334d?src=pr&el=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/cordova-ios/pull/352/graphs/tree.svg?src=pr&token=WomDD5jInz&width=650&height=150)](https://codecov.io/gh/apache/cordova-ios/pull/352?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #352 +/- ## === Coverage 63.45% 63.45% === Files 14 14 Lines1691 1691 Branches 284 284 === Hits 1073 1073 Misses618 618 ``` -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/cordova-ios/pull/352?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/cordova-ios/pull/352?src=pr&el=footer). Last update [4f873f7...f0530b6](https://codecov.io/gh/apache/cordova-ios/pull/352?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Copy/Paste functionality is not working for iOS native components. > -- > > Key: CB-13510 > URL: https://issues.apache.org/jira/browse/CB-13510 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: cordova-ios@4.4.0, cordova-ios 4.5.0 > Environment: iOS 11 and up... Not reproducible in iOS 10.x >Reporter: Aqeel Raza Syed >Assignee: Suraj Pindoria > > With iOS11 upgrade Cordova-ios library is braking copy/paste functionality > for consumer apps utilizing both web and native UI. > *Steps to reproduce :* > - Copy text to clipboard (e.g. Notes app) > - Foreground consumer app (app must be running in background) > - Paste clipboard text to native UI component (i.e. UITextField) > *Expected:* > - Text should be pasted on native UI component > *Actual:* > - Nothing happens > *Note:* This only happens with native UI components and works fine with Web > interface. Also once consumer app goes foreground, after backgrounding that > app, clipboard text can never be pasted in any other iOS app with native UI. > *Investigation:* > Seems like following patch fix is causing this issue in iOS 11: > https://github.com/apache/cordova-ios/pull/139 > *Potential Fix:* Since above patch has been done a while ago, removing that > bit of code, doesn't seems to reintroduce original bug (i.e. > https://voxpelli.com/2015/03/ios-safari-url-copy-paste-bug/) -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13510) Copy/Paste functionality is not working for iOS native components.
[ https://issues.apache.org/jira/browse/CB-13510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279472#comment-16279472 ] ASF GitHub Bot commented on CB-13510: - ssraza opened a new pull request #352: CB-13510: (iOS) Removed clipboard workaround, which was braking copy/paste functional iOS 11 URL: https://github.com/apache/cordova-ios/pull/352 ### Platforms affected iOS ### What does this PR do? Removed `[pasteboard setValue:string forPasteboardType:@"public.text"]` clipboard workaround, which is not need in iOS 11, but breaking copy/past functionality from outside the app (i.e notes/safari) into (Cordova) consumer app using native UI as well. ### What testing has been done on this change? Manually tested copy/pastes functionality for both cordova (web UI) components as well as with native UI in a container app. ### Checklist - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database. [CB-13510](https://issues.apache.org/jira/browse/CB-13510) - [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB- is the JIRA ID & "android" is the platform affected. - [ ] Added automated test coverage as appropriate for this change. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Copy/Paste functionality is not working for iOS native components. > -- > > Key: CB-13510 > URL: https://issues.apache.org/jira/browse/CB-13510 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: cordova-ios@4.4.0, cordova-ios 4.5.0 > Environment: iOS 11 and up... Not reproducible in iOS 10.x >Reporter: Aqeel Raza Syed >Assignee: Suraj Pindoria > > With iOS11 upgrade Cordova-ios library is braking copy/paste functionality > for consumer apps utilizing both web and native UI. > *Steps to reproduce :* > - Copy text to clipboard (e.g. Notes app) > - Foreground consumer app (app must be running in background) > - Paste clipboard text to native UI component (i.e. UITextField) > *Expected:* > - Text should be pasted on native UI component > *Actual:* > - Nothing happens > *Note:* This only happens with native UI components and works fine with Web > interface. Also once consumer app goes foreground, after backgrounding that > app, clipboard text can never be pasted in any other iOS app with native UI. > *Investigation:* > Seems like following patch fix is causing this issue in iOS 11: > https://github.com/apache/cordova-ios/pull/139 > *Potential Fix:* Since above patch has been done a while ago, removing that > bit of code, doesn't seems to reintroduce original bug (i.e. > https://voxpelli.com/2015/03/ios-safari-url-copy-paste-bug/) -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-13637) Unable to handle local plugins properly
Michael Goffioul created CB-13637: - Summary: Unable to handle local plugins properly Key: CB-13637 URL: https://issues.apache.org/jira/browse/CB-13637 Project: Apache Cordova Issue Type: Bug Components: cordova-cli Reporter: Michael Goffioul 1) create a new cordova project 2) inside the project directory, create folder "localplugins/testplugin" containing the file: - package.json {code} { "name": "com.example.cordova.plugin", "version": "1.0.0" } {code} - plugin.xml {code} http://apache.org/cordova/ns/plugins/1.0"; id="com.example.cordova.plugin" version="1.0.0"> Test Plugin {code} 3) add android patform: cordova platform add android 4) prepare android: cordova prepare android At this point, both package.json and config.xml contain a reference to the plugin using "file:localplugins/testplugin". The problem is that it's impossible to use the same plugin reference in both files, and still having plugin restoration and/or "npm install" to work. If I delete platforms/ and plugins/ subdir (these are typically not under git revision control) and run "cordova prepare android" to restore the platforms and the plugins, it fails with error: {code} Discovered plugin "com.example.cordova.plugin" in config.xml. Adding it to the project Failed to restore plugin "com.example.cordova.plugin" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin file:localplugins/testplugin via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL. Failed to get absolute path to installed module {code} If I edit package.json and config.xml, and remove the prefix "file:" in the plugin spec, then restoration works ok. But then, it's "npm install" that fails. What works is to use the "file:" prefix in package.json and not use it in "config.xml". But that's not possible as preparation will make sure both are identical. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13636) Plugins not for Android fail to install for Android
[ https://issues.apache.org/jira/browse/CB-13636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279029#comment-16279029 ] Tom Bell commented on CB-13636: --- Seems cordova-cli (7.1.0) is hardcoded to version 2.1.1 of cordova-commons. > Plugins not for Android fail to install for Android > --- > > Key: CB-13636 > URL: https://issues.apache.org/jira/browse/CB-13636 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-android >Affects Versions: 7.0.0 >Reporter: Tom Bell >Assignee: Joe Bowser > > I am trying to update my project to 7.0.0 for cordova-android, however we > have some plugins that are failing to install when re-installing the android > platform. > {code} > Installing "zestia-cordova-plugin-activity" for android > Failed to install 'zestia-cordova-plugin-activity': Error: ENOENT: no such > file or directory, open > '/Users/tombell/Code/capsule-mobile/platforms/android/AndroidManifest.xml' > at Object.fs.openSync (fs.js:646:18) > at Object.fs.readFileSync (fs.js:551:33) > at Object.parseElementtreeSync > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27) > at new AndroidManifest > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/lib/AndroidManifest.js:29:20) > at AndroidProject.getPackageName > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/lib/AndroidProject.js:99:12) > at Api.addPlugin > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/Api.js:223:57) > at handleInstall > (/Users/tombell/Code/capsule-mobile/node_modules/cordova-lib/src/plugman/install.js:594:10) > at > /Users/tombell/Code/capsule-mobile/node_modules/cordova-lib/src/plugman/install.js:357:28 > at _fulfilled > (/Users/tombell/Code/capsule-mobile/node_modules/q/q.js:787:54) > at self.promiseDispatch.done > (/Users/tombell/Code/capsule-mobile/node_modules/q/q.js:816:30) > Error: ENOENT: no such file or directory, open > '/Users/tombell/Code/capsule-mobile/platforms/android/AndroidManifest.xml' > {code} > This specific plugin only has configuration for iOS platforms. Do I need to > change something in the plugins I've written internally? -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13614) Asset tag create only works if file is targeted to root directory
[ https://issues.apache.org/jira/browse/CB-13614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16278980#comment-16278980 ] ASF GitHub Bot commented on CB-13614: - purplecabbage commented on issue #49: CB-13614: (browser) Fix asset copy bug. URL: https://github.com/apache/cordova-browser/pull/49#issuecomment-349391261 @audreyso @stevengill This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Asset tag create only works if file is targeted to root directory > - > > Key: CB-13614 > URL: https://issues.apache.org/jira/browse/CB-13614 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-browser >Affects Versions: 5.0.1 >Reporter: George Campbell >Assignee: Jesse MacFadyen > > Inside a plugin.xml file, > > results in: > cp: copyFileSync: could not write to dest file > (code=ENOENT):/Users/campbelg/IdeaProjects/wms-circ-app/platforms/browser/platform_www/style/inappbrowser.css > Related to CB-13562, which fixed the case of an asset file whose target was > the root directory. This bug is for assets whose target contains a directory. > The expected behavior is described by the plugin.xml documentation: > https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#asset -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13636) Plugins not for Android fail to install for Android
[ https://issues.apache.org/jira/browse/CB-13636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16278917#comment-16278917 ] Tom Bell commented on CB-13636: --- Ah okay, I'll double check tomorrow back at work, I'll close off the issue if that fixes it. Thanks for the reply. > Plugins not for Android fail to install for Android > --- > > Key: CB-13636 > URL: https://issues.apache.org/jira/browse/CB-13636 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-android >Affects Versions: 7.0.0 >Reporter: Tom Bell >Assignee: Joe Bowser > > I am trying to update my project to 7.0.0 for cordova-android, however we > have some plugins that are failing to install when re-installing the android > platform. > {code} > Installing "zestia-cordova-plugin-activity" for android > Failed to install 'zestia-cordova-plugin-activity': Error: ENOENT: no such > file or directory, open > '/Users/tombell/Code/capsule-mobile/platforms/android/AndroidManifest.xml' > at Object.fs.openSync (fs.js:646:18) > at Object.fs.readFileSync (fs.js:551:33) > at Object.parseElementtreeSync > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27) > at new AndroidManifest > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/lib/AndroidManifest.js:29:20) > at AndroidProject.getPackageName > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/lib/AndroidProject.js:99:12) > at Api.addPlugin > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/Api.js:223:57) > at handleInstall > (/Users/tombell/Code/capsule-mobile/node_modules/cordova-lib/src/plugman/install.js:594:10) > at > /Users/tombell/Code/capsule-mobile/node_modules/cordova-lib/src/plugman/install.js:357:28 > at _fulfilled > (/Users/tombell/Code/capsule-mobile/node_modules/q/q.js:787:54) > at self.promiseDispatch.done > (/Users/tombell/Code/capsule-mobile/node_modules/q/q.js:816:30) > Error: ENOENT: no such file or directory, open > '/Users/tombell/Code/capsule-mobile/platforms/android/AndroidManifest.xml' > {code} > This specific plugin only has configuration for iOS platforms. Do I need to > change something in the plugins I've written internally? -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-13636) Plugins not for Android fail to install for Android
[ https://issues.apache.org/jira/browse/CB-13636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16278913#comment-16278913 ] Joe Bowser commented on CB-13636: - You need to make sure that cordova-common gets updated to 2.2.0 before working with Cordova, otherwise Android will keep erroring out when you interact with plugins. It should have upgraded automatically, but I might be wrong on that. > Plugins not for Android fail to install for Android > --- > > Key: CB-13636 > URL: https://issues.apache.org/jira/browse/CB-13636 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-android >Affects Versions: 7.0.0 >Reporter: Tom Bell >Assignee: Joe Bowser > > I am trying to update my project to 7.0.0 for cordova-android, however we > have some plugins that are failing to install when re-installing the android > platform. > {code} > Installing "zestia-cordova-plugin-activity" for android > Failed to install 'zestia-cordova-plugin-activity': Error: ENOENT: no such > file or directory, open > '/Users/tombell/Code/capsule-mobile/platforms/android/AndroidManifest.xml' > at Object.fs.openSync (fs.js:646:18) > at Object.fs.readFileSync (fs.js:551:33) > at Object.parseElementtreeSync > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27) > at new AndroidManifest > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/lib/AndroidManifest.js:29:20) > at AndroidProject.getPackageName > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/lib/AndroidProject.js:99:12) > at Api.addPlugin > (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/Api.js:223:57) > at handleInstall > (/Users/tombell/Code/capsule-mobile/node_modules/cordova-lib/src/plugman/install.js:594:10) > at > /Users/tombell/Code/capsule-mobile/node_modules/cordova-lib/src/plugman/install.js:357:28 > at _fulfilled > (/Users/tombell/Code/capsule-mobile/node_modules/q/q.js:787:54) > at self.promiseDispatch.done > (/Users/tombell/Code/capsule-mobile/node_modules/q/q.js:816:30) > Error: ENOENT: no such file or directory, open > '/Users/tombell/Code/capsule-mobile/platforms/android/AndroidManifest.xml' > {code} > This specific plugin only has configuration for iOS platforms. Do I need to > change something in the plugins I've written internally? -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Closed] (CB-7054) Keyboard/Select menu auto closes on Samsung Galaxy S3 if the input would be hidden by the keyboard
[ https://issues.apache.org/jira/browse/CB-7054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Bell closed CB-7054. Resolution: Fixed > Keyboard/Select menu auto closes on Samsung Galaxy S3 if the input would be > hidden by the keyboard > -- > > Key: CB-7054 > URL: https://issues.apache.org/jira/browse/CB-7054 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-lib >Affects Versions: 3.5.0 > Environment: Samsung Galaxy S3 >Reporter: Tom Bell > Labels: key > > We have a select input quite far down the page, on the Samsung Galaxy S3 it > uses a custom Samsung keyboard that brings up a keyboard like dialog for > select inputs, when the input would be covered by this keyboard the keyboard > is automatically hidden. > I've confirmed this by adding a large amount of padding below the element so > I can scroll it past the keyboard area, and it shows fine and does not > automatically hide the keyboard. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Closed] (CB-11323) `cordova platform update ios` resets entire Xcode project
[ https://issues.apache.org/jira/browse/CB-11323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Bell closed CB-11323. - Resolution: Fixed > `cordova platform update ios` resets entire Xcode project > - > > Key: CB-11323 > URL: https://issues.apache.org/jira/browse/CB-11323 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-ios >Affects Versions: 6.2.0 > Environment: OSX 10.11.5 >Reporter: Tom Bell >Assignee: Shazron Abdullah > Labels: backlog > Fix For: cordova-ios@5.0.0 > > > I run `cordova update platform ios` to make sure it's up to date. The > platform is up to date, but running `cordova update platform ios` basically > nukes the Xcode project and essentially creates a "new" project. > This means the following gets removed/reset: > * Plugins removed > * Additional schemes removed > * Modified source file changes removed > This means we can't actually customise any native code for the platform > without it getting reset by an update. > If this is the case where the platform is some "dumb" base project, how are > people expected to have different schemes and changes to native code? > Are we expected to create a bunch of "hooks" that basically find/replace the > code with our changes, not exactly user friendly? -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Closed] (CB-8437) Select Picker auto-closing after displaying keyboard
[ https://issues.apache.org/jira/browse/CB-8437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom Bell closed CB-8437. Resolution: Fixed > Select Picker auto-closing after displaying keyboard > > > Key: CB-8437 > URL: https://issues.apache.org/jira/browse/CB-8437 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-lib >Affects Versions: 4.0.0 > Environment: iOS 8, iPhone 6 (Simulator and Device) >Reporter: Tom Bell > > We have some select elements that when tapped, open the picker, switches to > a keyboard, then auto closes. > A screen recording here shows the behaviour http://cl.ly/1d212h32271j -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Created] (CB-13636) Plugins not for Android fail to install for Android
Tom Bell created CB-13636: - Summary: Plugins not for Android fail to install for Android Key: CB-13636 URL: https://issues.apache.org/jira/browse/CB-13636 Project: Apache Cordova Issue Type: Bug Components: cordova-android Affects Versions: 7.0.0 Reporter: Tom Bell Assignee: Joe Bowser I am trying to update my project to 7.0.0 for cordova-android, however we have some plugins that are failing to install when re-installing the android platform. {code} Installing "zestia-cordova-plugin-activity" for android Failed to install 'zestia-cordova-plugin-activity': Error: ENOENT: no such file or directory, open '/Users/tombell/Code/capsule-mobile/platforms/android/AndroidManifest.xml' at Object.fs.openSync (fs.js:646:18) at Object.fs.readFileSync (fs.js:551:33) at Object.parseElementtreeSync (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27) at new AndroidManifest (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/lib/AndroidManifest.js:29:20) at AndroidProject.getPackageName (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/lib/AndroidProject.js:99:12) at Api.addPlugin (/Users/tombell/Code/capsule-mobile/platforms/android/cordova/Api.js:223:57) at handleInstall (/Users/tombell/Code/capsule-mobile/node_modules/cordova-lib/src/plugman/install.js:594:10) at /Users/tombell/Code/capsule-mobile/node_modules/cordova-lib/src/plugman/install.js:357:28 at _fulfilled (/Users/tombell/Code/capsule-mobile/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/Users/tombell/Code/capsule-mobile/node_modules/q/q.js:816:30) Error: ENOENT: no such file or directory, open '/Users/tombell/Code/capsule-mobile/platforms/android/AndroidManifest.xml' {code} This specific plugin only has configuration for iOS platforms. Do I need to change something in the plugins I've written internally? -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-9005) Can no longer use setOnKeyListener on webView in plugins
[ https://issues.apache.org/jira/browse/CB-9005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16278769#comment-16278769 ] Mike Dimmick (M-Netics) commented on CB-9005: - I've taken this over - Ian Darling left the company some time ago. I recently discovered that when we upgraded to cordova-android 5.1.1, we managed to update the Java files without updating cordova.js, meaning we had a mix of 5.1.1 native and 4.0.0 JavaScript. Amazingly this worked fine for over a year, and I wouldn't have spotted it had we not been bitten by the instability of the ONLINE_BRIDGE. I'm now trying to upgrade to cordova-android 6.4.0 to pick up the newer native bridge, and have to re-apply the changes that we previously made. Is there now any better solution? I should give some background on what we're actually doing. We work mainly with Zebra enterprise devices, such as their MC40, TC55, TC51 and TC56. These have a couple of extra buttons on either side of the unit, which - using the standard DataWedge app - trigger the barcode scanner. We use Zebra's Enterprise Mobility Developer Kit to gain greater control over the barcode scanner, configuring the types of barcode that are accepted for each input, which in turn is customisable by our clients. When using the EMDK, side scan button actions are delivered to the app rather than triggering the scanner, so we need to trigger the scanner when the button is pressed and deactivate when it's released. The side buttons generate KEYCODE_BUTTON_L1 and KEYCODE_BUTTON_R1 respectively. > Can no longer use setOnKeyListener on webView in plugins > > > Key: CB-9005 > URL: https://issues.apache.org/jira/browse/CB-9005 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-android >Affects Versions: 4.0.0 >Reporter: Ian Darling >Assignee: Joe Bowser >Priority: Minor > > I have a plugin that is used for handling "physical" key down/up events on > Android devices with additional buttons - these buttons typically fire off > KEYCODE_BUTTON_R1, etc > In earlier versions of Cordova (3.7.0?) I was able to attach a keyListener in > the plugin by doing: > this.webView.setOnKeyListener(etc); > In migrating to 4.0.0 this no longer compiles. > My initial thought was to change to using > this.webView.getView().setOnKeyListener instead (which appears to be the > right way to do it), but this doesn't seem to fully work - my plugin still > gets volume up/down key events (which I disregard), but not events for > BUTTON_R1. > Debugging CordovaLib suggests that CordovaWebViewImpl.onDispatchKeyEvent does > receive the BUTTON_R1 events, but I'm at a loss as to how to get them into > the plugin itself. > Is there a workaround or alternate API I should be using? > Thanks, -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org