Skip to content

Commit

Permalink
[d16-2] [xharness] Don't use a dash in the bundle identifer for watch…
Browse files Browse the repository at this point in the history
…OS projects. (#6118)

* [xharness] Don't use a dash in the bundle identifer for watchOS projects.

It causes problems with the mscorlib test project, which can't be launched properly.

I'm not sure what's the underlying cause, but here are some of the symptoms:

* The watch app actually shows up fine on the device, but:
* mlaunch isn't notified about the new process, so it thinks the app didn't
  launch.
* The new process doesn't receive any environment variables we try to give it,
  which for instance means that it won't auto-start the tests upon launch.
* If we ask mlaunch to attach with lldb, mlaunch will ask watchOS to launch
  the process in a suspended state while lldb attaches. Yet the watch app
  shows up on the device as if not asked to be suspended upon launch.

It seems that the dash (I assume, because I haven't investigated this very
deeply, I just happened to find a solution that worked) makes watchOS launch
the app as if tapped, instead of launched from an IDE.

The strangest part is that this only happens with the mscorlib test project,
not any of the other test projects we run on the watch, and they all have
dashes in their bundle identifiers... yet replacing the dash with another
character (underscore, letter, removing it altogether) all made things work as
expected.

* [monotouch-test] Adjust expected value for watchOS bundle id.

The watchOS bundle ID changed in fc5067e, and
the test failure wasn't caught properly.
  • Loading branch information
monojenkins authored and rolfbjarne committed May 24, 2019
1 parent 4aaa185 commit aab104d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/monotouch-test/CoreFoundation/BundleTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void TestGetMain ()
{
var main = CFBundle.GetMain ();
#if __WATCHOS__
var expectedBundleId = "com.xamarin.monotouch-test-watch.watchkitapp.watchkitextension";
var expectedBundleId = "com.xamarin.monotouch-test_watch.watchkitapp.watchkitextension";
#elif MONOMAC
var expectedBundleId = "com.xamarin.xammac_tests";
#else
Expand Down
2 changes: 1 addition & 1 deletion tests/xharness/WatchOSTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void CreateWatchOSExtensionProject ()
XmlDocument info_plist = new XmlDocument ();
var target_info_plist = Path.Combine (TargetDirectory, $"Info{Suffix}-extension.plist");
info_plist.LoadWithoutNetworkAccess (Path.Combine (TargetDirectory, "Info.plist"));
BundleIdentifier = info_plist.GetCFBundleIdentifier () + "-watch";
BundleIdentifier = info_plist.GetCFBundleIdentifier () + "_watch";
if (BundleIdentifier.Length >= 58)
BundleIdentifier = BundleIdentifier.Substring (0, 57); // If the main app's bundle id is 58 characters (or sometimes more), then the watch extension crashes at launch. radar #29847128.
info_plist.SetCFBundleIdentifier (BundleIdentifier + ".watchkitapp.watchkitextension");
Expand Down

5 comments on commit aab104d

@xamarin-release-manager
Copy link
Collaborator

@xamarin-release-manager xamarin-release-manager commented on aab104d May 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build was (probably) aborted

🔥 Jenkins job (on internal Jenkins) failed in stage(s) 'Running XM tests on '10.10', Running XM tests on '10.10'' 🔥

Build succeeded
✅ Packages: xamarin.ios-12.14.0.85.pkg xamarin.mac-5.14.0.85.pkg
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (no change)
🔥 Xamarin.Mac tests on 10.10 failed: Xamarin.Mac tests on macOS 10.10 failed (xammac_tests) 🔥
🔥 Test run failed 🔥

Test results

4 tests failed, 0 tests' device not found, 238 tests passed.

Failed tests

  • link all/Mac/Debug: Failed (Test run failed.)
  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed
  • monotouch-test/watchOS 32-bits - simulator/Debug (all optimizations): Crashed
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 2.0): Crashed

Failure analysis

Final verdict: 🤥

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Device tests passed on TvOS on Azure DevOps(TvOS): Html Report

Test results

37 tests' device not found, 193 tests passed.

@xamarin-release-manager
Copy link
Collaborator

@xamarin-release-manager xamarin-release-manager commented on aab104d May 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Device tests completed (Failed) on iOS on Azure DevOps(iOS): Html Report 🔥

Test results

33 tests failed, 37 tests' device not found, 160 tests passed.

Failed tests

  • dont link/iOS Unified 64-bits - device/Debug: Failed (Install failed, exit code: 137.)
  • link sdk/iOS Unified 64-bits - device/Debug: Failed (Install failed, exit code: 137.)
  • mono-native-unified/iOS Unified 64-bits - device/Debug: Failed (Install failed, exit code: 137.)
  • monotouch-test/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • monotouch-test/iOS Unified 64-bits - device/Debug (all optimizations): Failed (Install failed, exit code: 137.)
  • framework-test/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • fsharp/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • mscorlib/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Failed (Install failed, exit code: 137.)
  • mscorlib/iOS Unified 64-bits - device/Release: TimedOut (HE0041: Error while processing device notifications from fff50:32:37:a1:c8:31fff (0x7fc536c85170): Failed to communicate with the device. Please ensure the cable is properly connected, and try rebooting the device (error: 0xe8000065 kAMDMuxConnectError))
  • System.Data/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Failed (Install failed, exit code: 137.)
  • System.Net.Http/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)
  • System.Web.Services/iOS Unified 64-bits - device/Release: TimedOut (HE0041: Error while processing device notifications from fff50:32:37:a1:c8:31fff (0x7f92685e3570): Failed to communicate with the device. Please ensure the cable is properly connected, and try rebooting the device (error: 0xe8000065 kAMDMuxConnectError))
  • System.Xml/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • System.Xml/iOS Unified 64-bits - device/Release: Failed (Install failed, exit code: 137.)
  • System.IO.Compression/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • System.IO.Compression.FileSystem/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Failed (Install failed, exit code: 137.)
  • System.ServiceModel/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): TimedOut
  • System.IdentityModel/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • System.IdentityModel/iOS Unified 64-bits - device/Release: Failed (Install failed, exit code: 137.)
  • dont link/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): TimedOut (HE0041: Error while processing device notifications from fff50:32:37:a1:c8:31fff (0x7faa570153a0): Failed to communicate with the device. Please ensure the cable is properly connected, and try rebooting the device (error: 0xe8000065 kAMDMuxConnectError))
  • dont link/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Failed (Install failed, exit code: 137.)
  • dont link/iOS Unified 64-bits - device/Release: TimedOut (HE0041: Error while processing device notifications from fff50:32:37:a1:c8:31fff (0x7fd513d37b30): Failed to communicate with the device. Please ensure the cable is properly connected, and try rebooting the device (error: 0xe8000065 kAMDMuxConnectError))
  • link all/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): TimedOut (HE0041: Error while processing device notifications from fff50:32:37:a1:c8:31fff (0x7fac517a1280): Failed to communicate with the device. Please ensure the cable is properly connected, and try rebooting the device (error: 0xe8000065 kAMDMuxConnectError))
  • link all/iOS Unified 64-bits - device/Release: TimedOut
  • link sdk/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): TimedOut
  • link sdk/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Failed (Install failed, exit code: 137.)
  • mono-native-compat/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug, profiling): Failed (Install failed, exit code: 137.)
  • [NUnit] Mono BCL tests group 1/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): Failed (Install failed, exit code: 137.)
  • [NUnit] Mono BCL tests group 2/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (debug): TimedOut (HE0041: Error while processing device notifications from fff50:32:37:a1:c8:31fff (0x7fa4ed46b740): Failed to communicate with the device. Please ensure the cable is properly connected, and try rebooting the device (error: 0xe8000065 kAMDMuxConnectError))
  • [xUnit] Mono BCL tests group 4/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono BCL tests group 5/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono BCL tests group 5/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)
  • [xUnit] Mono BCL tests group 6/iOS Unified 64-bits - device/AssemblyBuildTarget: dylib (debug, profiling): Failed (Install failed, exit code: 137.)

Failure analysis

All the test failures are due to not being able to connect to the iOS devices. I've requested a reboot+reconnect of all the devices connected to this bot. There were no other failures, and the corresponding tvOS tests all passed, so 🤥.

Final verdict: 🤥

@xamarin-release-manager
Copy link
Collaborator

@xamarin-release-manager xamarin-release-manager commented on aab104d May 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Status for 'xamarin-macios - sample testing (build)': failure.

  • ✅ Debug|iPhone|A-F: Succeeded
  • ✅ Debug|iPhone|G-R: Succeeded
  • ✅ Debug|iPhone|S-Z: Succeeded
  • ✅ Debug|iPhoneSimulator: Succeeded
  • ✅ Release|iPhone|A-F: Succeeded
  • ❌ Release|iPhone|G-R: Failed
  • ✅ Release|iPhone|S-Z: Succeeded
  • ✅ Release|iPhoneSimulator: Succeeded
  • ✅ Debug|Mac: Succeeded
  • ✅ Release|Mac: Succeeded

Failure analysis

Final verdict: 🤥

@rolfbjarne
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting state to success for all statuses.

Only 🤥 (gred) issues found.

Please sign in to comment.