error MT1007: Failed to launch the application

Rutul Mehta 0 Reputation points
2024-01-12T16:23:27.3033333+00:00

I am working in Xamarin.forms application. I have been getting this error message.

Severity	Code	Description	Project	File	Line	Suppression State
Error		error MT1007: Failed to launch the application '/Users/rutulmehta/Library/Caches/Xamarin/mtbs/builds/ProjectName.iOS/6d16ae8323a0f05f7d2366b3aa2022316cef58cbfb3a73712f12612b4f4b7c13/bin/iPhone/Debug/device-builds/ipad14.1-17.2/ProjectName.iOS.app' on the device 'AI???s iPad': Failed to launch the application 'com.companyname.ProjectName' on the device 'AI???s iPad': Invalid Service Error (error: 0xe8000022)		 	0	

Whenever I launch the application in debug mode, It deploys on the device, but after this, I get this error and the debugger stops working.

I tried several things but nothing works.

  • Update the Visual Studio for Windows.
  • When I tried to connect the Windows to the MAC, the system asked me to update the Mono and Xamarin.IOS-compatible versions. I updated the versions.
  • Update the MacOS to the latest version.
  • Update iPad OS.
  • Check whether MAC has the latest version of the XCode or not. (It is up to date).
  • Restart MAC, iPad device, and Windows machine. Reconnect the Windows.
  • Delete the 'bin' and 'obj' folder from all the projects clean, and build the project again.

Version Information:

MAC Machine

=== Visual Studio Community 2019 for Mac ===

Version 8.10.25 (build 2)
Installation UUID: 55df7b88-d6e0-4c31-8ed2-2b6a9006e717
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 6.18.0.23 (d16-6 / 088c73638)

Package version: 612000188

=== Mono Framework MDK ===

Runtime:
Mono 6.12.0.182 (2020-02/6051b710727) (64-bit)
Package version: 612000188

=== Roslyn (Language Service) ===

3.10.0-4.21269.26+029847714208ebe49668667c60ea5b0a294e0fcb

=== NuGet ===

Version: 5.9.0.7134

=== .NET SDK (x64) ===

SDK: /usr/local/share/dotnet/x64/sdk/6.0.106/Sdks
SDK Versions:
6.0.106
5.0.408
3.1.420
MSBuild SDKs: /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/MSBuild/Current/bin/Sdks

=== .NET Core Runtime ===

Runtime: /usr/local/share/dotnet/x64/dotnet
Runtime Versions:
6.0.6
5.0.17
3.1.26

=== .NET Core 3.1 SDK ===

SDK: 3.1.420

=== .NET 5.0 SDK ===

SDK: 5.0.408

=== Xamarin.Profiler ===

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

=== Updater ===

Version: 11

=== Apple Developer Tools ===

Xcode 14.3 (21812)
Build 14E222b

=== Xamarin.Mac ===

Version: 8.10.0.5 (Visual Studio Community)
Hash: 96b3edb6d
Branch: d17-2
Build date: 2022-05-18 07:32:06-0400

=== Xamarin.iOS ===

Version: 16.4.0.23 (Visual Studio Community)
Hash: 9defd91b3
Branch: xcode14.3
Build date: 2023-10-23 16:15:00-0400

=== Xamarin Designer ===

Version: 16.11.0.60
Hash: 56f9b80b0
Branch: remotes/origin/d16-11
Build date: 2021-12-15 01:44:16 UTC

=== Xamarin.Android ===

Version: 12.2.8.3 (Visual Studio Community)
Commit: xamarin-android/d17-1/fafdba7
Android SDK: Not found

=== Eclipse Temurin JDK ===

Java SDK: Not Found

=== Android SDK Manager ===

Version: 16.10.0.13
Hash: 1b81df5
Branch: remotes/origin/d16-10
Build date: 2021-11-12 00:17:32 UTC

=== Android Device Manager ===

Version: 16.10.0.15
Hash: 89dcc0b
Branch: remotes/origin/d16-10
Build date: 2021-11-12 00:17:52 UTC

=== Build Information ===

Release ID: 810250002
Git revision: 0620af530b5800e0eada4882ce1c3d4dad7e53d3
Build date: 2022-06-15 13:41:26-04
Build branch: release-8.10

=== Operating System ===

Mac OS X 14.2.1
Darwin 23.2.0 Darwin Kernel Version 23.2.0
    Wed Nov 15 21:53:34 PST 2023
    root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 x86_64

Windows Machine

Microsoft Visual Studio Enterprise 2022
Version 17.8.4
VisualStudio.17.Release/17.8.4+34408.163
Microsoft .NET Framework
Version 4.8.09037

Installed Version: Enterprise

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

ASA Service Provider   1.0

ASP.NET and Web Tools   17.8.358.6298
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.8.358.6298
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio   2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   17.8.358.6298
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus   1.4.39 (main@e8108eb)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft Azure Hive Query Language Service   2.6.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service   2.6.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio   2.9
Support for Azure Cloud Services projects

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio   17.8.17 (957fbed)
Support for debugging Mono processes with Visual Studio.

Node.js Tools   1.5.50908.1 Commit Hash:c294679b821c4b8f7f9c6db3827b7655db80fc28
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   6.8.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core)   17.8.3.2358002+8c7fb27bf8e8d4f9ff8080b624b35bca5e812e97
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools   17.8.120.1
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   17.0.20920.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.8.0-beta.23475.2+10f956e631a1efc0f7f5e49c626c494cd32b1f50
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

VSPackage Extension   1.0
VSPackage Visual Studio Extension Detailed Info

Xamarin   17.8.0.157 (d17-8@8e82278)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   17.8.3.6 (remotes/origin/d17-8@eccf46a291)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   17.8.16 (830b56a)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   13.2.2.0 (d17-5/45b0e14)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: d9a6e87
    Java.Interop: xamarin/java.interop/d17-5@149d70fe
    SQLite: xamarin/sqlite/3.40.1@68c69d8
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-5@ca1552d


Xamarin.iOS and Xamarin.Mac SDK   16.4.0.23 (9defd91b3)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.


```I am not sure whether something is wrong with the version compatibility or provisioning profile. 
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,294 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,610 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rutul Mehta 0 Reputation points
    2024-01-16T21:30:02.0866667+00:00

    After updating the XCode, I am getting this Error error MT1045: Failed to execute ‘devicectl’. To Solve this error, I have followed these two articles.

    https://github.com/dotnet/maui/issues/18947
    https://stackoverflow.com/questions/74128227/error-he0046-failed-to-install-the-app-simctl-returned-exit-code-72

    Now everything works fine.