[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-05-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16494722#comment-16494722
 ] 

ASF GitHub Bot commented on CB-14108:
-

knight opened a new pull request #24: CB-14108:
URL: https://github.com/apache/cordova-common/pull/24
 
 
   
   
   ### Platforms affected
   
   All Platforms
   
   ### What does this PR do?
   
   This PR affects the cordova prepare command as follows.
   1. Check the confliction of config-file tag in config.xml.
   2. Prevent unexpected increasing count in config_munge in platformJson 
(ios/ios.json or android/android.json).
   3. Removing unnecessary config_munge directive in platformJson after 
removing config-file tag.
   
   Futrher, adding related test codes. (ConfigError.spec.js, 
ConfigChanges.spec.js)
   
   ### What testing has been done on this change?
   
   Before this PR,  if we use config.file like
   
   ```
  
   
   
   
   Please permit Camera!
   
   
   ```
   , then `cordova prepare` makes platforms/ios/ios.json 
   ```
"config_munge": {
   "files": {
 "*-Info.plist": {
   "parents": {
 "NSCameraUsageDescription": [
   {
 "xml": "Please permit Camera!",
 "count": 1
   }
 ]
   }
 }
   }
 },
   ```
   note that count is 1. Again doing `cordova prepare` makes 
platforms/ios/ios.json
   ```
"config_munge": {
   "files": {
 "*-Info.plist": {
   "parents": {
 "NSCameraUsageDescription": [
   {
 "xml": "Please permit Camera!",
 "count": 2
   }
 ]
   }
 }
   }
 },
   ```
   where the count is 2.
   Further if we remove config-file tag in config.xml, `cordova prepare` does 
not remove anything from  platforms/ios/ios.json.
   
   This unnatural behavior is fixed by this PR.
   
   
   ### Checklist
   - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
   - [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.
   - [x] 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


>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   

[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16494626#comment-16494626
 ] 

ASF GitHub Bot commented on CB-12397:
-

brodybits commented on issue #69: [CB-12397] .gitignore instead of unwanted 
.npmignore after cordova create (7.0.1)
URL: https://github.com/apache/cordova-discuss/issues/69#issuecomment-393018400
 
 
   @raphinesse I just raised raphinesse/cordova-create#1 on your fork with a 
major rework of apache/cordova-create#8 to work on master, with better test 
refactoring, as you had requested. It is marked with a TODO to use fs-extra 
instead of shelljs once apache/cordova-create#14 lands. Finishing a long day 
now, can take another look when I start again. I would be happy to continue in 
one of the following directions:
   
   I can rework to use fs-extra once apache/cordova-create#14 lands and maybe 
fix to use `_gitignore` instead of `.npmignore`
   
   Preferred: Hand it over to you to finish up as needed to resolve this issue 
(you should probably raise a new PR and we close apache/cordova-create#8).
   
   If you take it over I would highly suggest you add `Co-authored-by:` lines 
for both of us, like I did in apache/cordova-create#14, just in case the 
changes are landed with incorrect author (I have seen the cases of this 
happening in other projects).


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


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-13245) Filereader.readAsText fails on Android with long text files when

2018-05-29 Thread Joel Henry (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-13245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16494613#comment-16494613
 ] 

Joel Henry commented on CB-13245:
-

any update on this fix? i'm experiencing the same problem

> Filereader.readAsText fails on Android with long text files when
> 
>
> Key: CB-13245
> URL: https://issues.apache.org/jira/browse/CB-13245
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-file
>Affects Versions: Master
> Environment: Android 7.1.1
>Reporter: Daniel Behnen
>Priority: Major
>
> When reader.readAsText is called with an URI pointing to a local asset with a 
> size greater than READ_CHUNK_SIZE = 256 * 1024, loading produces corrupt 
> data. 
> The behaviour is caused by a negative length returned by 
> CordovaResourceApi.openForRead() when the URI is a URI_TYPE_ASSET. Given the 
> negative length, Filesystem.readFileAtURL() returns the whole file instead of 
> the desired part and FileReader.readSuccessCallback() does not check the 
> returned buffer size. Hence, the following chunks are attated to the buffer 
> regardless of whether the file was already completely read.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-13245) Filereader.readAsText fails on Android with long text files when

2018-05-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-13245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16494609#comment-16494609
 ] 

ASF GitHub Bot commented on CB-13245:
-

oliverjanik commented on issue #217: CB-13245: (android) Fix bug caused by 
negative length reported for an asset
URL: 
https://github.com/apache/cordova-plugin-file/pull/217#issuecomment-393013245
 
 
   @infil00p  Is there an issue reported in Cordova? Can we get the ball 
rolling on this?
   
   It is absolutely unacceptable that such trivial bug exists for such a common 
functionality on a mature platform such as cordova.


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


> Filereader.readAsText fails on Android with long text files when
> 
>
> Key: CB-13245
> URL: https://issues.apache.org/jira/browse/CB-13245
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-plugin-file
>Affects Versions: Master
> Environment: Android 7.1.1
>Reporter: Daniel Behnen
>Priority: Major
>
> When reader.readAsText is called with an URI pointing to a local asset with a 
> size greater than READ_CHUNK_SIZE = 256 * 1024, loading produces corrupt 
> data. 
> The behaviour is caused by a negative length returned by 
> CordovaResourceApi.openForRead() when the URI is a URI_TYPE_ASSET. Given the 
> negative length, Filesystem.readFileAtURL() returns the whole file instead of 
> the desired part and FileReader.readSuccessCallback() does not check the 
> returned buffer size. Hence, the following chunks are attated to the buffer 
> regardless of whether the file was already completely read.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Created] (CB-14110) Cordova Plugin File not reading large json files correctly - android

2018-05-29 Thread Joel Henry (JIRA)
Joel Henry created CB-14110:
---

 Summary: Cordova Plugin File not reading large json files 
correctly - android
 Key: CB-14110
 URL: https://issues.apache.org/jira/browse/CB-14110
 Project: Apache Cordova
  Issue Type: Bug
  Components: cordova-plugin-file
Affects Versions: 6.0.1
 Environment: cordova version: 7.1.0

cordova-android: 7.1.0

cordova-ios: 7.1.0
Reporter: Joel Henry


When reading a large json file (293kb), readAsText renders string incorrectly, 
adding duplicate text after the file's text ends and breaking json structure. 
JSON.parse the text fails due to this. It hangs and fails.
{code:java}
const root = `${this.window.cordova.file.applicationDirectory}www/assets/`;

this.window.resolveLocalFileSystemURL(this.root + fileName,

(fileEntry: FileEntry) => {

fileEntry.file(file => {

const reader = new (this.window.cordova).FileReader();

reader.onloadend = function () {
console.log(JSON.parse(this.result));
};

reader.readAsText(file);
});
});
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16494280#comment-16494280
 ] 

ASF GitHub Bot commented on CB-12397:
-

raphinesse commented on issue #69: [CB-12397] .gitignore instead of unwanted 
.npmignore after cordova create (7.0.1)
URL: https://github.com/apache/cordova-discuss/issues/69#issuecomment-392947105
 
 
   @brodybits Thanks for getting to work so promptly. And sorry for the rebase 
trouble. That's probably due to my recent cleanup :worried:


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


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-13824) (Swift 4) Plugin class not found

2018-05-29 Thread jcesarmobile (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-13824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16493994#comment-16493994
 ] 

jcesarmobile commented on CB-13824:
---

[~alalama] Can you tell which plugins were failing? (if they are open source)
I only have one and seems to work fine, but I'm interested in knowing more 
Swift 4 plugins to test.

>  (Swift 4) Plugin class not found
> -
>
> Key: CB-13824
> URL: https://issues.apache.org/jira/browse/CB-13824
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-ios, cordova-osx
>Reporter: Alberto Lalama
>Assignee: Tobias Bocanegra
>Priority: Minor
> Fix For: 4.1.0
>
>
> After upgrading to Xcode 9.2 (Swift 4), some plugins were not found. Plugin 
> method execution fails with the following message: "CDVPlugin class X 
> (pluginName: Y) does not exist".
> Closer inspection reveals that NSClassFromString returns nil for plugins 
> implemented in Swift. Prefixing the class with the module name fixes the 
> issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12397) fix .gitignore for plugins & platforms in app template

2018-05-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16493899#comment-16493899
 ] 

ASF GitHub Bot commented on CB-12397:
-

brodybits commented on issue #69: [CB-12397] .gitignore instead of unwanted 
.npmignore after cordova create (7.0.1)
URL: https://github.com/apache/cordova-discuss/issues/69#issuecomment-392866260
 
 
   @raphinesse I just updated the title to cover the desired result.
   
   I raised apache/cordova-create#14 to introduce use of `fs-extra`, remove use 
of shelljs from the spec, minimize use of shelljs in cordova-create index.js, 
and isolate the remaining usage. This is desired on my part since the changes I 
originally proposed in apache/cordova-create#8 are using `shell.cp` directly, 
which I think is not what we want in the end.
   
   Unfortunately "rebasing" apache/cordova-create#8 will take some extra work 
since the spec has changed so much since I had done the work last year. I hope 
I can finish this later today or maybe tomorrow. It would definitely help me if 
someone can review and merge apache/cordova-create#14 (or implement another 
solution) within the next 1-2 days.
   
   I agree with your comment regarding `.npmignore` files; I am hopeful that 
your idea of using `_gitignore` will mean that my change should not have to 
deal with `.npmignore` at all.


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


> fix .gitignore for plugins & platforms in app template
> --
>
> Key: CB-12397
> URL: https://issues.apache.org/jira/browse/CB-12397
> Project: Apache Cordova
>  Issue Type: Improvement
>  Components: cordova-app-hello-world, cordova-cli, cordova-create, 
> cordova-lib
>Reporter: Chris Brody
>Priority: Major
>  Labels: backlog, easy-fix
>
> Followup to CB-12008 (autosave by default in cordova@7): if a user creates an 
> app using "cordova create" there should be a .gitignore file to exclude the 
> plugins and platforms artifacts from git.
> I raise this since I have seen way too many apps with outdated plugins / 
> platforms artifacts included in git.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-12905) LaunchBrowser promise in linux, not resolved until the browser process terminates.

2018-05-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-12905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16493132#comment-16493132
 ] 

ASF GitHub Bot commented on CB-12905:
-

purplecabbage commented on issue #31: CB-12905: (linux) Fix issue with freezing 
after launching the browser
URL: https://github.com/apache/cordova-browser/pull/31#issuecomment-392666215
 
 
   This pr attempted to patch a dependency in the node_modules folder directly, 
this is not how we do things.
   The dependent module, cordova-serve has been patched, and released, and this 
module's dependent version was updated. ( 
https://github.com/apache/cordova-serve/pull/4 )
   
   Not sure what else you are asking for @gruz 


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


> LaunchBrowser promise in linux, not resolved until the browser process 
> terminates.
> --
>
> Key: CB-12905
> URL: https://issues.apache.org/jira/browse/CB-12905
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-serve
>Affects Versions: 6.5.0, 7.0.1
> Environment: OS: Ubuntu 16.04.2 LTS
> cordova: 6.5.0
> simulate: 0.3.12
> node: v7.10.0
> npm: 4.6.1
>Reporter: Pavel Yakovlev
>Assignee: Steve Gill
>Priority: Minor
>
> LaunchBrowser promise in linux, not resolved until the browser process 
> terminates.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org