[jira] [Commented] (CB-13797) Fetch failing to install plugin dependencies

2018-06-07 Thread Ken Naito (JIRA)


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

Ken Naito commented on CB-13797:


I see. That PR looks nice.

> Fetch failing to install plugin dependencies
> 
>
> Key: CB-13797
> URL: https://issues.apache.org/jira/browse/CB-13797
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
> Environment: cordova@8.0.0
> cordova-common@2.2.1
> cordova-lib@8.0.0
> cordova-fetch@1.3.0
> npm@5.6.0
> node@9.4.0
>  
>Reporter: Darryl Pogue
>Assignee: Steve Gill
>Priority: Critical
>
> I'm currently unable to install Microsoft's cordova-plugin-code-push due to 
> some incredibly confusing errors when installing the plugin dependencies.
> The plugin [lists 3 
> dependencies|https://github.com/Microsoft/cordova-plugin-code-push/blob/e828a5eacd42dcd81bacf121a3e62735c3500227/plugin.xml#L10-L12]
>  in plugin.xml.
> Cordova successfully installs the first (code-push) dependency.
> Cordova attempts to install the second (cordova-plugin-device) dependency. It 
> appears that the npm install is successful.
> At the end of the npm install, cordova-fetch [attempts to 
> discover|https://github.com/apache/cordova-fetch/blob/master/index.js#L100] 
> what was just installed. Rather than finding "cordova-plugin-device", it 
> finds "code-push" for a second time.
> Then it fails with the following confusing error message:
> {noformat}
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".{noformat}
> The full verbose output from {{cordova prepare}} is below:
> {noformat}
> Discovered plugin "cordova-plugin-code-push" in config.xml. Adding it to the 
> project
> No scripts found for hook "before_plugin_add".
> Calling plugman.fetch on plugin "cordova-plugin-code-push@^1.11.2"
> Running command: npm install cordova-plugin-code-push@^1.11.2 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-code-push@^1.11.2,--production,--no-save
> Copying plugin "/PROJECT/node_modules/cordova-plugin-code-push" => 
> "/PROJECT/plugins/cordova-plugin-code-push"
> Calling plugman.install on plugin "/PROJECT/plugins/cordova-plugin-code-push" 
> for platform "android
> Installing "cordova-plugin-code-push" for android
> Running command: /PROJECT/platforms/android/cordova/version 
> Command finished with error code 0: 
> /PROJECT/platforms/android/cordova/version 
> Dependencies detected, iterating through them...
> Requesting plugin "code-push@2.0.4".
> Plugin dependency "code-push" not fetched, retrieving then installing.
> Running command: npm install code-push@2.0.4 --production --no-save
> Command finished with error code 0: npm 
> install,code-push@2.0.4,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Installing "code-push" for android
> Finding scripts for "before_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "before_plugin_install".
> Install start for "code-push" on android.
> Beginning processing of action stack for android project...
> Action stack processing complete.
> Install complete for code-push on android.
> Finding scripts for "after_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "after_plugin_install".
> Requesting plugin "cordova-plugin-dialogs@>=1.1.1".
> Plugin dependency "cordova-plugin-dialogs" not fetched, retrieving then 
> installing.
> Running command: npm install cordova-plugin-dialogs@>=1.1.1 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-dialogs@>=1.1.1,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".
> at checkID (/PROJECT/node_modules/cordova-lib/src/plugman/fetch.js:215:15)
> at /PROJECT/node_modules/cordova-lib/src/plugman/fetch.js:199:9
> at _fulfilled (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:787:54)
> at self.promiseDispatch.done 
> (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:816:30)
> at Promise.promise.promiseDispatch 
> (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:749:13)
> at /PROJECT/node_modules/cordova-lib/node_modules/q/q.js:557:44
> at flush (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:108:17)
> at process._tickCallback (internal/process/next_tick.js:150:11)
> Failed to restore plugin "cordova-plugin-code-push" from config.xml. You 
> might need to try adding it again. Error: Error: Expected plugin to have ID 
> "cordova-plugin-dialogs" but got 

[jira] [Commented] (CB-13797) Fetch failing to install plugin dependencies

2018-06-07 Thread Darryl Pogue (JIRA)


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

Darryl Pogue commented on CB-13797:
---

I'm hoping [~raphinesse]'s pull request for 
[https://github.com/apache/cordova-fetch/pull/18] will fix this, since it 
replaces the treeDep and diffJson stuff in favour of parsing the output on 
{{npm install}}

> Fetch failing to install plugin dependencies
> 
>
> Key: CB-13797
> URL: https://issues.apache.org/jira/browse/CB-13797
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
> Environment: cordova@8.0.0
> cordova-common@2.2.1
> cordova-lib@8.0.0
> cordova-fetch@1.3.0
> npm@5.6.0
> node@9.4.0
>  
>Reporter: Darryl Pogue
>Assignee: Steve Gill
>Priority: Critical
>
> I'm currently unable to install Microsoft's cordova-plugin-code-push due to 
> some incredibly confusing errors when installing the plugin dependencies.
> The plugin [lists 3 
> dependencies|https://github.com/Microsoft/cordova-plugin-code-push/blob/e828a5eacd42dcd81bacf121a3e62735c3500227/plugin.xml#L10-L12]
>  in plugin.xml.
> Cordova successfully installs the first (code-push) dependency.
> Cordova attempts to install the second (cordova-plugin-device) dependency. It 
> appears that the npm install is successful.
> At the end of the npm install, cordova-fetch [attempts to 
> discover|https://github.com/apache/cordova-fetch/blob/master/index.js#L100] 
> what was just installed. Rather than finding "cordova-plugin-device", it 
> finds "code-push" for a second time.
> Then it fails with the following confusing error message:
> {noformat}
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".{noformat}
> The full verbose output from {{cordova prepare}} is below:
> {noformat}
> Discovered plugin "cordova-plugin-code-push" in config.xml. Adding it to the 
> project
> No scripts found for hook "before_plugin_add".
> Calling plugman.fetch on plugin "cordova-plugin-code-push@^1.11.2"
> Running command: npm install cordova-plugin-code-push@^1.11.2 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-code-push@^1.11.2,--production,--no-save
> Copying plugin "/PROJECT/node_modules/cordova-plugin-code-push" => 
> "/PROJECT/plugins/cordova-plugin-code-push"
> Calling plugman.install on plugin "/PROJECT/plugins/cordova-plugin-code-push" 
> for platform "android
> Installing "cordova-plugin-code-push" for android
> Running command: /PROJECT/platforms/android/cordova/version 
> Command finished with error code 0: 
> /PROJECT/platforms/android/cordova/version 
> Dependencies detected, iterating through them...
> Requesting plugin "code-push@2.0.4".
> Plugin dependency "code-push" not fetched, retrieving then installing.
> Running command: npm install code-push@2.0.4 --production --no-save
> Command finished with error code 0: npm 
> install,code-push@2.0.4,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Installing "code-push" for android
> Finding scripts for "before_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "before_plugin_install".
> Install start for "code-push" on android.
> Beginning processing of action stack for android project...
> Action stack processing complete.
> Install complete for code-push on android.
> Finding scripts for "after_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "after_plugin_install".
> Requesting plugin "cordova-plugin-dialogs@>=1.1.1".
> Plugin dependency "cordova-plugin-dialogs" not fetched, retrieving then 
> installing.
> Running command: npm install cordova-plugin-dialogs@>=1.1.1 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-dialogs@>=1.1.1,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".
> at checkID (/PROJECT/node_modules/cordova-lib/src/plugman/fetch.js:215:15)
> at /PROJECT/node_modules/cordova-lib/src/plugman/fetch.js:199:9
> at _fulfilled (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:787:54)
> at self.promiseDispatch.done 
> (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:816:30)
> at Promise.promise.promiseDispatch 
> (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:749:13)
> at /PROJECT/node_modules/cordova-lib/node_modules/q/q.js:557:44
> at flush (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:108:17)
> at process._tickCallback (internal/process/next_tick.js:150:11)

[jira] [Commented] (CB-13797) Fetch failing to install plugin dependencies

2018-06-07 Thread Ken Naito (JIRA)


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

Ken Naito commented on CB-13797:


We can see this situation  (UNMET DEPENDENCY) as follows,

{code}
$ git checkout https://github.com/dpogue/cb-13797.git
$ npm install
$ npm install code-push@2.0.4 --production --no-save
$ npm ls --depth=0 
$ npm install cordova-plugin-dialogs@1.1.1 --production --no-save
$ npm ls --depth=0
{code}


> Fetch failing to install plugin dependencies
> 
>
> Key: CB-13797
> URL: https://issues.apache.org/jira/browse/CB-13797
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
> Environment: cordova@8.0.0
> cordova-common@2.2.1
> cordova-lib@8.0.0
> cordova-fetch@1.3.0
> npm@5.6.0
> node@9.4.0
>  
>Reporter: Darryl Pogue
>Assignee: Steve Gill
>Priority: Critical
>
> I'm currently unable to install Microsoft's cordova-plugin-code-push due to 
> some incredibly confusing errors when installing the plugin dependencies.
> The plugin [lists 3 
> dependencies|https://github.com/Microsoft/cordova-plugin-code-push/blob/e828a5eacd42dcd81bacf121a3e62735c3500227/plugin.xml#L10-L12]
>  in plugin.xml.
> Cordova successfully installs the first (code-push) dependency.
> Cordova attempts to install the second (cordova-plugin-device) dependency. It 
> appears that the npm install is successful.
> At the end of the npm install, cordova-fetch [attempts to 
> discover|https://github.com/apache/cordova-fetch/blob/master/index.js#L100] 
> what was just installed. Rather than finding "cordova-plugin-device", it 
> finds "code-push" for a second time.
> Then it fails with the following confusing error message:
> {noformat}
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".{noformat}
> The full verbose output from {{cordova prepare}} is below:
> {noformat}
> Discovered plugin "cordova-plugin-code-push" in config.xml. Adding it to the 
> project
> No scripts found for hook "before_plugin_add".
> Calling plugman.fetch on plugin "cordova-plugin-code-push@^1.11.2"
> Running command: npm install cordova-plugin-code-push@^1.11.2 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-code-push@^1.11.2,--production,--no-save
> Copying plugin "/PROJECT/node_modules/cordova-plugin-code-push" => 
> "/PROJECT/plugins/cordova-plugin-code-push"
> Calling plugman.install on plugin "/PROJECT/plugins/cordova-plugin-code-push" 
> for platform "android
> Installing "cordova-plugin-code-push" for android
> Running command: /PROJECT/platforms/android/cordova/version 
> Command finished with error code 0: 
> /PROJECT/platforms/android/cordova/version 
> Dependencies detected, iterating through them...
> Requesting plugin "code-push@2.0.4".
> Plugin dependency "code-push" not fetched, retrieving then installing.
> Running command: npm install code-push@2.0.4 --production --no-save
> Command finished with error code 0: npm 
> install,code-push@2.0.4,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Installing "code-push" for android
> Finding scripts for "before_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "before_plugin_install".
> Install start for "code-push" on android.
> Beginning processing of action stack for android project...
> Action stack processing complete.
> Install complete for code-push on android.
> Finding scripts for "after_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "after_plugin_install".
> Requesting plugin "cordova-plugin-dialogs@>=1.1.1".
> Plugin dependency "cordova-plugin-dialogs" not fetched, retrieving then 
> installing.
> Running command: npm install cordova-plugin-dialogs@>=1.1.1 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-dialogs@>=1.1.1,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".
> at checkID (/PROJECT/node_modules/cordova-lib/src/plugman/fetch.js:215:15)
> at /PROJECT/node_modules/cordova-lib/src/plugman/fetch.js:199:9
> at _fulfilled (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:787:54)
> at self.promiseDispatch.done 
> (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:816:30)
> at Promise.promise.promiseDispatch 
> (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:749:13)
> at /PROJECT/node_modules/cordova-lib/node_modules/q/q.js:557:44
> at flush 

[jira] [Commented] (CB-13797) Fetch failing to install plugin dependencies

2018-06-07 Thread Ken Naito (JIRA)


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

Ken Naito commented on CB-13797:


I confirmed this issue.
One solution for https://github.com/dpogue/cb-13797 is removing  
"code-push": "^2.0.4" in dependencies in package.json.

When we do 'npm install', the npm installs code-push@2.0.5 in node_modules.
Then we do 'cordova prepare', the cordova installs cordova-plugin-code-push.
Because the cordova-plugin-code-push depends code-push@2.0.4, the cordova will 
install code-push@2.0.4.
At this time, depTree in cordova-fetch is as follows (npm ls --depth=0)

{code}
├─┬ UNMET DEPENDENCY code-push@2.0.5
│ ├── q@1.5.1
│ ├── recursive-fs@0.1.4
│ ├── slash@1.0.0
│ ├── superagent@3.8.3
│ ├── superagent-proxy@1.0.3
│ └── yazl@2.4.3
├── cordova@8.0.0
├── cordova-android@7.1.0
├── cordova-ios@4.5.4
├── cordova-plugin-code-push@1.11.11
├── cordova-plugin-device@2.0.2
└── cordova-plugin-whitelist@1.3.3
{code}

Next the cordova will install cordova-plugin-dialogs, then treeDep becomes
{code}
├── code-push@2.0.5
├── cordova@8.0.0
├── cordova-android@7.1.0
├── cordova-ios@4.5.4
├── cordova-plugin-code-push@1.11.11
├── cordova-plugin-device@2.0.2
└── cordova-plugin-whitelist@1.3.3
{code}

Comparing both two depTree, getJsonDiff(tree1, tree2) in cordova-fetch returns 
'code-push'.
This is because 'cordova install cordova-plugin-dialogs' fails with the error 
{code}
Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have ID 
"cordova-plugin-dialogs" but got "code-push".
{code}

In order to resolve this issue, cordova-fetch must find the correct id of 
installed package.



> Fetch failing to install plugin dependencies
> 
>
> Key: CB-13797
> URL: https://issues.apache.org/jira/browse/CB-13797
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
> Environment: cordova@8.0.0
> cordova-common@2.2.1
> cordova-lib@8.0.0
> cordova-fetch@1.3.0
> npm@5.6.0
> node@9.4.0
>  
>Reporter: Darryl Pogue
>Assignee: Steve Gill
>Priority: Critical
>
> I'm currently unable to install Microsoft's cordova-plugin-code-push due to 
> some incredibly confusing errors when installing the plugin dependencies.
> The plugin [lists 3 
> dependencies|https://github.com/Microsoft/cordova-plugin-code-push/blob/e828a5eacd42dcd81bacf121a3e62735c3500227/plugin.xml#L10-L12]
>  in plugin.xml.
> Cordova successfully installs the first (code-push) dependency.
> Cordova attempts to install the second (cordova-plugin-device) dependency. It 
> appears that the npm install is successful.
> At the end of the npm install, cordova-fetch [attempts to 
> discover|https://github.com/apache/cordova-fetch/blob/master/index.js#L100] 
> what was just installed. Rather than finding "cordova-plugin-device", it 
> finds "code-push" for a second time.
> Then it fails with the following confusing error message:
> {noformat}
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".{noformat}
> The full verbose output from {{cordova prepare}} is below:
> {noformat}
> Discovered plugin "cordova-plugin-code-push" in config.xml. Adding it to the 
> project
> No scripts found for hook "before_plugin_add".
> Calling plugman.fetch on plugin "cordova-plugin-code-push@^1.11.2"
> Running command: npm install cordova-plugin-code-push@^1.11.2 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-code-push@^1.11.2,--production,--no-save
> Copying plugin "/PROJECT/node_modules/cordova-plugin-code-push" => 
> "/PROJECT/plugins/cordova-plugin-code-push"
> Calling plugman.install on plugin "/PROJECT/plugins/cordova-plugin-code-push" 
> for platform "android
> Installing "cordova-plugin-code-push" for android
> Running command: /PROJECT/platforms/android/cordova/version 
> Command finished with error code 0: 
> /PROJECT/platforms/android/cordova/version 
> Dependencies detected, iterating through them...
> Requesting plugin "code-push@2.0.4".
> Plugin dependency "code-push" not fetched, retrieving then installing.
> Running command: npm install code-push@2.0.4 --production --no-save
> Command finished with error code 0: npm 
> install,code-push@2.0.4,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Installing "code-push" for android
> Finding scripts for "before_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "before_plugin_install".
> Install start for "code-push" on android.
> Beginning processing of action stack for android project...
> Action stack processing complete.
> Install complete for code-push on android.
> Finding scripts for 

[jira] [Commented] (CB-13797) Fetch failing to install plugin dependencies

2018-04-30 Thread ArturK (JIRA)

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

ArturK commented on CB-13797:
-

I have same issue on my macOS 10.13.3. It worked fine on Windows while building 
android project.

 
{noformat}
upt-macbook-pro:cordova arturk$ cordova prepare ios
Discovered plugin "cordova-plugin-file-transfer" in config.xml. Adding it to 
the project
Installing "cordova-plugin-file-transfer" for android
Failed to install 'cordova-plugin-file-transfer': CordovaError: Version of 
installed plugin: "cordova-plugin-file@4.3.3" does not satisfy dependency 
plugin requirement "cordova-plugin-file@>=5.0.0". Try --force to use installed 
plugin as dependency.
at 
/Users/arturk/.nvm/versions/node/v8.11.1/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:557:37
at _fulfilled 
(/Users/arturk/.nvm/versions/node/v8.11.1/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done 
(/Users/arturk/.nvm/versions/node/v8.11.1/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch 
(/Users/arturk/.nvm/versions/node/v8.11.1/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:749:13)
at 
/Users/arturk/.nvm/versions/node/v8.11.1/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:509:49
at flush 
(/Users/arturk/.nvm/versions/node/v8.11.1/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
Failed to restore plugin "cordova-plugin-file-transfer" from config.xml. You 
might need to try adding it again. Error: Version of installed plugin: 
"cordova-plugin-file@4.3.3" does not satisfy dependency plugin requirement 
"cordova-plugin-file@>=5.0.0". Try --force to use installed plugin as 
dependency.
Preparing Firebase on iOS
upt-macbook-pro:cordova arturk${noformat}
 
{noformat}
npm@5.6.0
node@v8.11.1
cordova@8.0.0







https://github.com/juthawong/cordova-plugin-smsreceiver.git; />










{noformat}
 

> Fetch failing to install plugin dependencies
> 
>
> Key: CB-13797
> URL: https://issues.apache.org/jira/browse/CB-13797
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
> Environment: cordova@8.0.0
> cordova-common@2.2.1
> cordova-lib@8.0.0
> cordova-fetch@1.3.0
> npm@5.6.0
> node@9.4.0
>  
>Reporter: Darryl Pogue
>Assignee: Steve Gill
>Priority: Critical
>
> I'm currently unable to install Microsoft's cordova-plugin-code-push due to 
> some incredibly confusing errors when installing the plugin dependencies.
> The plugin [lists 3 
> dependencies|https://github.com/Microsoft/cordova-plugin-code-push/blob/e828a5eacd42dcd81bacf121a3e62735c3500227/plugin.xml#L10-L12]
>  in plugin.xml.
> Cordova successfully installs the first (code-push) dependency.
> Cordova attempts to install the second (cordova-plugin-device) dependency. It 
> appears that the npm install is successful.
> At the end of the npm install, cordova-fetch [attempts to 
> discover|https://github.com/apache/cordova-fetch/blob/master/index.js#L100] 
> what was just installed. Rather than finding "cordova-plugin-device", it 
> finds "code-push" for a second time.
> Then it fails with the following confusing error message:
> {noformat}
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".{noformat}
> The full verbose output from {{cordova prepare}} is below:
> {noformat}
> Discovered plugin "cordova-plugin-code-push" in config.xml. Adding it to the 
> project
> No scripts found for hook "before_plugin_add".
> Calling plugman.fetch on plugin "cordova-plugin-code-push@^1.11.2"
> Running command: npm install cordova-plugin-code-push@^1.11.2 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-code-push@^1.11.2,--production,--no-save
> Copying plugin "/PROJECT/node_modules/cordova-plugin-code-push" => 
> "/PROJECT/plugins/cordova-plugin-code-push"
> Calling plugman.install on plugin "/PROJECT/plugins/cordova-plugin-code-push" 
> for platform "android
> Installing "cordova-plugin-code-push" for android
> Running command: /PROJECT/platforms/android/cordova/version 
> Command finished with error code 0: 
> /PROJECT/platforms/android/cordova/version 
> Dependencies detected, iterating through them...
> Requesting plugin "code-push@2.0.4".
> Plugin dependency "code-push" not fetched, retrieving then installing.
> Running command: npm install code-push@2.0.4 --production --no-save
> Command finished with error code 0: npm 
> install,code-push@2.0.4,--production,--no-save

[jira] [Commented] (CB-13797) Fetch failing to install plugin dependencies

2018-02-12 Thread Darryl Pogue (JIRA)

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

Darryl Pogue commented on CB-13797:
---

After your comment, I thought maybe one of my tools was to blame, but it turns 
out I can still reproduce this even with cordova from npm.

I put together a test case here: https://github.com/dpogue/cb-13797

> Fetch failing to install plugin dependencies
> 
>
> Key: CB-13797
> URL: https://issues.apache.org/jira/browse/CB-13797
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
> Environment: cordova@8.0.0
> cordova-common@2.2.1
> cordova-lib@8.0.0
> cordova-fetch@1.3.0
> npm@5.6.0
> node@9.4.0
>  
>Reporter: Darryl Pogue
>Priority: Critical
>
> I'm currently unable to install Microsoft's cordova-plugin-code-push due to 
> some incredibly confusing errors when installing the plugin dependencies.
> The plugin [lists 3 
> dependencies|https://github.com/Microsoft/cordova-plugin-code-push/blob/e828a5eacd42dcd81bacf121a3e62735c3500227/plugin.xml#L10-L12]
>  in plugin.xml.
> Cordova successfully installs the first (code-push) dependency.
> Cordova attempts to install the second (cordova-plugin-device) dependency. It 
> appears that the npm install is successful.
> At the end of the npm install, cordova-fetch [attempts to 
> discover|https://github.com/apache/cordova-fetch/blob/master/index.js#L100] 
> what was just installed. Rather than finding "cordova-plugin-device", it 
> finds "code-push" for a second time.
> Then it fails with the following confusing error message:
> {noformat}
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".{noformat}
> The full verbose output from {{cordova prepare}} is below:
> {noformat}
> Discovered plugin "cordova-plugin-code-push" in config.xml. Adding it to the 
> project
> No scripts found for hook "before_plugin_add".
> Calling plugman.fetch on plugin "cordova-plugin-code-push@^1.11.2"
> Running command: npm install cordova-plugin-code-push@^1.11.2 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-code-push@^1.11.2,--production,--no-save
> Copying plugin "/PROJECT/node_modules/cordova-plugin-code-push" => 
> "/PROJECT/plugins/cordova-plugin-code-push"
> Calling plugman.install on plugin "/PROJECT/plugins/cordova-plugin-code-push" 
> for platform "android
> Installing "cordova-plugin-code-push" for android
> Running command: /PROJECT/platforms/android/cordova/version 
> Command finished with error code 0: 
> /PROJECT/platforms/android/cordova/version 
> Dependencies detected, iterating through them...
> Requesting plugin "code-push@2.0.4".
> Plugin dependency "code-push" not fetched, retrieving then installing.
> Running command: npm install code-push@2.0.4 --production --no-save
> Command finished with error code 0: npm 
> install,code-push@2.0.4,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Installing "code-push" for android
> Finding scripts for "before_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "before_plugin_install".
> Install start for "code-push" on android.
> Beginning processing of action stack for android project...
> Action stack processing complete.
> Install complete for code-push on android.
> Finding scripts for "after_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "after_plugin_install".
> Requesting plugin "cordova-plugin-dialogs@>=1.1.1".
> Plugin dependency "cordova-plugin-dialogs" not fetched, retrieving then 
> installing.
> Running command: npm install cordova-plugin-dialogs@>=1.1.1 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-dialogs@>=1.1.1,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".
> at checkID (/PROJECT/node_modules/cordova-lib/src/plugman/fetch.js:215:15)
> at /PROJECT/node_modules/cordova-lib/src/plugman/fetch.js:199:9
> at _fulfilled (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:787:54)
> at self.promiseDispatch.done 
> (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:816:30)
> at Promise.promise.promiseDispatch 
> (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:749:13)
> at /PROJECT/node_modules/cordova-lib/node_modules/q/q.js:557:44
> at flush (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:108:17)
> at process._tickCallback (internal/process/next_tick.js:150:11)
> Failed to restore plugin 

[jira] [Commented] (CB-13797) Fetch failing to install plugin dependencies

2018-02-08 Thread Steve Gill (JIRA)

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

Steve Gill commented on CB-13797:
-

I can't reproduce this. I tried with cordova@8 from npm and my local dev. 

I added cordova-android and installed code-push. No issues. Than I tried 
restoring code-push via config.xml/package.json. No issue.

> Fetch failing to install plugin dependencies
> 
>
> Key: CB-13797
> URL: https://issues.apache.org/jira/browse/CB-13797
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-fetch
> Environment: cordova@8.0.0
> cordova-common@2.2.1
> cordova-lib@8.0.0
> cordova-fetch@1.3.0
> npm@5.6.0
> node@9.4.0
>  
>Reporter: Darryl Pogue
>Priority: Critical
>
> I'm currently unable to install Microsoft's cordova-plugin-code-push due to 
> some incredibly confusing errors when installing the plugin dependencies.
> The plugin [lists 3 
> dependencies|https://github.com/Microsoft/cordova-plugin-code-push/blob/e828a5eacd42dcd81bacf121a3e62735c3500227/plugin.xml#L10-L12]
>  in plugin.xml.
> Cordova successfully installs the first (code-push) dependency.
> Cordova attempts to install the second (cordova-plugin-device) dependency. It 
> appears that the npm install is successful.
> At the end of the npm install, cordova-fetch [attempts to 
> discover|https://github.com/apache/cordova-fetch/blob/master/index.js#L100] 
> what was just installed. Rather than finding "cordova-plugin-device", it 
> finds "code-push" for a second time.
> Then it fails with the following confusing error message:
> {noformat}
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".{noformat}
> The full verbose output from {{cordova prepare}} is below:
> {noformat}
> Discovered plugin "cordova-plugin-code-push" in config.xml. Adding it to the 
> project
> No scripts found for hook "before_plugin_add".
> Calling plugman.fetch on plugin "cordova-plugin-code-push@^1.11.2"
> Running command: npm install cordova-plugin-code-push@^1.11.2 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-code-push@^1.11.2,--production,--no-save
> Copying plugin "/PROJECT/node_modules/cordova-plugin-code-push" => 
> "/PROJECT/plugins/cordova-plugin-code-push"
> Calling plugman.install on plugin "/PROJECT/plugins/cordova-plugin-code-push" 
> for platform "android
> Installing "cordova-plugin-code-push" for android
> Running command: /PROJECT/platforms/android/cordova/version 
> Command finished with error code 0: 
> /PROJECT/platforms/android/cordova/version 
> Dependencies detected, iterating through them...
> Requesting plugin "code-push@2.0.4".
> Plugin dependency "code-push" not fetched, retrieving then installing.
> Running command: npm install code-push@2.0.4 --production --no-save
> Command finished with error code 0: npm 
> install,code-push@2.0.4,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Installing "code-push" for android
> Finding scripts for "before_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "before_plugin_install".
> Install start for "code-push" on android.
> Beginning processing of action stack for android project...
> Action stack processing complete.
> Install complete for code-push on android.
> Finding scripts for "after_plugin_install" hook from plugin code-push on 
> android platform only.
> No scripts found for hook "after_plugin_install".
> Requesting plugin "cordova-plugin-dialogs@>=1.1.1".
> Plugin dependency "cordova-plugin-dialogs" not fetched, retrieving then 
> installing.
> Running command: npm install cordova-plugin-dialogs@>=1.1.1 --production 
> --no-save
> Command finished with error code 0: npm 
> install,cordova-plugin-dialogs@>=1.1.1,--production,--no-save
> Copying plugin "/PROJECT/node_modules/code-push" => 
> "/PROJECT/plugins/code-push"
> Failed to install 'cordova-plugin-code-push': Error: Expected plugin to have 
> ID "cordova-plugin-dialogs" but got "code-push".
> at checkID (/PROJECT/node_modules/cordova-lib/src/plugman/fetch.js:215:15)
> at /PROJECT/node_modules/cordova-lib/src/plugman/fetch.js:199:9
> at _fulfilled (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:787:54)
> at self.promiseDispatch.done 
> (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:816:30)
> at Promise.promise.promiseDispatch 
> (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:749:13)
> at /PROJECT/node_modules/cordova-lib/node_modules/q/q.js:557:44
> at flush (/PROJECT/node_modules/cordova-lib/node_modules/q/q.js:108:17)
> at process._tickCallback (internal/process/next_tick.js:150:11)
> Failed to restore plugin