Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of all iOS devices produces an error #2081

Closed
akanass opened this issue Sep 26, 2016 · 9 comments · Fixed by #2082
Closed

List of all iOS devices produces an error #2081

akanass opened this issue Sep 26, 2016 · 9 comments · Fixed by #2082
Assignees
Labels
Milestone

Comments

@akanass
Copy link

akanass commented Sep 26, 2016

Hello,

  • Overview of the issue:

I want to list my iOS device to deploy application on it but I occur an error when I want to list it with:

$ tns device ios

CLI displays these messages:

Cannot read property 'id' of undefined
# device ios
┌─────────┬─────────────────────────────────────────────┐
│ Usage   │ Synopsis                                    │
│ General │ $ tns device ios [--timeout <Milliseconds>] │
└─────────┴─────────────────────────────────────────────┘

Lists all recognized connected iOS devices with serial number and index.

### Options

    * --timeout - Sets the time in milliseconds for the operation to search for connected devices before completing. If not set, the default value is 4000. 

Sending exception report (press Ctrl+C to stop).....

I've tried to display all devices with only:

$ tns device

CLI found my device but if no iOS simulator was started, this error occures:

Error: There are outstanding futures. Construction call stacks:
#1
    at IOSSimulatorDiscovery.startLookingForDevices (/usr/local/lib/node_modules/nativescript/lib/common/mobile/mobile-core/ios-simulator-discovery.js:20:37)
    at /usr/local/lib/node_modules/nativescript/lib/common/mobile/mobile-core/devices-service.js:130:50
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:565:10)
    at /usr/local/lib/node_modules/nativescript/lib/common/mobile/mobile-core/devices-service.js:206:56
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:565:10)
    at /usr/local/lib/node_modules/nativescript/lib/common/mobile/mobile-core/devices-service.js:331:52
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:565:10)
    at /usr/local/lib/node_modules/nativescript/lib/common/commands/device/list-devices.js:15:110
    at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:249:26)
    at FiberFuture.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:565:10)
    at /usr/local/lib/node_modules/nativescript/lib/common/services/commands-service.js:51:55
    at Function.Future.assertNoFutureLeftBehind (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:174:9)
    at /usr/local/lib/node_modules/nativescript/lib/nativescript-cli.js:25:12

If I launch an iOS simulator all is fine.

  • Telerik NativeScript version:

2.4.0-2016-09-21-6710

  • System configuration:

Mac OS X 10.11
iOS 10 and XCode 8

Thanks for your attention.

@akanass
Copy link
Author

akanass commented Sep 26, 2016

If I restart my Mac, all is fine.

I think that tns keeps in memory all devices and produces an error if it doesn't found an old element

@rosen-vladimirov
Copy link
Contributor

Hi @njl07 ,

Can you execute

tns device ios --log trace

and send us the output?

Thanks in advance for your help.

@akanass
Copy link
Author

akanass commented Sep 26, 2016

After rebooting my Mac, I can't reproduce this error and all it's working, sorry for the mistake.

@rosen-vladimirov
Copy link
Contributor

Hi @njl07

Thanks for reporting both of the issues. In fact we've found what's causing them. You can easily reproduce the issue by starting the simulator, closing it and immediately call tns device ios.
CLI is checking for a living process called launchd_sim which needs some more time to die. However when we try to get more data about the simulator, we receive the Cannot read property 'id' of undefined error.
We've prepared a fix for this issue and it will be included in the next official release.

Thanks again.

@akanass
Copy link
Author

akanass commented Sep 26, 2016

If I try to do livesync when this problem occurres, action crashes and I must to restart my Mac to can perform my application.

@rosen-vladimirov
Copy link
Contributor

@njl07
Can you execute
xcrun simctl list while the simulator is running and send us the output?

@akanass
Copy link
Author

akanass commented Sep 26, 2016

== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
iPhone 7 (com.apple.CoreSimulator.SimDeviceType.iPhone-7)
iPhone 7 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus)
iPhone SE (com.apple.CoreSimulator.SimDeviceType.iPhone-SE)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
iPad Air 2 (com.apple.CoreSimulator.SimDeviceType.iPad-Air-2)
iPad Pro (9.7-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-)
iPad Pro (12.9-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
Apple TV 1080p (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)
Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)
Apple Watch Series 2 - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm)
Apple Watch Series 2 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm)
== Runtimes ==
iOS 9.3 (9.3 - 13E233) (com.apple.CoreSimulator.SimRuntime.iOS-9-3)
iOS 10.0 (10.0 - 14A345) (com.apple.CoreSimulator.SimRuntime.iOS-10-0)
tvOS 10.0 (10.0 - 14T328) (com.apple.CoreSimulator.SimRuntime.tvOS-10-0)
watchOS 3.0 (3.0 - 14S326) (com.apple.CoreSimulator.SimRuntime.watchOS-3-0)
== Devices ==
-- iOS 9.3 --
    iPhone 4s (D6B3F97F-57FF-451F-A616-F5F7C010F69C) (Shutdown)
    iPhone 5 (82540D1C-F942-47C8-875F-E7DF372FD66C) (Shutdown)
    iPhone 5s (BE7E8941-B9BD-46B8-B47C-6C99CB39652B) (Shutdown)
    iPhone 6 (AE8741ED-DAB9-4449-AB06-1B0C74623108) (Shutdown)
    iPhone 6 Plus (2159F971-47DD-4050-9AB5-D85BF3F78973) (Shutdown)
    iPhone 6s (50539462-B4BB-46B0-A2B8-FE5AE7F78813) (Shutdown)
    iPhone 6s Plus (16BECF81-B697-427B-BCCD-44975D648673) (Shutdown)
    iPad 2 (681FC051-35FA-4979-B866-98E6F6D81EE7) (Shutdown)
    iPad Retina (AA8F7639-0817-484F-A253-27C88D3C2A4B) (Shutdown)
    iPad Air (BFEC8AA2-A8ED-442E-940B-EB886DE1DAAF) (Shutdown)
    iPad Air 2 (F3BB286A-0AED-44E7-AFC1-93522D58B9E5) (Shutdown)
    iPad Pro (B22711DB-95C7-4AAE-98D2-9CC4485A4C8B) (Shutdown)
-- iOS 10.0 --
    iPhone 5 (9F2FA5FF-D94F-4416-8B32-7DDDB763FF32) (Shutdown)
    iPhone 5s (84B427BA-F595-422F-8C40-6931701DBD0D) (Shutdown)
    iPhone 6 (BB739E9E-AC96-48C9-91D7-84F6342BBAF1) (Shutdown)
    iPhone 6 Plus (F2EDC0F6-D5D8-48D7-A09E-66F1DC046D3F) (Shutdown)
    iPhone 6s (03217A26-5824-44A8-82F2-D392B21CE431) (Booted)
    iPhone 6s Plus (092D951C-4A05-4DC5-AA30-5ACCCADD32D3) (Shutdown)
    iPhone 7 (38EC64EB-A2C7-479E-A86E-65EE5BF3C061) (Shutdown)
    iPhone 7 Plus (3B9B4AE1-A5C2-45C3-ACDA-2716D9727765) (Shutdown)
    iPhone SE (7B7E3354-0EFC-4E65-8F16-21B446171459) (Shutdown)
    iPad Retina (712B2195-26F5-4577-B5EC-EA6AEAC42B8F) (Shutdown)
    iPad Air (6D42C861-B1FE-4788-9334-BEDB85EC0683) (Shutdown)
    iPad Air 2 (17CD556C-0FD0-429A-9D90-E17E9048ABF3) (Shutdown)
    iPad Pro (9.7 inch) (9AAB884E-614E-4DEA-B61A-E348740D50CB) (Shutdown)
    iPad Pro (12.9 inch) (DC578A37-2BDF-4E93-A4C8-0E61EF92A310) (Shutdown)
-- tvOS 10.0 --
    Apple TV 1080p (A914AD80-BDBF-4655-93B8-EF0C01CBFDB0) (Shutdown)
-- watchOS 3.0 --
    Apple Watch - 38mm (128D0E5C-7FE9-455D-B8EC-130E5780DD6A) (Shutdown)
    Apple Watch - 42mm (DA909B88-786B-45A3-A8D3-D7C9E141AFB3) (Shutdown)
    Apple Watch Series 2 - 38mm (C5673275-C3DA-4B77-8F97-2284A5495E40) (Shutdown)
    Apple Watch Series 2 - 42mm (461A5EF8-A8A0-48D7-828D-B684E3DB5BD1) (Shutdown)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-9-2 --
    iPhone 4s (7752E94F-802B-4498-92D7-569451E591B6) (Shutdown) (unavailable, runtime profile not found)
    iPhone 5 (8A49DCAE-D722-4F85-A558-116BFDE2ACD3) (Shutdown) (unavailable, runtime profile not found)
    iPhone 5s (002FDEBB-E662-499F-800D-809BBE743265) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 (13AFED4E-E596-4601-83E8-E39591A8C4BF) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 Plus (9969C182-4252-44CE-B513-8892ABEB3CBC) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6s (AC0CCC6C-5188-44BB-8044-83A1B99FDEA6) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6s Plus (E9BDF313-B836-4368-8A2D-21D8C47E5CF3) (Shutdown) (unavailable, runtime profile not found)
    iPad 2 (720EEB10-8E77-43AB-8BBC-1BC44CAEAC67) (Shutdown) (unavailable, runtime profile not found)
    iPad Retina (9C9765CA-29E1-4913-85BB-775F96BC1B7C) (Shutdown) (unavailable, runtime profile not found)
    iPad Air (EA2F2AC2-4C1C-4D22-AF74-BD4595BB91DC) (Shutdown) (unavailable, runtime profile not found)
    iPad Air 2 (1F4655BB-5889-4523-93B9-67246F8E6558) (Shutdown) (unavailable, runtime profile not found)
    iPad Pro (71BEA52B-A501-4888-AA03-1F765065651B) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.tvOS-9-1 --
    Apple TV 1080p (C75CB932-885B-469B-851C-DE897D0DBD52) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.tvOS-9-2 --
    Apple TV 1080p (B0ABB291-38DF-4D68-831B-D71EB43309F5) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.watchOS-2-1 --
    Apple Watch - 38mm (1BB5A6E4-50E0-449F-A1FF-B9AF1B3DF916) (Shutdown) (unavailable, runtime profile not found)
    Apple Watch - 42mm (D00C68B5-E3B2-4588-865F-9A3AC01FD30F) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.watchOS-2-2 --
    Apple Watch - 38mm (9FCAEFF5-76B5-4BE4-BD34-1F44E18D4375) (Shutdown) (unavailable, runtime profile not found)
    Apple Watch - 42mm (23915903-E4B9-4F64-94AB-846FE54E9BA7) (Shutdown) (unavailable, runtime profile not found)
== Device Pairs ==
96A795DB-2725-438E-AD38-02EA352B016D (active, disconnected)
    Watch: Apple Watch Series 2 - 38mm (C5673275-C3DA-4B77-8F97-2284A5495E40) (Shutdown)
    Phone: iPhone 7 (38EC64EB-A2C7-479E-A86E-65EE5BF3C061) (Shutdown)
E3456C20-B260-4097-921F-AEAF42A8D02F (active, disconnected)
    Watch: Apple Watch Series 2 - 42mm (461A5EF8-A8A0-48D7-828D-B684E3DB5BD1) (Shutdown)
    Phone: iPhone 7 Plus (3B9B4AE1-A5C2-45C3-ACDA-2716D9727765) (Shutdown)
DA19D99D-E2BD-4425-8352-AEBFFA80095E (unavailable)
    Watch: Apple Watch - 38mm (1BB5A6E4-50E0-449F-A1FF-B9AF1B3DF916) (Shutdown)
    Phone: iPhone 6s (AC0CCC6C-5188-44BB-8044-83A1B99FDEA6) (Shutdown)
19CD54EC-8318-4993-B939-423F9D0847BF (unavailable)
    Watch: Apple Watch - 42mm (D00C68B5-E3B2-4588-865F-9A3AC01FD30F) (Shutdown)
    Phone: iPhone 6s Plus (E9BDF313-B836-4368-8A2D-21D8C47E5CF3) (Shutdown)
7F0C7C62-2647-47BB-85AA-739FDEFCE2DB (unavailable)
    Watch: Apple Watch - 38mm (9FCAEFF5-76B5-4BE4-BD34-1F44E18D4375) (Shutdown)
    Phone: iPhone 6s (50539462-B4BB-46B0-A2B8-FE5AE7F78813) (Shutdown)
FAA4F42E-D7F1-43F2-8C37-32108D2F6A33 (unavailable)
    Watch: Apple Watch - 42mm (23915903-E4B9-4F64-94AB-846FE54E9BA7) (Shutdown)
    Phone: iPhone 6s Plus (16BECF81-B697-427B-BCCD-44975D648673) (Shutdown)

@akanass
Copy link
Author

akanass commented Sep 26, 2016

When livesync can be performed, I've this error:

Unable to start service com.apple.mobile.installation_proxy. Result code is: 3892314239

To reproduce it, just connect a device like an iPhone, type:

$ tns device ios

Deconnect the iPhone and reconnect it, type:

$ tns livesync ios --device deviceID --watch

Error occures and I must restart my Mac to perform the application livesync

@TsvetanMilanov
Copy link
Contributor

@njl07 the issue with Cannot read property 'id' of undefined is fixed, the problem was with the process called launchd_sim (@rosen-vladimirov described it in one of the previous comments). As for the second issue with Unable to start service com.apple.mobile.installation_proxy. Result code is: 3892314239 check this issue #1398.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants