cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Omar Mefire (JIRA)" <>
Subject [jira] [Comment Edited] (CB-9278) Restoring multiple platforms fails
Date Wed, 15 Jul 2015 21:35:06 GMT


Omar Mefire edited comment on CB-9278 at 7/15/15 9:34 PM:

This issue is due to the npmhelper.loadWithSettingsThenRestore function (
initializing global values (used across multiple function calls) and javascript/node.js being

There is a kind of 'race condition' which arises when we try and restore multiple platforms.

was (Author: omefire):
This issue is due to the npmhelper.loadWithSettingsThenRestore function (
initializing values that are used across multiple function calls and javascript/node.js being

When restoring a single platform of the form <platform>@<version>(e.g: android@4.3.0),
we make a call to lazy_load.npm_cache_add(), which loads some settings using npm.load, runs
the callback provided to npm_cache_add and then restores npm.load settings.

> Restoring multiple platforms fails
> ----------------------------------
>                 Key: CB-9278
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>    Affects Versions: Master
>         Environment: OS X
>            Reporter: Dmitry Blotsky
>            Assignee: Omar Mefire
>              Labels: cordova-lib, platform, restore, save
>   Original Estimate: 48h
>  Remaining Estimate: 48h
> Steps to reproduce:
> 1. Create a blank app: {{cordova create test test}}
> 2. Add and save a platform: {{cordova platform add --save ios}}
> 3. Add and save another platform: {{cordova platform add --save android}}
> 4. Remove the platforms: {{cordova platform remove android ios}}
> 5. Try to restore platforms automatically: {{cordova prepare}}
> Expected: both platforms installed and prepared
> Actual:
> {noformat}
> Error: Trying to initialize npm when settings have not been restored from a previous
> {noformat}
> Running {{cordova prepare}} again fixes the issue.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message