[TIMOB-23484] windowslib: don't hard error when detecting devices if Visual Studio is not installed
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-10-11T04:54:58.000+0000 |
Affected Version/s | Release 5.3.0 |
Fix Version/s | Release 6.0.0, windowslib 0.4.15 |
Components | Tooling, Windows |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Kota Iguchi |
Created | 2016-06-08T17:34:17.000+0000 |
Updated | 2016-10-11T04:55:05.000+0000 |
Description
windowslib uses a custom tool called "wptool" to detect connected Windows Phone devices. "wptool" uses assemblies that are distributed with Visual Studio and it was designed such that "wptool" is compiled before executing. This obviously requires Visual Studio. If VS is not installed, it returns the error:
Error: Did not find support for WP SDK 8.0. Cannot enumerate devices.
While the device detection API may return an error, windowslib.detect()
should ignore the error and return successfully.
I am also getting this error but on Windows 7. Is that to be expected w/ this issue? Thanks!
[~brentonhouse] Yeah, this affects all versions of Windows. It's already fixed if you pull a CI build.
[~cbarber] Thanks!!
windowslib: https://github.com/appcelerator/windowslib/pull/48
*TEST CASE* 1. Remove Visual Studio 2. Detect devices
appc ti info
*Before Fix* - Detecting devices would fail with an error *After Fix* - Detecting devices should not throw an errorVerified using: Windows 10 Pro Appc CLI: 6.0.0-31 Appc NPM: 4.2.8-5 Ti SDK: 6.0.0.v20160823163945 When VS is not installed, appc ti info now outputs Windows information and does not error on detecting devices. Closing ticket.
Reopening ticket: Windows 10 Pro Appc CLI: 6.0.0-36 Appc NPM: 4.2.8-6 Ti SDK: 6.0.0.v20160901004900 Lumia 930 10.0 With only Windows 10 tooling installed I am unable to build to device. I have traced the issue back to an error being thrown [here](https://github.com/appcelerator/windowslib/blob/master/lib/wptool.js#L233). As an error is being thrown the [device is not returned](https://github.com/appcelerator/windowslib/blob/master/lib/device.js#L56) so devices [here](https://github.com/appcelerator/windowslib/blob/master/lib/device.js#L140) is empty and the build process will error out with
\[ERROR\] Unable to find a Windows Phone device with the UDID "00000015-4e57-1877-0000-000000000000"
[~eharris] Can
ti info \-p windows \-o json
detect devices for you? Is there any difference betweenti info \-p windows \-o json
andappc ti info \-p windows \-o json
? Do you see same error when you specify--wpsdk 10.0
? I have experienced similar issue too that happens intermittently and it's not frequent.[~kota] I've tried to reproduce this again today but for the life of me could not To answer your questions currently: * Device is detected with no issues, no difference between appc ti and ti * I see no difference between building with and without
--wp-sdk 10.0
* I've also seen this error intermittently before but this time was different, usually it goes after one build, however this stuck with me for hours. Additionally, when I reopened this ticket the error would happen before it begins installing the app to device, when I've seen this before it happens during the checks that take place during/before the build. To answer (what I can) from your questions for when I reopened this ticket * Device was detected with no issues in appc ti info, not sure of any difference between appc ti and ti * I did try with--wp-sdk 10.0
but from what I remember there was no differenceThanks [~eharris]. I have experienced very similar issue too. It happens intermittently, and the place where the error raises tends to change for each build. Sometimes it's before the build, and sometimes it happens just before the installation. I strongly suspect Windows deployment tool fails to connect or it crashes/freezes during the build. I discussed with Kiat and EricM about this and we might want to remove the
6.0.0
label for now and keep following this up for later release.sounds good to me (y)