Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18531] Windows: Use default publisher-guid when none is given on build

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-03-29T16:08:48.000+0000
Affected Version/sRelease 5.0.0
Fix Version/sRelease 5.3.0
ComponentsWindows
Labelsn/a
ReporterFokke Zandbergen
AssigneeGary Mathews
Created2015-02-06T14:44:28.000+0000
Updated2016-05-12T21:07:07.000+0000

Description

The --win-publisher-id or -I option is required for ti build, so it must be given on every build if not set via ti setup (TIMOB-16748). On Android, we use the the dev_keystore included in the SDK when none is given. Would it be an option to have a similar approach for Windows and default to the 00000000-0000-1000-8000-000000000000 mentioned in the [blog](http://www.appcelerator.com/blog/2014/12/windows-platform-preview/) for example ?

Comments

  1. Christopher Williams 2015-07-07

    I think this may make sense for development builds, but we'd likely want to enforce the user supplies one explicitly for any production/packaging builds intended to be released eitehr ad-hoc or to the stores...
  2. Fokke Zandbergen 2015-07-07

    Yes, for sure. And we might want to do that for Android store builds as well as I think atm it defaults to the developer keystore without notice.
  3. Gary Mathews 2015-10-02

    PR: https://github.com/appcelerator/titanium_mobile_windows/pull/447
  4. Ewan Harris 2016-02-02

    Reopening ticket: Windows 10 Pro VS 2015 Update 1 Appc NPM: 4.2.3-1 Appc Core: 5.2.0-239 Ti SDK: 5.2.0.v20160202103508

    Steps to reproduce

    Remove publisherId from you titanium config ti config -r windows.publisherId

    Build a project using appc run -p windows -T wp-device --deploy-type production -l trace

    Actual result

    Build errors out with the below
       2016-02-02T22:24:57.621Z | ERROR  | An uncaught exception was thrown!
       Cannot read property 'indexOf' of undefined
       2016-02-02T22:24:57.625Z | ERROR  | Cannot read property 'indexOf' of undefined
       2016-02-02T22:24:57.628Z | TRACE  | TypeError: Cannot read property 'indexOf' of undefined
           at WindowsBuilder.initialize (C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\windows\cli\commands\_build\initialize.js:71:22)
           at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:689:13
           at iterate (C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:265:13)
           at process._tickCallback (node.js:355:11)
       ---------------------------------------------
           at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:275:35
           at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:44:16
           at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:694:17
           at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:173:37
           at WindowsBuilder.doAnalytics (C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\windows\cli\commands\_build\analytics.js:56:2)
           at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:689:13
           at iterate (C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:265:13)
           at process._tickCallback (node.js:355:11)
       ---------------------------------------------
           at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:275:35
           at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:44:16
           at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:694:17
           at C:\ProgramData\Titanium\mobilesdk\win32\5.2.0.v20160202103508\node_modules\node-appc\node_modules\async\lib\async.js:173:37
           at C:\Users\ewanh\.appcelerator\install\5.2.0-239\package\node_modules\titanium\node_modules\async\lib\async.js:52:16
           at WindowsBuilder.done (C:\Users\ewanh\.appcelerator\install\5.2.0-239\package\node_modules\titanium\node_modules\async\lib\async.js:248:21)
           at WindowsBuilder.<anonymous> (C:\Users\ewanh\.appcelerator\install\5.2.0-239\package\node_modules\titanium\node_modules\async\lib\async.js:44:16)
           at CLI._fireHookCallback (C:\Users\ewanh\.appcelerator\install\5.2.0-239\package\node_modules\titanium\lib\hook.js:269:12)
           at C:\Users\ewanh\.appcelerator\install\5.2.0-239\package\node_modules\titanium\lib\hook.js:248:10
       

    Expected result

    Based off the discussion on the pull request, I believe the build should prompt for a publisherId *Note* Also when building for dist-winstore or dist-phonestore there is no prompt asking for a publisherId
  5. Fokke Zandbergen 2016-02-03

    Seems like publisherId is null instead of expected string here: https://github.com/garymathews/titanium_mobile_windows/blob/1c1ba7fc02e5a93b3a0b3612f2b5c08cd2fe53c3/cli/commands/_build/initialize.js#L67
  6. Christopher Williams 2016-02-03

    I was imprecise in my language as I said "production/packaging" builds should prompt. You thought of a test case I hadn't considered, which was a production deploy type on device - I was thinking simply the dist-phonestore and dist-winstore targets. But in this case, if you're explicitly choosing production deploy type, then yeah it probably also makes sense to force a real publisherid here.
  7. Gary Mathews 2016-02-24

    PR: https://github.com/appcelerator/titanium_mobile_windows/pull/567
  8. Ewan Harris 2016-03-21

    Reopening ticket: Windows 10 Pro Appc NPM: 4.2.4-2 Appc Core: 5.2.1-17 Titanium SDK: 5.3.0.v20160318230005

    Steps to reproduce

    1. Remove publisherId from you titanium config ti config -r windows.publisherId 2. Build a project using appc run -p windows -T dist-phonestore

    Actual result

    When building to dist-phonestore or dist-winstore the CLI does not prompt for a publsiher-guid.

    Expected result

    I should be prompted to enter a guid when building for dist-phonestore or dist-winstore
  9. Christopher Williams 2016-03-22

    [~gmathews] Can you take a look? This got re-opened again...
  10. Kota Iguchi 2016-03-28

    If I understand correctly currently prompt is shown only when deploy-type is production. [cli/commands/_build/config/winPublisherId.js](https://github.com/appcelerator/titanium_mobile_windows/pull/567/files)
  11. Christopher Williams 2016-03-28

    So perhaps this is just an issue of us not defaulting deployType to 'production' on dist-* target builds?
  12. Kota Iguchi 2016-03-29

    https://github.com/appcelerator/titanium_mobile_windows/pull/597
  13. Ewan Harris 2016-05-12

    Verified using: Windows 10 Pro Visual Studio 2015 Community Update 2 Appc Core: 5.3.0-43 Appc NPM: 4.2.5-5 Ti SDK: 5.3.0.v20160512105713 Prompt for publisher-guid is now shown when packaging the app for dist-winstore and dist-phonestore and also when building with \--deploy-type set to production for wp-emulator, wp-device and ws-local. Closing ticket

JSON Source