Bug 44153 - WatchApp no longer launches on Watch os 3
Summary: WatchApp no longer launches on Watch os 3
Status: RESOLVED ANSWERED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 10.0 (iOS10)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-09-09 18:36 UTC by ulrike_axen
Modified: 2016-09-15 15:31 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Verbose applications output (7.87 KB, text/plain)
2016-09-12 14:56 UTC, ulrike_axen
Details
Debug launch (9.34 KB, text/plain)
2016-09-12 16:24 UTC, ulrike_axen
Details
Contains a few "could not launch" messages (12.27 KB, text/plain)
2016-09-12 17:32 UTC, ulrike_axen
Details
Watch app doesn't install (72.42 KB, text/plain)
2016-09-13 15:31 UTC, ulrike_axen
Details
Build output for Watch app Doesn't install (148.74 KB, text/plain)
2016-09-13 15:32 UTC, ulrike_axen
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description ulrike_axen 2016-09-09 18:36:44 UTC
I have been developing a Watch App for WatchOS2 (not yet anything 3 specific). It had been deploying and launching fine on Watch with OS3 beta, but now it will not launch at all! Neither my real app, or my small test app will launch.

For a test app, use the one I submitted for bug 43178.



=== Xamarin Studio Enterprise ===

Version 6.1 (build 5436)
Installation UUID: 0ca42116-8f54-4ad6-bd25-aa90f20c571f
Runtime:
	Mono 4.6.0 (mono-4.6.0-branch/dea2155) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406000243

=== NuGet ===

Version: 3.4.3.0

=== Xamarin.Profiler ===

Version: 0.20.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 7.0.0.15 (Xamarin Enterprise)
Android SDK: /Users/axenu/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 25.1.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.3

Java SDK: /usr
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Not Installed

=== Apple Developer Tools ===

Xcode 8.0 (11228.2)
Build 8S193k

=== Xamarin.iOS ===

Version: 10.0.0.4 (Xamarin Enterprise)
Hash: d1ee3ba
Branch: xcode8
Build date: 2016-09-08 02:32:05-0400

=== Xamarin.Mac ===

Version: 2.10.0.99 (Xamarin Enterprise)

=== Build Information ===

Release ID: 601005436
Git revision: bc95b7878139d0971a3c55b5b9c4d604d9c6c6ec
Build date: 2016-09-07 16:44:19-04
Xamarin addins: bfc56f206c39fbf5929651ec42c98ab6aa5e8150
Build lane: monodevelop-lion-cycle8

=== Operating System ===

Mac OS X 10.11.6
Darwin ulrikes-mbp-2.ms.starkey.com 15.6.0 Darwin Kernel Version 15.6.0
    Mon Aug 29 20:21:34 PDT 2016
    root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64
Comment 1 ulrike_axen 2016-09-09 18:48:11 UTC
I think it's a problem with Xamarin.iOS. I was able to launch this test app just fine on the watch, until I rebuilt with the latest Xamarin....
Comment 2 Rolf Bjarne Kvinge [MSFT] 2016-09-12 05:10:52 UTC
Does the app show up on the phone+watch when you try to run?

Also can you execute this from a terminal:

    echo 123456789 > ~/.mlaunch-verbosity

try again, and attach everything printed in the Application Output.

When done, you can lower the verbosity by just removing the file:

    rm ~/.mlaunch-verbosity
Comment 3 ulrike_axen 2016-09-12 14:47:16 UTC
@Rolf:

When I try to run, the app is installed on the phone, but does not deploy to the watch. I have to go to the Watch app on the phone and install the watch app. This behavior seems to change version to version of Xamarin. Previously, the Watchapp was deploying to the watch successfully when I run from Xamarin Studio (especially for a release build).

I'll attach the Application Output.

Here is everything I've tried:
I have tried to go back to Xcode 7.3, and I have also tried various previous versions of Xamarin.iOS with Xcode 8 beta 5:


8/31/2016:
http://download.xamarin.com/MonoTouch/Mac/xamarin.ios-9.99.5.54.pkg
8/24/2016:
http://download.xamarin.com/MonoTouch/Mac/xamarin.ios-9.99.4.23.pkg
8/17/2016:
http://download.xamarin.com/MonoTouch/Mac/xamarin.ios-9.99.3.8.pkg

In all cases the behavior is exactly the same. I am running the latest iOS10 GM and Watch OS 3. Is it a deployment issue from the latest iOS 10 GM? The little test app I have was installed on the watch prior to the OS updates, and it only stopped launching after I deleted it and tried to re-build/install after the updates. Similarly, our main app and watch app were building and deploying/launching fine until late last week. The Apple updates to the OS were released, and at the same time there was a new release from Xamarin (I think... I switch back and forth between stable and alpha a lot). At that point, I could not launch the watch app.

I'm completely at a loss here -- I assumed that going back to a previous version of Xamarin.ios would solve the problem, but it doesn't
Comment 4 ulrike_axen 2016-09-12 14:51:21 UTC
Also, console output from xCode shows that the watch app never gets into FinishLaunching (or Awake). It's not crashing in my code... it never gets to my code. Can you please try with the test app I reference (for bug 43178) and let me know if it launches using a phone with ios10GM and watch os3?

Thanks!
Comment 5 ulrike_axen 2016-09-12 14:56:07 UTC
Created attachment 17415 [details]
Verbose applications output
Comment 6 ulrike_axen 2016-09-12 15:13:45 UTC
Let me see if the latest Xcode fixes the problem (GM). It looks like my Xcode beta didn't finish downloading last week, so I'm still on beta 5.
Comment 7 Rolf Bjarne Kvinge [MSFT] 2016-09-12 15:54:54 UTC
Yeah, you certainly need the latest Xcode for things to work.
Comment 8 ulrike_axen 2016-09-12 16:14:00 UTC
OK, I made sure that GM installed this time, but to no avail. Same issue -- watch app won't launch.

=== Xamarin Studio Enterprise ===

Version 6.1 (build 5436)
Installation UUID: 0ca42116-8f54-4ad6-bd25-aa90f20c571f
Runtime:
	Mono 4.6.0 (mono-4.6.0-branch/dea2155) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406000243

=== NuGet ===

Version: 3.4.3.0

=== Xamarin.Profiler ===

Version: 0.20.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 7.0.0.15 (Xamarin Enterprise)
Android SDK: /Users/axenu/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 25.1.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.3

Java SDK: /usr
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Not Installed

=== Apple Developer Tools ===

Xcode 8.0 (11246)
Build 8A218a

=== Xamarin.iOS ===

Version: 10.0.0.4 (Xamarin Enterprise)
Hash: d1ee3ba
Branch: xcode8
Build date: 2016-09-08 02:32:05-0400

=== Xamarin.Mac ===

Version: 2.10.0.99 (Xamarin Enterprise)

=== Build Information ===

Release ID: 601005436
Git revision: bc95b7878139d0971a3c55b5b9c4d604d9c6c6ec
Build date: 2016-09-07 16:44:19-04
Xamarin addins: bfc56f206c39fbf5929651ec42c98ab6aa5e8150
Build lane: monodevelop-lion-cycle8

=== Operating System ===

Mac OS X 10.11.6
Darwin ulrikes-mbp-2.ms.starkey.com 15.6.0 Darwin Kernel Version 15.6.0
    Mon Aug 29 20:21:34 PDT 2016
    root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64
Comment 9 ulrike_axen 2016-09-12 16:14:43 UTC
Could a tester on your end please try my sample app and tell me if the watch app launches? I'm at a loss as to what to try next.
Comment 10 ulrike_axen 2016-09-12 16:24:52 UTC
Created attachment 17419 [details]
Debug launch
Comment 11 ulrike_axen 2016-09-12 16:28:09 UTC
Created a verbose output of an attempt to launch the watch app directly from Xamarin Studio (debug mode), but that had no more success than my other attempts (which were debug or release to the phone, and then installing the watch app from there).

Another thing I tried: I got a tester's phone (9.3.5) and watch (2.2), and tried building/deploying running. Interesting: the watch app doesn't install, and the Watch app on the phone doesn't show it as an option. In other words, I don't even see the watch app on there. My targets are 9.3 and 2.2, so there is no reason it shouldn't work.
Comment 12 ulrike_axen 2016-09-12 17:31:21 UTC
Application output when trying to debug on Watch:

Message: < DTXMessage 0x7fd3c766d0c0 : i0.0 c0 dispatch:[launchWatchAppForCompanionIdentifier:"com.starkey.xfwatch" options:< NSDictionary 0x7fd3c766d910 | 0 key/value pairs>] >
2016-09-12 12:21:53.143 mlaunch[87145:2385297] Xamarin.Hosting: Got launch answer: < DTXMessage 0x7fd3c72ac0b0 : i3.1 c1 >
2016-09-12 12:22:08.159 mlaunch[87145:2385297] Xamarin.Hosting: Could not launch: timed out (attempt #1/10) after 15 s. Trying again.
2016-09-12 12:22:08.159 mlaunch[87145:2385297] Xamarin.Hosting: Requesting launch on 'Ulrikes 6s' for 'com.starkey.xfwatch':
	Options: {
	}
	Message: < DTXMessage 0x7fd3c766d0c0 : i0.0 c0 dispatch:[launchWatchAppForCompanionIdentifier:"com.starkey.xfwatch" options:< NSDictionary 0x7fd3c4da8b20 | 0 key/value pairs>] >
2016-09-12 12:22:16.259 mlaunch[87145:2385297] Xamarin.Hosting: Got launch answer: < DTXMessage 0x7fd3c766a3d0 : i4.1 c1 >
2016-09-12 12:22:31.264 mlaunch[87145:2385297] Xamarin.Hosting: Could not launch: timed out (attempt #2/10) after 15 s. Trying again.
2016-09-12 12:22:31.264 mlaunch[87145:2385297] Xamarin.Hosting: Requesting launch on 'Ulrikes 6s' for 'com.starkey.xfwatch':
	Options: {
	}
	Message: < DTXMessage 0x7fd3c766d0c0 : i0.0 c0 dispatch:[launchWatchAppForCompanionIdentifier:"com.starkey.xfwatch" options:< NSDictionary 0x7fd3c72925c0 | 0 key/value pairs>] >
2016-09-12 12:22:33.689 mlaunch[87145:2385297] Xamarin.Hosting: Got launch answer: < DTXMessage 0x7fd3c7253060 : i5.1 c1 >
2016-09-12 12:22:48.696 mlaunch[87145:2385297] Xamarin.Hosting: Could not launch: timed out (attempt #3/10) after 15 s. Trying again.
2016-09-12 12:22:48.696 mlaunch[87145:2385297] Xamarin.Hosting: Requesting launch on 'Ulrikes 6s' for 'com.starkey.xfwatch':
	Options: {
	}
	Message: < DTXMessage 0x7fd3c766d0c0 : i0.0 c0 dispatch:[launchWatchAppForCompanionIdentifier:"com.starkey.xfwatch" options:< NSDictionary 0x7fd3c72ad790 | 0 key/value pairs>] >
2016-09-12 12:22:55.919 mlaunch[87145:2385297] Xamarin.Hosting: Got launch answer: < DTXMessage 0x7fd3c7663ae0 : i6.1 c1 >
2016-09-12 12:23:10.922 mlaunch[87145:2385297] Xamarin.Hosting: Could not launch: timed out (attempt #4/10) after 15 s. Trying again.
2016-09-12 12:23:10.922 mlaunch[87145:2385297] Xamarin.Hosting: Requesting launch on 'Ulrikes 6s' for 'com.starkey.xfwatch':
	Options: {
	}
	Message: < DTXMessage 0x7fd3c766d0c0 : i0.0 c0 dispatch:[launchWatchAppForCompanionIdentifier:"com.starkey.xfwatch" options:< NSDictionary 0x7fd3c72acc90 | 0 key/value pairs>] >
2016-09-12 12:23:13.281 mlaunch[87145:2385297] Xamarin.Hosting: Got launch answer: < DTXMessage 0x7fd3c766d000 : i7.1 c1 >
2016-09-12 12:23:28.287 mlaunch[87145:2385297] Xamarin.Hosting: Could not launch: timed out (attempt #5/10) after 15 s. Trying again.
2016-09-12 12:23:28.288 mlaunch[87145:2385297] Xamarin.Hosting: Requesting launch on 'Ulrikes 6s' for 'com.starkey.xfwatch':
	Options: {
	}
Comment 13 ulrike_axen 2016-09-12 17:32:54 UTC
Created attachment 17421 [details]
Contains a few "could not launch" messages
Comment 14 Rolf Bjarne Kvinge [MSFT] 2016-09-12 17:35:43 UTC
(In reply to ulrike_axen from comment #9)
> Could a tester on your end please try my sample app and tell me if the watch
> app launches?

Launching on watchOS 3 works fine for me.

> I'm at a loss as to what to try next.

Can you try rebooting everything (watch, phone and mac)?

> Another thing I tried: I got a tester's phone (9.3.5) and watch (2.2), and
> tried building/deploying running. Interesting: the watch app doesn't
> install, and the Watch app on the phone doesn't show it as an option. In
> other words, I don't even see the watch app on there. My targets are 9.3 and
> 2.2, so there is no reason it shouldn't work.

Can you get the output in the deploy pad in Xamarin Studio (with a verbose mlaunch from comment #2)?
Comment 15 ulrike_axen 2016-09-12 18:10:29 UTC
Reboot everything worked (!!). I still had to manually install the watch app (it didn't install automatically from a Xamarin release build & deploy), but once I did, the test app launched as expected.

Looks like this bug is a non-bug, unless the deployment from Xamarin should be working. I can get you the verbose deploy info if needed. Thanks!
Comment 16 Rolf Bjarne Kvinge [MSFT] 2016-09-13 05:15:01 UTC
(In reply to ulrike_axen from comment #15)
> Reboot everything worked (!!).

Great :)

> I still had to manually install the watch app
> (it didn't install automatically from a Xamarin release build & deploy), but
> once I did, the test app launched as expected.

This should also work though.

> 
> Looks like this bug is a non-bug, unless the deployment from Xamarin should
> be working. I can get you the verbose deploy info if needed. Thanks!

Please get the verbose deploy log so I can try and figure out what went wrong.
Comment 17 ulrike_axen 2016-09-13 15:31:49 UTC
Created attachment 17440 [details]
Watch app doesn't install

Trying to deploy from Xamarin Studio ("release"), the phone app deploys but not the watch app. I have to manually install watch app.
Comment 18 ulrike_axen 2016-09-13 15:32:43 UTC
Created attachment 17441 [details]
Build output for Watch app Doesn't install
Comment 19 Rolf Bjarne Kvinge [MSFT] 2016-09-14 07:57:19 UTC
Did you try to run the (main) iOS project or the watch app project?

Running the iOS project will only deploy to the phone, not the watch (because deploying to the watch is _very_ slow, and it would slow down deployment when all you're trying to do is run on the phone).

If you want to deploy to the watch, try running the watch app project instead.
Comment 20 ulrike_axen 2016-09-14 12:43:26 UTC
@Rolf,

OK, yes, that is true. But I think in the past when I deployed a Release build on the phone, it also deployed to the watch. Thanks for the info, though. I'll deploy directly to the watch then.
Comment 21 Rolf Bjarne Kvinge [MSFT] 2016-09-14 12:55:32 UTC
OK, I'm closing this then.

And yes, in the past we used to deploy to the watch too when deploying to the phone, but we changed it since it's too slow (just adding a watch project to your solution would make your project take minutes to deploy to the phone instead of seconds).
Comment 22 ulrike_axen 2016-09-14 19:45:41 UTC
@Rolf -- Just deployed from XS to the watch (debug build). It did the same thing (never finished launching). I uninstalled the app from the watch and phone, deployed to the phone and then to the watch via the phone, and the watch app launched, just FYI.
Comment 23 Rolf Bjarne Kvinge [MSFT] 2016-09-15 14:49:14 UTC
(In reply to ulrike_axen from comment #22)
> @Rolf -- Just deployed from XS to the watch (debug build). It did the same
> thing (never finished launching).

Did it end up installed on the watch?
Comment 24 ulrike_axen 2016-09-15 15:12:57 UTC
Sorry for the confusion. Yes, it did end up installed on the watch. By "same thing" I meant, it never launched.
Comment 25 Rolf Bjarne Kvinge [MSFT] 2016-09-15 15:31:03 UTC
Yeah, launching sometimes works, sometimes doesn't. It's known to happen and we're trying to figure out what's causing it. If it's consistent, rebooting the watch usually helps.