[TIMOB-24634] (Windows) Unable to run a Windows application using the 6.1.0.v20170426072049 build
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-04-28T15:23:36.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.1.0 |
Components | Tooling |
Labels | n/a |
Reporter | Samir Mohammed |
Assignee | Christopher Williams |
Created | 2017-04-26T17:30:01.000+0000 |
Updated | 2017-05-02T18:06:25.000+0000 |
Description
Using the latest 6.1.0 build (6.1.0.v20170426072049) I am unable to run any created applications to a Window Phone or Windows Emulator.
Enter
appc ti sdk install -b master -d
in the appc CLI to get the latest build.
Steps to reproduce:
1. Open Appcelerator Studio
2. Go to file
-> New
-> mobile app project
3. Select a classic default project and press next
4. Enter project name
and app id
5. Press finish
to create the application
6. Go to the tiapp.xml
and change the SDK version to 6.1.0.v20170426072049
7. Run the application to a device or emulator
*Expected result*
Application should run without any issues
*Actual result*
Following error is shown in the console:
2017-04-26T17:21:53.379Z | ERROR | An uncaught exception was thrown!
Cannot find module 'node-titanium-sdk/lib/builder'
2017-04-26T17:21:53.385Z | ERROR | Cannot find module 'node-titanium-sdk/lib/builder'
2017-04-26T17:21:53.385Z | TRACE | Error: Cannot find module 'node-titanium-sdk/lib/builder'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\6.1.0.v20170426072049\windows\cli\commands\_build.js:14:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at C:\ProgramData\Titanium\mobilesdk\win32\6.1.0.v20170426072049\node_modules\titanium-sdk\lib\titanium.js:86:14
at C:\ProgramData\Titanium\mobilesdk\win32\6.1.0.v20170426072049\node_modules\async\dist\async.js:3816:26
at eachOfArrayLike (C:\ProgramData\Titanium\mobilesdk\win32\6.1.0.v20170426072049\node_modules\async\dist\async.js:1039:9)
at eachOf (C:\ProgramData\Titanium\mobilesdk\win32\6.1.0.v20170426072049\node_modules\async\dist\async.js:1087:5)
Using a previous SDK build (6.1.0.v20170421082637) the application runs without any issues.
Sounds like this is duplicate of TIMOB-24626? So I guess we need to backport both TIMOB-24627 and TIMOB-24626 to 6_1_X.
I'm guessing this is because we built 6.1.0 sdk binary from titanium_mobile_windows master. I see that our [6_1_X/cli/commands/_build.js](https://github.com/appcelerator/titanium_mobile_windows/blob/6_1_X/cli/commands/_build.js) correctly points to
titanium-sdk/lib/builder
still. [~cwilliams] Could you look into this?Looks the 6.1.0 builds for titanium_mobile need an env var setting? https://github.com/appcelerator/titanium_mobile/blob/6_1_X/Jenkinsfile#L82
I messed up the build script. It should try to use env.CHANGE_TARGET for PRs, env.BRANCH_NAME for non-PRs, and fallback to 'master' if both are not set. Pushed a fix to 6_1_X build and master build of titanium_mobile.
Fixed the build to grab 6_1_X of windows sdk, as of 6.1.0.v20170428073516
(y)
Closing ticket, as issue is now fixed and I am able to run a windows application on the 6.1.X branch.