[TIMOB-24157] Windows: CLI doesn't run ws-local app
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-11-24T12:48:23.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.0.1, windowslib 0.4.24 |
Components | Windows |
Labels | qe-6.0.1 |
Reporter | Kota Iguchi |
Assignee | Kota Iguchi |
Created | 2016-11-18T01:18:15.000+0000 |
Updated | 2016-11-30T19:20:48.000+0000 |
Description
Titanium CLI freezes when you run Windows Store desktop app. It builds the app normally, but then it freezes when it tries to install the app while showing
Press enter to continue…
.
appc ti build -p windows -T ws-local
Installing the application
Press enter to continue…
Attachments
File | Date | Size |
---|---|---|
certmgr.png | 2016-11-18T15:04:19.000+0000 | 59329 |
TH4qc7w6A8h8209ODKl16g.png | 2016-11-18T01:21:36.000+0000 | 67412 |
maybe related: [keypress events not working in windows cmd.exe & powershell · Issue #5384 · nodejs/node](https://github.com/nodejs/node/issues/5384)
So it turns out that from at some version of Node.js
spawn
doesn't accept user input when you execute powershell script. Here's a sample code:And here's the powershell script that shows prompt:
node test.js
should show theInput something:
prompt, but it doesn't accept user input.Tested using following versions of Node.js but none of them fixes the issue. * 4.4.7 * 4.6.2 * 5.5.0 * 6.3.1 * 6.9.1 * 7.1.0
Have you tried to user 'run' instead of 'build'?
I tried "appc run" too but it doesn’t work well for me. I believe it's because “Press enter to continue…” won’t be shown when you already installed developer certificate. To see if you already installed developer certificate, launch “Manage user certificates” from control panel and navigate to “Trusted People > Certificates”. “CMake Test Cert” is the developer cert, and when you remove it, “Press enter to continue…” will be displayed for you again. Warning: I would not recommend deleting developer certificate unless you want to debug this issue because you'll be blocked as you can't launch your app due to this issue... :P !certmgr.png|thumbnail!
https://github.com/appcelerator/windowslib/pull/60
Note: This needs to be merged to
titanium_mobile
in order to close this ticket.[~sliang], To apply this fix manually, replace
C:\ProgramData\Titanium\mobilesdk\win32\YOUR_TI_SDK\node_modules\windowslib\lib\winstore.js
with [this latest one](https://github.com/appcelerator/windowslib/blob/master/lib/winstore.js).Verified as fixed the application now builds and runs successfully. Tested on: {noformat} Windows 10 Pro (1807) Ti SDK: 6.1.0.v20161130023500 Appc NPM: 4.2.8 App CLI: 6.0.0 Windowslib 0.4.20.1 Node v4.6,0 {noformat} Closing Ticket.