Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

[error] manifoldjs : Failed to create the Cordova Platform app. #210

Closed
yarekc opened this issue May 17, 2016 · 32 comments
Closed

[error] manifoldjs : Failed to create the Cordova Platform app. #210

yarekc opened this issue May 17, 2016 · 32 comments

Comments

@yarekc
Copy link

yarekc commented May 17, 2016

using : win7
latest manifoldjs
latest node

manifoldjs http://www.pressemag.com -l debug

manifoldjs http://www.pressemag.com -l debug

(....)
[info ] cordova : Adding the following plugins to the Cordova project: cordova-plugin-hostedwebapp@>=0.2.0 <0.3.0 cordova-plugin-whitelist@1.0.0...
[debug] pid:804 : Launching external process: 'C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-cordova\node_modules.bin\cordova.cmd plugin add cordova-plugin-hostedwebapp@>=0.2.0 <0.3.0 cordova-plugin-whitelis
t@1.0.0'
[debug] pid:804 : Le fichier sp�cifi� est introuvable. (it means:specified file not found)
[error] manifoldjs : Failed to create the Cordova Platform app.
at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-lib\lib\projectBuilder.js:95:27
at _rejected (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:844:24)
at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:870:30
at Promise.when (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:1122:31)
at Promise.promise.promiseDispatch (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:788:41)
at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:604:44
at runSingle (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:137:13)
at flush (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:125:13)
at _combinedTickCallback (node.js:370:9)
at process._tickCallback (node.js:401:11)
Failed to add one or more plugins.
at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-cordova\lib\platform.js:105:23
at _rejected (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:844:24)
at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:870:30
at Promise.when (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:1122:31)
at Promise.promise.promiseDispatch (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:788:41)
at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:604:44
at runSingle (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:137:13)
at flush (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:125:13)
at _combinedTickCallback (node.js:370:9)
at process._tickCallback (node.js:401:11)
External process [process ID: 804] completed with errors. Le fichier sp�cifi� est introuvable.
at ChildProcess. (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-lib\lib\processTools.js:109:17)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
[error] manifoldjs : One or more platforms could not be generated successfully.
at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-lib\lib\projectBuilder.js:28:23
at _fulfilled (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:796:13)
at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:604:44
at runSingle (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:137:13)
at flush (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:125:13)
at _combinedTickCallback (node.js:370:9)
at process._tickCallback (node.js:401:11)

Any idea why this errors occurs ?

Any idea why this errors occurs ?

@boyofgreen
Copy link
Contributor

humm, I don't have a win7 machine to try it, and it worked on Win8 okay. But it appears it has an issue with the version of cordova on Win7. Let me see if I can find a win7 machine or VM I can reproduce. @DaveVoyles @f2bo do either of you guys have a Win7 machine?
BTW, we are in the middle of an upgrade on the cordova version, so that might fix it too

@AmazingJaze
Copy link

AmazingJaze commented Aug 5, 2016

I am seeing the same error today on Win10 and OS X El Capitan machines using manifoldjs 0.6.1

manifoldjs https://AmazingJaze.github.io/super-rentals/

I have also verified that the above command works when run on a separate Win10 machine that is using manifoldjs 0.5.2

@f2bo
Copy link
Contributor

f2bo commented Aug 5, 2016

Hi @AmazingJaze

I tried the two sites, the one you tested (https://AmazingJaze.github.io/super-rentals/) and the other one mentioned by @yarekc (http://www.pressemag.com), and both apps appear to have been generated successfully (I didn't run them, but I had no errors). I used manifoldjs 0.6.1 in Windows 10 (1511) as well as OS X El Capitan (v10.11.6).

Try increasing the diagnostic level to see if you can tell what the problem is.

manifoldjs https://AmazingJaze.github.io/super-rentals/ -l debug

For example, in the console output shown at the start of this thread, it seems that a file is missing when launching Cordova. The log identifies external processes with a label that has a format pid:XXXX, where XXXX is the process ID. Try to correlate the label associated with the error with the command line used to launch the external process, which should appear in a log entry before the error. For example,

[info ] cordova : Adding the following plugins to the Cordova project: cordova-plugin-hostedwebapp@>=0.2.0 <0.3.0 cordova-plugin-whitelist@1.0.0

[debug] pid:804 : Launching external process: 'C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-cordova\node_modules.bin\cordova.cmd plugin add cordova-plugin-hostedwebapp@>=0.2.0 <0.3.0 cordova-plugin-whitelist@1.0.0'
[debug] pid:804 : Le fichier sp�cifi� est introuvable. (it means:specified file not found)
[error] manifoldjs : Failed to create the Cordova Platform app.
at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-lib\lib\projectBuilder.js:95:27

Try running the same command line from a command prompt to see what happens. (For the Cordova commands, you will need to change the current directory to the cordova folder of the generated app.)

@AmazingJaze
Copy link

AmazingJaze commented Aug 5, 2016

Hi @f2bo, below is what appears to be the relevant output from running the command with the -l debug flag on the MacBook running OS X El Capitan. Can you elaborate on which command I should try running from the cordova folder?

➜  Desktop manifoldjs https://AmazingJaze.github.io/super-rentals/ -l debug

(....)
[info ] windows10   : Copying offline file "msapp-error.html" to target: /Users/winjs/Desktop/AmazingjazeGithubIo/windows10/manifest/msapp-error.html...
[info ] windows10   : Saving the original W3C manifest to the app folder...
[info ] windows10   : Copying files to the Windows 10 Platform source project...
[info ] windows10   : Copying documentation from '/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-windows10/lib/docs' to '/Users/winjs/Desktop/AmazingjazeGithubIo/windows10'...
[debug] pid:3677    : Launching external process: '/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-cordova/node_modules/.bin/cordova create cordova io.github.amazingjaze AmazingjazeGithubIo'
[debug] pid:3677    : Creating a new cordova project.
[info ] cordova     : Copying the Cordova Platform manifest to the app folder...
[info ] cordova     : Adding the following plugins to the Cordova project: cordova-plugin-hostedwebapp@>=0.3.0 <0.4.0 cordova-plugin-whitelist...
[debug] pid:3678    : Launching external process: '/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-cordova/node_modules/.bin/cordova plugin add cordova-plugin-hostedwebapp@>=0.3.0 <0.4.0 cordova-plugin-whitelist'
[debug] pid:3678    : Fetching plugin "cordova-plugin-hostedwebapp@>=0.3.0 <0.4.0" via npm
[debug] pid:3678    : Fetching plugin "cordova-plugin-whitelist@1" via npm
[info ] cordova     : Adding the following Cordova platforms: android ios windows...
[debug] pid:3679    : Launching external process: '/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-cordova/node_modules/.bin/cordova platform add android ios windows'
[debug] pid:3679    : WARNING: Applications for platform windows can not be built on this OS - darwin.
[debug] pid:3679    : Adding android project...
[debug] pid:3679    : Creating Cordova project for the Android platform:
[debug] pid:3679    :   Path: platforms/android
[debug] pid:3679    :   Package: io.github.amazingjaze
[debug] pid:3679    :   Name: AmazingjazeGithubIo
[debug] pid:3679    :   Activity: MainActivity
[debug] pid:3679    :   Android target: android-23
[debug] pid:3679    : Android project created with cordova-android@5.1.1
[debug] pid:3679    : Installing "cordova-plugin-hostedwebapp" for android
[debug] pid:3679    : Installing "cordova-plugin-whitelist" for android
[debug] pid:3679    :
[debug] pid:3679    :                This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
[debug] pid:3679    :
[debug] pid:3679    : Fetching plugin "cordova-plugin-network-information" via npm
[debug] pid:3679    : Installing "cordova-plugin-network-information" for android
[debug] pid:3679    : Plugin "cordova-plugin-whitelist" already installed on android. Making it top-level.
[debug] pid:3679    : Updating Cordova configuration from W3C manifest...
[debug] pid:3679    : Removing default images from Cordova configuration...
[debug] pid:3679    : Adding ios project...
[debug] pid:3679    : iOS project created with cordova-ios@4.1.1
[debug] pid:3679    : Installing "cordova-plugin-hostedwebapp" for ios
[debug] pid:3679    : Installing "cordova-plugin-whitelist" for ios
[debug] pid:3679    : Installing "cordova-plugin-network-information" for ios
[debug] pid:3679    : Dependent plugin "cordova-plugin-network-information" already installed on ios.
[debug] pid:3679    : Plugin "cordova-plugin-whitelist" already installed on ios. Making it top-level.
[debug] pid:3679    : Updating Cordova configuration from W3C manifest...
[debug] pid:3679    : Removing default images from Cordova configuration...
[debug] pid:3679    : Adding windows project...
[debug] pid:3679    : Creating Cordova Windows Project:
[debug] pid:3679    :   App Name  : AmazingjazeGithubIo
[debug] pid:3679    :   Namespace : io.github.amazingjaze
[debug] pid:3679    :   Path      : /Users/winjs/Desktop/AmazingjazeGithubIo/cordova/platforms/windows
[debug] pid:3679    : Installing "cordova-plugin-hostedwebapp" for windows
[debug] pid:3679    : Installing "cordova-plugin-whitelist" for windows
[debug] pid:3679    : Installing "cordova-plugin-network-information" for windows
[debug] pid:3679    : Dependent plugin "cordova-plugin-network-information" already installed on windows.
[debug] pid:3679    : Plugin "cordova-plugin-whitelist" already installed on windows. Making it top-level.
[debug] pid:3679    : Updating Cordova configuration from W3C manifest...
[debug] pid:3679    : Removing default images from Cordova configuration...
[debug] pid:3679    : Copying wrapper html file for the windows platform from /Users/winjs/Desktop/AmazingjazeGithubIo/cordova/plugins/cordova-plugin-hostedwebapp/assets/windows/wrapper.html to /Users/winjs/Desktop/AmazingjazeGithubIo/cordova/platforms/windows/www/wrapper.html.
[debug] pid:3679    : Finished copying wrapper html file for the windows platform.
[debug] pid:3679    : Copying wrapper js file for the windows platform from /Users/winjs/Desktop/AmazingjazeGithubIo/cordova/plugins/cordova-plugin-hostedwebapp/assets/windows/wrapper.js to /Users/winjs/Desktop/AmazingjazeGithubIo/cordova/platforms/windows/www/js/wrapper.js.
[debug] pid:3679    : Finished copying wrapper js file for the windows platform.
[debug] pid:3679    : Copying wrapper css file for the windows platform from /Users/winjs/Desktop/AmazingjazeGithubIo/cordova/plugins/cordova-plugin-hostedwebapp/assets/windows/wrapper.css to /Users/winjs/Desktop/AmazingjazeGithubIo/cordova/platforms/windows/www/css/wrapper.css.
[debug] pid:3679    : Finished copying wrapper css file for the windows platform.
[info ] cordova     : Processing the 'android' Cordova platform...
[info ] cordova     : Copying documentation from '/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-cordova/lib/docs/android' to '/Users/winjs/Desktop/AmazingjazeGithubIo/cordova/platforms/android'...
[info ] cordova     : Processing the 'ios' Cordova platform...
[info ] cordova     : Copying documentation from '/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-cordova/lib/docs/ios' to '/Users/winjs/Desktop/AmazingjazeGithubIo/cordova/platforms/ios'...
[info ] cordova     : Processing the 'windows' Cordova platform...
[info ] cordova     : Copying documentation from '/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-cordova/lib/docs/windows' to '/Users/winjs/Desktop/AmazingjazeGithubIo/cordova/platforms/windows'...
[info ] cordova     : Creating a shortcut for the 'android' Cordova platform...
[info ] cordova     : Creating a shortcut for the 'ios' Cordova platform...
**[error] manifoldjs  : Failed to create the Chrome OS Platform app.**
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/projectBuilder.js:95:27
                          at _rejected (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:844:24)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:870:30
                          at Promise.when (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:1122:31)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:788:41)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)
                      TypeError: undefined is not a function
                          at Object.getPackageInformation (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/packageTools.js:75:29)
                          at PlatformBase.self.writeGenerationInfo (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/platformBase.js:248:39)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-chrome/lib/platform.js:55:21
                          at _fulfilled (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:834:54)
                          at self.promiseDispatch.done (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:863:30)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:796:13)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)
**[error] manifoldjs  : Failed to create the Firefox OS Platform app.**
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/projectBuilder.js:95:27
                          at _rejected (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:844:24)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:870:30
                          at Promise.when (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:1122:31)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:788:41)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)
                      TypeError: undefined is not a function
                          at Object.getPackageInformation (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/packageTools.js:75:29)
                          at PlatformBase.self.writeGenerationInfo (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/platformBase.js:248:39)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-firefox/lib/platform.js:55:21
                          at _fulfilled (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:834:54)
                          at self.promiseDispatch.done (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:863:30)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:796:13)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)
**[error] manifoldjs  : Failed to create the Windows 10 Platform app.**
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/projectBuilder.js:95:27
                          at _rejected (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:844:24)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:870:30
                          at Promise.when (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:1122:31)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:788:41)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)
                      TypeError: undefined is not a function
                          at Object.getPackageInformation (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/packageTools.js:75:29)
                          at PlatformBase.self.writeGenerationInfo (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/platformBase.js:248:39)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-windows10/lib/platform.js:119:21
                          at _fulfilled (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:834:54)
                          at self.promiseDispatch.done (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:863:30)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:796:13)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)
**[error] manifoldjs  : Failed to create the Cordova Platform app.**
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/projectBuilder.js:95:27
                          at _rejected (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:844:24)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:870:30
                          at Promise.when (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:1122:31)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:788:41)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)
                      TypeError: undefined is not a function
                          at Object.getPackageInformation (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/packageTools.js:75:29)
                          at PlatformBase.self.writeGenerationInfo (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/platformBase.js:248:39)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-cordova/lib/platform.js:194:21
                          at _fulfilled (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:834:54)
                          at self.promiseDispatch.done (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:863:30)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:796:13)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)
**[error] manifoldjs  : Failed to create the Web Platform app.**
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/projectBuilder.js:95:27
                          at _rejected (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:844:24)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:870:30
                          at Promise.when (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:1122:31)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:788:41)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)
                      TypeError: undefined is not a function
                          at Object.getPackageInformation (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/packageTools.js:75:29)
                          at PlatformBase.self.writeGenerationInfo (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/platformBase.js:248:39)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-web/lib/platform.js:47:21
                          at _fulfilled (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:834:54)
                          at self.promiseDispatch.done (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:863:30)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:796:13)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)
**[error] manifoldjs  : One or more platforms could not be generated successfully.**
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/manifoldjs-lib/lib/projectBuilder.js:28:23
                          at _fulfilled (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:834:54)
                          at self.promiseDispatch.done (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:863:30)
                          at Promise.promise.promiseDispatch (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:796:13)
                          at /Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:604:44
                          at runSingle (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:137:13)
                          at flush (/Users/winjs/.nvm/versions/node/v0.12.15/lib/node_modules/manifoldjs/node_modules/q/q.js:125:13)
                          at process._tickCallback (node.js:355:11)

@AmazingJaze
Copy link

AmazingJaze commented Aug 6, 2016

And here is the output I see from the Windows machine,

➜ Desktop manifoldjs https://AmazingJaze.github.io/super-rentals/ -l debug

(....)
[info ] windows10   : Copying offline file "msapp-error.html" to target: C:\Users\Jesse\gitrepos\AmazingjazeGithubIo\windows10\manifest\msapp-error.html...
[info ] manifoldjs  : The Firefox OS Platform app was created successfully!
[info ] manifoldjs  : The Chrome OS Platform app was created successfully!
[info ] windows10   : Saving the original W3C manifest to the app folder...
[info ] windows10   : Copying files to the Windows 10 Platform source project...
[info ] windows10   : Copying documentation from 'C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-windows10\lib\docs' to 'C:\Users\Jesse\gitrepos\AmazingjazeGithubIo\windows10'...
[info ] windows10   : Writing the generation information for the 'Windows 10 Platform' platform to 'C:\Users\Jesse\gitrepos\AmazingjazeGithubIo\windows10\generationInfo.json'...
[info ] manifoldjs  : The Windows 10 Platform app was created successfully!
[debug] pid:3844    : Launching external process: 'C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\.bin\cordova.cmd create cordova io.github.amazingjaze AmazingjazeGithubIo'
[debug] pid:3844    : Creating a new cordova project.
[info ] cordova     : Copying the Cordova Platform manifest to the app folder...
[info ] cordova     : Adding the following plugins to the Cordova project: cordova-plugin-hostedwebapp@>=0.3.0 <0.4.0 cordova-plugin-whitelist...
[debug] pid:7304    : Launching external process: 'C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\.bin\cordova.cmd plugin add cordova-plugin-hostedwebapp@>=0.3.0 <0.4.0 cordova-plugin-whitelist'
[debug] pid:7304    : The system cannot find the file specified.
**[error] manifoldjs  : Failed to create the Cordova Platform app.**
                          at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-lib\lib\projectBuilder.js:95:27
                          at _rejected (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:844:24)
                          at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:870:30
                          at Promise.when (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:1122:31)
                          at Promise.promise.promiseDispatch (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:788:41)
                          at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:604:44
                          at runSingle (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:137:13)
                          at flush (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:125:13)
                          at nextTickCallbackWith0Args (node.js:419:9)
                          at process._tickCallback (node.js:348:13)
                      Failed to add one or more plugins.
                          at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-cordova\lib\platform.js:104:23
                          at _rejected (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:844:24)
                          at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:870:30
                          at Promise.when (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:1122:31)
                          at Promise.promise.promiseDispatch (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:788:41)
                          at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:604:44
                          at runSingle (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:137:13)
                          at flush (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:125:13)
                          at nextTickCallbackWith0Args (node.js:419:9)
                          at process._tickCallback (node.js:348:13)
                      External process [process ID: 7304] completed with errors. The system cannot find the file specified.
                          at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-lib\lib\processTools.js:109:17)
                          at emitTwo (events.js:87:13)
                          at ChildProcess.emit (events.js:172:7)
                          at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
**[error] manifoldjs  : One or more platforms could not be generated successfully.**
                          at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-lib\lib\projectBuilder.js:28:23
                          at _fulfilled (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:834:54)
                          at self.promiseDispatch.done (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:863:30)
                          at Promise.promise.promiseDispatch (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:796:13)
                          at C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:604:44
                          at runSingle (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:137:13)
                          at flush (C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\q\q.js:125:13)
                          at nextTickCallbackWith0Args (node.js:419:9)
                          at process._tickCallback (node.js:348:13)

@boyofgreen
Copy link
Contributor

I can't recreate this either (only tried win10 so far), are you on the Anniversary release for the machine you do this on? Is it in dev mode?

@boyofgreen
Copy link
Contributor

also, what version of node are you running?

@AmazingJaze
Copy link

AmazingJaze commented Aug 8, 2016

@boyofgreen The Windows machine that sees this error is using Version 1511 of Windows 10 home (so not the anniversary edition) and it is running Node v4.2.6

@AmazingJaze
Copy link

@f2bo When inside of the project's cordova folder I can successfully invoke cordova.cmd via "C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\.bin\cordova.cmd"
but trying to run:
"C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\.bin\cordova.cmd plugin add cordova-plugin-hostedwebapp@>=0.3.0 <0.4.0 cordova-plugin-whitelist"
returrns

'"C:\Program Files\nodejs\node_modules\manifoldjs\node_modules.bin\cordova.cmd plugin add cordova-plugin-hostedwebapp@>=0.3.0 <0.4.0 cordova-plugin-whitelist"'
is not recognized as an internal or external command, operable program or batch file.

@AmazingJaze
Copy link

Whoops, I had the closing double quote in the wrong place. When I rerun the command correctly
"C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\.bin\cordova.cmd" plugin add cordova-plugin-hostedwebapp@>=0.3.0 <0.4.0 cordova-plugin-whitelist
I get:

The system cannot find the file specified.

@f2bo
Copy link
Contributor

f2bo commented Aug 8, 2016

The command line above that failed is using Cordova to add plugins to the project. It seems that either Cordova did not install correctly (by this I mean the private copy that manifoldjs installs), or there's some other environment issue that prevents it from working correctly.

It's unclear from the error message which is the file that is missing, but I assume that cordova.cmd is available since it should have already been invoked previously to create the app. In any case, it wouldn't hurt to double check that "C:\Program Files\nodejs\node_modules\manifoldjs\node_modules.bin\cordova.cmd" is there.

One thing that stands out though is that you appear to have installed manifoldjs inside the nodejs folder in Program Files. Moreover, the person who initially reported this problem also appears to have the same configuration. Typically, when installing manifoldjs globally (in Windows), it's copied to "C:\Users\AppData\Roaming\npm\node_modules". I'm not sure how it got installed within Program Files. What command line did you use to install it?

In any case, just to exclude the possibility that the issue is caused by the location of manifoldjs, I would test uninstalling manifoldjs and then installing it elsewhere.

@AmazingJaze
Copy link

Hi @f2bo

Sorry I wasn't more clear, yes I have verified that "C:\Program Files\nodejs\node_modules\manifoldjs\node_modules.bin\cordova.cmd" is there.

I am not sure why global packages are being installed in %Program Files%\nodejs\node_modules\ but I have tried completely uninstalling node and all global packages from that directory, reinstalling Node v4.4.7 and reinstalling manifoldjs via npm install -g manifoldjs and it goes right back into %Program Files%\nodejs\node_modules\

Additionally, I can confirm that on my windows machine that isn't experiencing these problems, global packages are being installed in AppData\Roaming\npm\node_modules

C:\Users\jessesh\Desktop\projects>npm root -g
C:\Users\jessesh\AppData\Roaming\npm\node_modules

I will see if I can figure out how to install a global package in another directory other than the default %Program Files%\nodejs\node_modules\ directory

@AmazingJaze
Copy link

AmazingJaze commented Aug 8, 2016

With the help of @f2bo, I was able to solve the issue on my pc using the following command to change the install location of global packages to C:\Users{UserName}\AppData\Roaming\npm
npm config set prefix "C:\Users\Jesse\AppData\Roaming\npm"

This seems to suggest that something in cordova is hard coded to expect the \AppData\Roaming path for global packages on Windows.

I do not know why npm was installing global packages down the C:\Program Files\ path but I can confirm that immediately before applying this fix, my .npmrc file which now specifies a prefix entry like so:

progress=false
prefix=C:\Users\Jesse\AppData\Roaming\npm

previously only looked like this:

progress=false

I will go back to my macbook and see if a similar solution unblocks me on that machine as well.

@AmazingJaze
Copy link

Similar problem with the MacBook. I was using NVM a popular node version manager and my global prefix was not the default for mac

npm prefix -g
/Users/winjs/.nvm/versions/node/v0.12.15

After uninstalling nvm, I was able to successfully run the manifold js command

@boyofgreen
Copy link
Contributor

okay, that is good to know. I wonder if we should file a bug with nvm?

@AmazingJaze
Copy link

AmazingJaze commented Aug 9, 2016

It seems like the real issue is in Cordova, since it seems they have a problem if the package isn't installed at the location they expect via what I assume is a hard-coded path somewhere in their package. I don't think nvm is in the wrong for maintaining seperate global installs for each version of npm that its users want it to manage.

More importantly, any time I install Node 4.4.7 on any Windows 10 machine the new default location for global packages is "C:\Program Files\NodeJS" rather than the historical Windows path of "C:\users{username}\AppData\Roaming\npm".

Today I took my other Windows 10 machine, which had been working with Cordova and Manifold all along, and I tried uninstalling node, then performing a fresh install of 4.4.7. Previously this machine had always been using the historical path, but after the reinstall I can see that npm prefix -g now returns "C:\Program Files\NodeJS"

Then, running the command npm install -g cordova, Cordova appears to install without any errors printed in the console, but I cannot invoke it globally via the console, and where cordova indicates that there are no matches in my file system.

However, if I manually change the location of my global packages via
npm config set prefix "C:\Users\jessesh\AppData\Roaming\npm" and then follow up with npm install -g cordova I am able to invoke cordova from the command line and where cordova successfully returns

C:\Users\jessesh>where cordova
C:\Users\jessesh\AppData\Roaming\npm\cordova
C:\Users\jessesh\AppData\Roaming\npm\cordova.cmd

I've been able to repro this on two separate windows 10 machines by uninstalling node, and then installing node v4.4.7 from here

Before we open a bug against Cordova, @boyofgreen @f2bo are either of you able to repro this?

@AmazingJaze
Copy link

Updated previous comment for clarity

@AmazingJaze
Copy link

More evidence

@f2bo
Copy link
Contributor

f2bo commented Aug 10, 2016

Thanks @AmazingJaze for taking the time to follow up on this.

Before we open a bug against Cordova, @boyofgreen @f2bo are either of you able to repro this?

I agree that the problem appears to be Cordova, but only in Windows. Although I think there must be some other twist, otherwise more people should be complaining about this.

However, the errors in the OS X El Capitan log that you show above, even though they also appear to be triggered by the npm prefix change, are not related to Cordova. In fact, they seem to be a problem in the packageTools module of manifoldjs-lib.

Let me find some time to run a few tests.

@AmazingJaze
Copy link

AmazingJaze commented Aug 10, 2016

Thanks @f2bo, have you been able to confirm the repro on Windows if you follow the steps I outlined above?

I found some more active discussions about problems with cordova and npm on windows this morning.
npm/npm#8729
npm/npm#8626
albeit from 2015

@f2bo
Copy link
Contributor

f2bo commented Aug 10, 2016

I uninstalled the node version that I had installed and installed v4.4.7 instead and I could reproduce the original problem. That is, the default location for installing global packages is indeed "C:\Program Files\nodejs\node_modules" and ManifoldJS does fail when launching Cordova from this location.

I haven't had time to test a standalone installation of Cordova yet. However, I'm able to run the command line that fails when invoked by manifoldjs if I do so from a console window (after changing it slightly to quote the plugin+version constraint).

"C:\Program Files\nodejs\node_modules\manifoldjs\node_modules\manifoldjs-cordova\node_modules\.bin\cordova.cmd" plugin add "cordova-plugin-hostedwebapp@>=0.3.0 <0.4.0" cordova-plugin-whitelist

So next, I want to look at the way external commands are launched and how quotes are handled, to see if the problem might be there.

@AmazingJaze
Copy link

AmazingJaze commented Aug 11, 2016

Just a quick update regarding the failure in Mac OS with nvm. I tried create a consistent set of repro steps using nvm this morning and I am unable to get the failure to repro.

Here are the steps I was attempting in case this ever comes around again. Probably non actionable for now.

  1. Install nvm curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh | bash
  2. Manage Node through nvm: nvm use node (This is what causes the global prefix to change)
  3. Install manifoldjs npm install -g manifoldjs
  4. Verify that which manifoldjs returns a path containing "nvm".
  5. Generate the store app: `manifoldjs http://AmazingJaze.github.io/super-rentals/'

@f2bo
Copy link
Contributor

f2bo commented Aug 15, 2016

Hi @AmazingJaze

I've looked at this a little bit more and can confirm that the problem is not Cordova but the way in which child_process.spawn() handles arguments in the Windows platform. It seems that the command will fail whenever both the command path and any argument contain space characters. Note that it has to be both.

One of the arguments specified by manifoldjs has always had a space character, but it wasn't a problem while the path to Cordova did not contain spaces as well.

This node issue has been reported previously.

nodejs/node#7367
nodejs/node-v0.x-archive#25895

I've tried the workaround suggested in the comment below without success (I need to confirm this, but it would seem that the shell option is not available in v4.4.7).

nodejs/node#7367 (comment)

I'm still exploring a different workaround.

@AmazingJaze
Copy link

AmazingJaze commented Aug 15, 2016

@f2bo that is a really unfortunate change to the global prefix if there is in fact no workaround for windows in v4.4.7

Its Interesting that at least for now, Node v6.3.1 still uses the AppData\Roaming\ path for global prefixes in Windows.

@SrMordred
Copy link

Ok, just got stuck on this error too, waiting for any news..

@boyofgreen
Copy link
Contributor

Hi patric, our current work around is node v 6.x, is that doable for you?

@SrMordred
Copy link

Tried (was using 4.x ) but same error.

@boyofgreen
Copy link
Contributor

and you are also using NVM? We're going to add this to our backlog again to research....

@boyofgreen boyofgreen added this to the release-0.7.0 milestone Sep 30, 2016
@boyofgreen boyofgreen added the P3 label Sep 30, 2016
@boyofgreen
Copy link
Contributor

@manifoldjs/admin-team This is still probably a cordova issue, but we might need to formally submit a bug to them. Might be more of a research than coding exercise.

@SrMordred
Copy link

SrMordred commented Oct 4, 2016

Just for the record. It seems - at least for me - that was a window path related bug.
I installed manifoldjs as local, not global.
Then exec:
node node_modules\manifoldjs\manifoldjs.js http://mydomain.com
And it worked...
but I fall in another bug (when exec cordova build):

Updating Cordova configuration from W3C manifest...
The module "ConfigParser" has been factored into "cordova-common". Consider update your plugin hooks.
Error: Cannot find module '../../node_modules/elementtree'

Which I find about it here :
pwa-builder/ManifoldCordova#82
Tried the solution explained there but still did´t worked for me ;(

@SrMordred
Copy link

Ok, I managed to get it work for me on windows.

I changed the file platform.js line 26:
var pluginIdOrUrl = process.env.CORDOVA_PLUGIN_HOSTEDWEBAPP || 'cordova-plugin-hostedwebapp@>=0.3.0 <0.4.0';
to:
var pluginIdOrUrl = process.env.CORDOVA_PLUGIN_HOSTEDWEBAPP || 'cordova-plugin-hostedwebapp@>=0.3.0';

Cordova plugin add command did´nt accept that last plugin constraint "<0.4.0"
Not sure how to do this plugin constraint right, but removing it for me make manifold works properly.

@boyofgreen
Copy link
Contributor

Hi @SrMordred thanks for looping back around. We have this on the list to work on for the next release, your tips will help! Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants