Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23371] Windows: Only report a device when one has been detected

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionWon't Do
Resolution Date2021-02-11T12:19:52.000+0000
Affected Version/sRelease 5.3.0
Fix Version/swindowslib 0.4.15
ComponentsWindows
Labelsqe-5.3.0
ReporterEwan Harris
AssigneeUnknown
Created2016-05-12T22:26:23.000+0000
Updated2021-02-11T12:20:02.000+0000

Description

Description

When building to a Windows Phone Device if multiple devices are connected then the two devices are displayed along with Device 0
Which device do you want to install your app on?
   1)  Device                    (udid: 0)
   2)  Lumia 930 (RM-1045)       (udid: 00000015-4e57-1877-0000-000000000000)
   3)  Nokia Lumia 520 (RM-914)  (udid: 004a0090-40df-0094-0000-000000000000)
Select by number or name [Device]: 
When building , for me, selecting any of the above devices the build errors out for me. As we are unable to support multiple devices due to the tooling we use then this should be handled better.

Steps to reproduce

1. Connect multiple devices 2. Build using appc run -p windows -T wp-device

Actual result

Multiple devices are shown

Expected result

Multiple devices should not be shown, user should be informed of the support for only one device

Comments

  1. Gary Mathews 2016-05-25

    This PR should address this issue: https://github.com/appcelerator/windowslib/pull/42
  2. Gary Mathews 2016-07-14

    titanium_mobile: https://github.com/appcelerator/titanium_mobile/pull/8138
  3. Kota Iguchi 2016-07-15

    This issue is not fixed by windowslib 0.4.15. appc ti info -p windows -o json *When one device is connected*
       "devices": [
               {
                       "name": "Lumia 630 Dual SIM (RM-978)",
                       "udid": "00000015-4901-3b2b-0000-000000000000",
                       "index": 0,
                       "wpsdk": "8.1",
                       "ip": "127.0.0.1"
               }
       ]
       
    This looks good. *When two devices are connected*
       "devices": [
               {
                       "name": "Device",
                       "udid": 0,
                       "index": 0,
                       "wpsdk": null
               },
               {
                       "name": "Windows 10 Mobile Device",
                       "udid": "00000015-c470-8a24-0000-000000000000",
                       "index": 0,
                       "wpsdk": null,
                       "ip": "127.0.0.1"
               },
               {
                       "name": "Lumia 630 Dual SIM (RM-978)",
                       "udid": "00000015-4901-3b2b-0000-000000000000",
                       "index": 1,
                       "wpsdk": null,
                       "ip": "127.0.0.1"
               }
       ],
       
    This should omit placeholder device. appc ti build -p windows --target wp-device actually reports udid=0 device like below.
       Which device do you want to install your app on?
          1)  Device                       (udid: 0)
          2)  Windows 10 Mobile Device     (udid: 00000015-c470-8a24-0000-000000000000)
          3)  Lumia 630 Dual SIM (RM-978)  (udid: 00000015-4901-3b2b-0000-000000000000)
       
  4. Gary Mathews 2016-07-18

    windowslib: https://github.com/appcelerator/windowslib/pull/49
  5. Kota Iguchi 2016-08-04

    [~gmathews], please check the comments here: https://github.com/appcelerator/windowslib/pull/49
  6. Gary Mathews 2016-08-04

    I would consider this ticket resolved with: https://github.com/appcelerator/windowslib/pull/42 https://github.com/appcelerator/windowslib/pull/49 is just an addition to clean up the device listing, but isn't necessary for this ticket.
  7. Kota Iguchi 2016-08-04

    Resolving, as {quote} I would consider this ticket resolved with: https://github.com/appcelerator/windowslib/pull/42 https://github.com/appcelerator/windowslib/pull/49 is just an addition to clean up the device listing, but isn't necessary for this ticket. {quote} [~gmathews] Would you create new ticket for it?
  8. Ewan Harris 2016-09-02

    Reopening ticket: OS: Windows 10 Pro Appc core: 6.0.0-37 Appc NPM: 4.2.8-6 Ti SDK: 6.0.0.v20160901034311 Placeholder device is still reported
       Windows Phone Devices
         Device
           UDID                      0
       
        "devices": [
                               {
                                       "name": "Device",
                                       "udid": 0,
                                       "index": 0,
                                       "wpsdk": null
                               }
                       ],
       
  9. Kota Iguchi 2016-09-08

    6_0_X: https://github.com/appcelerator/titanium_mobile_windows/pull/859 master: https://github.com/appcelerator/titanium_mobile_windows/pull/860
  10. Ewan Harris 2016-09-12

    [~kota] [~gmathews] I'd just like to confirm a few things regarding this, 1. Does this mean we can now handle multiple device being connected when building? (This was what the original ticket was written for before being altered). * Current status using SDK 6.0.0.v20160909225457: * Windows phone 8.1 device - Starts a Windows 10 emulator, build process fails with \[ERROR\] Failed to start Nokia Lumia 520 (RM-914) (code null) * Windows 10 mobile device - Errors out with \[ERROR\] App deployment to the Windows Phone failed because multiple Windows Phone devices were detected. You should only connect one phone 2. When two devices are connected neither of them have the wpsdk value set in the json output, when just a Windows 10 Mobile device is connected the wpsdk value is set. Seeing as we used this when determining what SDK to use I foresee this being a problem (In the above example I'm pretty sure it is using 8.1 SDKs, due to the logging below)
        [INFO]  Running cmake at C:\ProgramData\Titanium\mobilesdk\win32\6.0.0.v20160909225457\windows\cli\vendor\cmake\bin\cmake.exe in directory C:\Users\ewan\.titanium\vsbuild\ppBootTC\phone.ARM
        [INFO]  -- The C compiler identification is MSVC 18.0.40629.0
        [INFO]  -- The CXX compiler identification is MSVC 18.0.40629.0
        
  11. Kota Iguchi 2016-09-20

    [~eharris] Hmm nice catch, I think you are right. We don't actually support multiple device and you may see issues. I think I did miss the point then, my [previous PR](https://github.com/appcelerator/titanium_mobile_windows/pull/859) was just meant to delete placeholder device. I would reopen this, but I would also like to move this to 6.1.0 because of the timeframe we have for 6.0.0. Reopening.
  12. Kota Iguchi 2016-09-20

    Removed 6.1.0 release target, because AppDeployCmd.exe in Windows Phone 8.1 Tools does not quite work when multiple devices are connected. (App deployment to the Windows Phone failed because multiple Windows Phone devices were detected. You should only connect one phone). Keep opening this ticket, we might be able to support the situation under multiple Windows 10 Mobile devices are connected.

JSON Source