[TIMOB-23636] Failed watchOS pairing will silently fail appc run without error
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-07-29T14:05:17.000+0000 |
Affected Version/s | ioslib 0.12.0 |
Fix Version/s | ioslib 0.12.0, ioslib 0.13.0, Release 5.5.0 |
Components | iOS, Tooling |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Chris Barber |
Created | 2016-07-13T22:00:48.000+0000 |
Updated | 2018-08-06T17:49:31.000+0000 |
Description
Changing watch pairings within Xcode result in orphaned watchOS simulators which are still being reported as available by ioslib. When trying to build an app and run it on the simulator,
appc run
just silently fails, without reporting any error.
Steps to reproduce
1. *appc new --classic* 2. Enter project root 3. *appc new -t applewatch* 4. Open Xcode and change the watch pairing for an iOS device under Window > Devices (e.g. remove the existing watch and add a new one) 5. *appc run -p ios -I 10.0 --launch-watch-app -l trace*Expected result
App launches successfully with both iOS and watch simulatorsActual result
appc run exits without any error and no simulators are being launched
~/Development/appc/pairing-test ❱❱❱ appc run -p ios -I 10.0 --launch-watch-app -l trace
...
[INFO] Finished building the application in 1m 3s 751ms
[INFO] Launching iOS Simulator
[TRACE] [ioslib] Found watchOS 3.0 app: com.appcelerator.pairing-test.watchkitapp
[TRACE] [ioslib] Selected iOS Simulator: iPhone SE
[TRACE] [ioslib] UDID = AD4CB766-B439-4E20-B441-8EA281CC3658
[TRACE] [ioslib] iOS = 10.0
[TRACE] [ioslib] Selected WatchOS Simulator: Apple Watch - 42mm
[TRACE] [ioslib] UDID = B3649832-4484-4A43-8468-BC7D8931F4D0
[TRACE] [ioslib] WatchOS = 3.0
[TRACE] [ioslib] Autoselected Xcode: 8.0
[TRACE] [ioslib] Removing old log file: /Users/jvennemann/Library/Developer/CoreSimulator/Devices/AD4CB766-B439-4E20-B441-8EA281CC3658/data/Containers/Data/Application/539F97C1-5E55-410E-A070-0AA2F1BC7913/Documents/bc3ea531-50b4-4fa1-9555-691fdc9b8133.log
[TRACE] [ioslib] Unpairing iOS and watchOS simulator pair: B8AAE696-D6C8-43E8-AD2E-C9F703406C49
[TRACE] [ioslib] Running: /Applications/Xcode-beta.app/Contents/Developer/usr/bin/simctl unpair B8AAE696-D6C8-43E8-AD2E-C9F703406C49
[TRACE] [ioslib] Pairing iOS and watchOS simulator pair: B3649832-4484-4A43-8468-BC7D8931F4D0 -> AD4CB766-B439-4E20-B441-8EA281CC3658
[TRACE] [ioslib] Running: /Applications/Xcode-beta.app/Contents/Developer/usr/bin/simctl pair B3649832-4484-4A43-8468-BC7D8931F4D0 AD4CB766-B439-4E20-B441-8EA281CC3658
~/Development/appc/pairing-test ❱❱❱
Attachments
File | Date | Size |
---|---|---|
appc-info.txt | 2016-07-13T21:50:11.000+0000 | 7837 |
simctl-list.txt | 2016-07-13T21:50:05.000+0000 | 5096 |
PR: https://github.com/appcelerator/ioslib/pull/38
Looks good, it now won't quit silently anymore. It still initially selects a non existing watchOS sim, though. I found out that calling
simctl delete
will not remove the sim directory for watchOS sims, BUT indeed will do so for iOS sims. I know you said the simctl tool is hardly worked on, but nevertheless i filed a bug report with Apple. Let's see what happens there :)Unable to validate this ticket until TIMOB-23614 is resolved.
Followed the test steps and encountered the following on build:
The question is whether this is an expected result when you delete an existing watch pairing and create a new one, or should it build successfully? Tested On: iPhone 6S (10.0) Simulator Mac OSX El Capitan 10.11.6 Ti SDK: 5.5.0.v20160822000355 Appc Studio: 4.7.1.201608190732 Appc NPM: 4.2.7 App CLI: 5.5.0-5 Version 8.0 beta 6 (8S201h) Node v4.4.7
Hmm, this doesn't sound right. It says it found the Watch sim
2CD3C9CD-3780-4221-A24A-71F9C2FF2AD3
, but then the pair failed? The output shows the unpair and pair commands. You should manually unpair and re-pair to see if you can reproduce the problem outside of Titanium.If i remember correctly this was because of the way ioslib initially detects all available simulators. It manually scans
~/Library/Developer/CoreSimulator/Devices
for device folders. When you delete a watch sim with Xcode orsimctl
the corresponding device folder will not get deleted and ioslib still detects the simulator. Runningappc info
vsxcrun simctl list
should show the differences.Yeah, that's a good point. I created TIMOB-23821 to switch to
simctl
.Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.