Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19838] Windows: Fix Jenkins Windows SDK PR Build

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-11-03T17:27:26.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.2.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeChristopher Williams
Created2015-11-02T02:41:50.000+0000
Updated2016-02-16T22:37:44.000+0000

Description

Currently all tests in Jenkins Windows SDK PR Build are failing. Seems like they are failing when launching emulator. Do we change something recently?
12:35:24 [DEBUG] :  Time Elapsed 00:00:16.29
12:35:24 [INFO] :   Writing build manifest: C:\Windows\TEMP\mocha\build-manifest.json
12:35:24 [INFO] :   Copying results back to project build directory
12:35:26 [INFO] :   Finished building the application in 39s 280ms
12:35:26 [INFO] :   Finished building the application in 39s 282ms
12:35:26 [INFO] :   Waiting for Windows Phone emulator to finish booting
12:45:55 [ERROR] :  Failed to start emulator "8-1-1"
12:45:55 [ERROR] :  App deployment failed. Please try again.
* http://studio-jenkins.appcelerator.org/job/titanium_mobile_windows_prs/1437/ * http://studio-jenkins.appcelerator.org/job/titanium_mobile_windows_prs/1441/ * http://studio-jenkins.appcelerator.org/job/titanium_mobile_windows_prs/1440/

Comments

  1. Christopher Williams 2015-11-02

    I _think_ this may be from running the Jenkins slave as a service, which I believe runs under Administrator rights, which may be causing some environment issues. I'll try restarting it manually under the simple user account and fix permissions issues.
  2. Christopher Williams 2015-11-02

    I have no idea why this keeps happening! I can run from the CLI on the same box manually and it finds the emulator just fine and can launch it. I'm at a loss as to why this would happen. I tried modifying the service to start as a specific user. I fixed permissions. I stopped the service entirely and ran the slave process from cmd.exe manually through VPN/RDC. Nothing seems to work. I honestly have no idea how to get this fixed any more.
  3. Kota Iguchi 2015-11-02

  4. Kota Iguchi 2015-11-02

  5. Kota Iguchi 2015-11-02

  6. Christopher Williams 2015-11-03

    [~kota] It has been restarted. the "busy" failures were due to me being logged into the server and trying the build manually (I had a Windows Explorer open to the folder, which a subsequent build didn't like). The error message remains the default "invalid" error, not sure why. Looks like the CLi can error out about invalid values in two spots, one of which will bubble up the error given by the validation of the value, the other giving this default message. I'm playing around some more to see if I can get details why it's failing, but this is a mystery to me.
  7. Christopher Williams 2015-11-03

    Looks like it's having trouble getting the emulator listing:
       "windows": {
       00:10:06.399 			"8.1": {
       00:10:06.399 				"version": "8.1",
       00:10:06.399 				"registryKey": "HKEY_LOCAL_MACHINE\\Software\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1",
       00:10:06.399 				"supported": true,
       00:10:06.399 				"path": "C:\\Program Files (x86)\\Windows Kits\\8.1\\",
       00:10:06.399 				"signTool": {
       00:10:06.399 					"arm": "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\arm\\SignTool.exe",
       00:10:06.399 					"x86": "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x86\\SignTool.exe",
       00:10:06.399 					"x64": "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x64\\SignTool.exe"
       00:10:06.399 				},
       00:10:06.399 				"makeCert": {
       00:10:06.399 					"x86": "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x86\\MakeCert.exe",
       00:10:06.399 					"x64": "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x64\\MakeCert.exe"
       00:10:06.399 				},
       00:10:06.399 				"pvk2pfx": {
       00:10:06.399 					"x86": "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x86\\pvk2pfx.exe",
       00:10:06.399 					"x64": "C:\\Program Files (x86)\\Windows Kits\\8.1\\bin\\x64\\pvk2pfx.exe"
       00:10:06.399 				},
       00:10:06.399 				"selected": true
       00:10:06.399 			}
       00:10:06.399 		},
       00:10:06.399 		"devices": [],
       00:10:06.399 		"emulators": {},
       00:10:06.399 		"os": {
       00:10:06.399 			"name": "Microsoft Windows 8.1 Enterprise N",
       00:10:06.399 			"version": "6.3.9600"
       00:10:06.399 		},
       00:10:06.399 		"powershell": {
       00:10:06.399 			"enabled": true
       00:10:06.399 		},
       00:10:06.399 		"selectedVisualStudio": {
       00:10:06.399 			"version": "12.0",
       00:10:06.399 			"registryKey": "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\12.0_Config",
       00:10:06.399 			"supported": true,
       00:10:06.399 			"vcvarsall": "C:\\PROGRA~2\\MICROS~1.0\\VC\\VCVARS~1.BAT",
       00:10:06.399 			"msbuildVersion": "12.0.31101.0",
       00:10:06.399 			"wpsdk": null,
       00:10:06.399 			"selected": true,
       00:10:06.399 			"path": "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\",
       00:10:06.399 			"clrVersion": "v4.0.30319"
       00:10:06.399 		},
       
  8. Christopher Williams 2015-11-03

    It's a permissions issue, but hell if I know where/how to fix it. If I try to run AppDeployCmd.exe /EnumerateDevices from the build script we get:
       Error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
       
    VPN/RDC in using the same account and running works fine.
  9. Christopher Williams 2015-11-03

    This sucked to try and track down. Looks like because I initially set the Windows boxes up as slaves using a service (so I no longer had to manually log in to connect them to Jenkins), it did this as Administrator by default. Great, except it f-ed up all the permissions and npm didn't like it one bit. So I tried some hacks, but eventually changed teh service to run as the same user I'd VPN/RDC in as. Awesome. Except now we magically can't find any emulators. Except using the exact same account manually, I can. Ran ProcMon while the build failed to pick up emulators. Shows access is denied to C:\ProgramData\WowSys64\config\AppData\Local and various subfolders. WTF? Why would it be using those folders? Because Jenkins has a big bug: - https://issues.jenkins-ci.org/browse/JENKINS-27739 - https://issues.jenkins-ci.org/browse/JENKINS-28278 basically when the service connected to Jenkins master as Admin is cached all the ENV. Then when I later stopped/modified/restarted it using the correct account, IT NEVER UPDATED THE ENV VARS, thereby using the Admin HOME/USERPROFILE as the APPC/appcelerator user. Fix is to start service as APPC/appcelerator, restart Jenkins master and have a beer.
  10. Kota Iguchi 2015-11-04

    :)(y)
  11. Wilson Luu 2016-02-16

    Closing ticket since it's a dev task.

JSON Source