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

Error when trying to publish a Maui app with Xcode 15.3 #20387

Closed
mmiller-d8 opened this issue Mar 29, 2024 · 11 comments
Closed

Error when trying to publish a Maui app with Xcode 15.3 #20387

mmiller-d8 opened this issue Mar 29, 2024 · 11 comments
Labels
iOS Issues affecting Xamarin.iOS need-info Waiting for more information before the bug can be investigated support The issue is related to support

Comments

@mmiller-d8
Copy link

I am trying to build my app using Xcode 15.3. My understanding is that 15.3 isn't yet supported, but I can't tell if the error I'm getting is because of that or something else. I posted this in another open issue for 15.3, but it doesn't appear to have much in the way of current activity. That post had other errors, but not this one.

Here is the stack trace from the publish output. Or at least the first group. I can include the rest if needed. My assumption is that when the stack trace says, "No such file or directory," it's talking about the process, not my solution. It is definitely there and I am able to deploy to the simulator. I just can't do a release build.

Every line is prefixed with this first line. I figured I'd leave out the repetition.

`/usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.2.8043/targets/Xamarin.Shared.Sdk.targets(1214,3):

error MSB4018: The "AOTCompile" task failed unexpectedly. [/myproject.csproj::TargetFramework=net8.0-ios]
error MSB4018: System.AggregateException: One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) (One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory))) [myproject.csproj::TargetFramework=net8.0-ios]
---> System.AggregateException: One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory)) [MyProject.csproj::TargetFramework=net8.0-ios]
---> System.AggregateException: One or more errors occurred. (An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory) [MyProject.csproj::TargetFramework=net8.0-ios]
---> System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory [MyProject.csproj::TargetFramework=net8.0-ios]
at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec) [MyProject.csproj::TargetFramework=net8.0-ios]
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) [MyProject.csproj::TargetFramework=net8.0-ios]
at Xamarin.Utils.Execution.<>c__DisplayClass24_1.b__0() in /Users/builder/azdo/_work/1/s/xamarin-macios/tools/common/Execution.cs:line 103 [MyProject.csproj::TargetFramework=net8.0-ios]
--- End of stack trace from previous location`

Steps to Reproduce

  1. Do a release build (or publish) using the generic device.

Expected Behavior

The app builds

Actual Behavior

It crashes with the error above.

Environment

Version information
Visual Studio Community 2022 for Mac
Version 17.6.10 (build 428)
Installation UUID: 895b707d-a846-46e7-97e9-9bf92c025965

Runtime
.NET 7.0.3 (64-bit)
Architecture: Arm64
Microsoft.macOS.Sdk 13.1.1007; git-rev-head:8afca776a0a96613dfb7200e0917bb57f9ed5583; git-branch:release/7.0.1xx-xcode14.2

Roslyn (Language Service)
4.6.0-3.23180.6+99e956e42697a6dd886d1e12478ea2b27cceacfa

NuGet
Version: 6.4.0.117

Xamarin Designer
Version: 17.6.3.9
Hash: 2648399ae8
Branch: remotes/origin/d17-6
Build date: 2024-03-07 20:35:36 UTC

.NET SDK (Arm64)
SDK: /usr/local/share/dotnet/sdk/8.0.101/Sdks
SDK Versions:
	8.0.101
	8.0.100
	7.0.314
	7.0.313
	7.0.312
	7.0.311
	7.0.309
	7.0.307
	7.0.304
	7.0.302
	7.0.203
	7.0.202
	7.0.201
	7.0.200
	7.0.101
	6.0.420
	6.0.419
	6.0.418
	6.0.417
	6.0.415
	6.0.413
	6.0.410
	6.0.408
	6.0.407
	6.0.406
	6.0.404
	6.0.401
	6.0.400
	6.0.302
	6.0.301
	6.0.100
MSBuild SDKs: /Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/Sdks

.NET SDK (x64)
SDK Versions:
	3.1.426
	3.1.423
	3.1.422
	3.1.421
	3.1.420

.NET Runtime (Arm64)
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	8.0.1
	8.0.0
	7.0.17
	7.0.16
	7.0.15
	7.0.14
	7.0.12
	7.0.10
	7.0.7
	7.0.5
	7.0.4
	7.0.3
	7.0.1
	6.0.28
	6.0.27
	6.0.26
	6.0.25
	6.0.23
	6.0.21
	6.0.18
	6.0.16
	6.0.15
	6.0.14
	6.0.12
	6.0.9
	6.0.8
	6.0.7
	6.0.6
	6.0.0

.NET Runtime (x64)
Runtime: /usr/local/share/dotnet/x64/dotnet
Runtime Versions:
	3.1.32
	3.1.29
	3.1.28
	3.1.27
	3.1.26

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

Updater
Version: 11

Apple Developer Tools
Xcode: 15.3 22618
Build: 15E204a

Xamarin.Mac
Version: 9.3.0.23 Visual Studio Community
Hash: 9defd91b3
Branch: xcode14.3
Build date: 2023-10-23 16:14:59-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.Android
Version: 13.2.2.0 (Visual Studio Community)
Commit: xamarin-android/d17-5/45b0e14
Android SDK: /Users/mike/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		12.0 (API level 31)
		11.0 (API level 30)
		10.0 (API level 29)
		13.0 (API level 33)

SDK Command-line Tools Version: 7.0
SDK Platform Tools Version: 34.0.3
SDK Build Tools Version: 32.0.0

Build Information: 
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

Microsoft Build of OpenJDK
Java SDK: /Library/Java/JavaVirtualMachines/microsoft-11.jdk
11.0.22
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Eclipse Temurin JDK
Java SDK: /Library/Java/JavaVirtualMachines/temurin-8.jdk
1.8.0.302
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Android SDK Manager
Version: 17.6.0.50
Hash: a715dca
Branch: HEAD
Build date: 2024-03-07 20:35:42 UTC

Android Device Manager
Version: 0.0.0.1309
Hash: 06e3e77
Branch: HEAD
Build date: 2024-03-07 20:35:42 UTC

Build Information
Release ID: 1706100428
Git revision: a5d4aa3648baa4a3f6bff645886bd51ad16c07a7
Build date: 2024-03-07 20:33:40+00
Build branch: release-17.6
Build lane: release-17.6

Operating System
Mac OS X 14.2.1
Darwin 23.2.0 Darwin Kernel Version 23.2.0
    Wed Nov 15 21:54:05 PST 2023
    root:xnu-10002.61.3~2/RELEASE_ARM64_T6031 arm64

@dalexsoto dalexsoto added iOS Issues affecting Xamarin.iOS support The issue is related to support labels Apr 4, 2024
@dalexsoto dalexsoto added this to the Future milestone Apr 4, 2024
@dalexsoto
Copy link
Member

Hello, any chance you can provide us with a binlog?

@dalexsoto dalexsoto added the need-info Waiting for more information before the bug can be investigated label Apr 4, 2024
@mmiller-d8
Copy link
Author

I'll see if I can get that together. As an aside, I downgraded to 15.2 and I'm able to publish that way. I'll upgrade again and put that together, assuming it still fails with that error. @dalexsoto

@microsoft-github-policy-service microsoft-github-policy-service bot added need-attention An issue requires our attention/response and removed need-info Waiting for more information before the bug can be investigated labels Apr 4, 2024
@dalexsoto dalexsoto added need-info Waiting for more information before the bug can be investigated and removed need-attention An issue requires our attention/response labels Apr 5, 2024
@dalexsoto
Copy link
Member

Thanks!

@mmiller-d8
Copy link
Author

Um... I just upgraded to 15.3 and publishing worked. I rebooted and tried again. First time, I got an error without any messages. Tried again and it worked. Cleaned and rebuilt, and it worked.

Since I downgraded manually and then upgraded from the App Store, is it possible that the 15.2 libraries are still there and Visual Studio is using those?

@dalexsoto

@microsoft-github-policy-service microsoft-github-policy-service bot added need-attention An issue requires our attention/response and removed need-info Waiting for more information before the bug can be investigated labels Apr 10, 2024
@rolfbjarne
Copy link
Member

An error occurred trying to start process '/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.AOT.osx-arm64.Cross.ios-arm64/8.0.1/Sdk/../tools/mono-aot-cross' with working directory 'MySolutionDirectory'. No such file or directory

This doesn't sound related to Xcode 15.3 (or Xcode at all).

Did you update .NET or the workloads at any point?

@mmiller-d8
Copy link
Author

@rolfbjarne Not at the time. I do know that downgrading Xcode allowed me to build again. But, on that note, I'm trying to update .NET and the workloads as we speak. I made the foolish decision to update my Maui toolkit packages which use a different version of the compiler. I updated it, but now I'm getting lots of errors around the workload.

@rolfbjarne
Copy link
Member

@rolfbjarne Not at the time. I do know that downgrading Xcode allowed me to build again. But, on that note, I'm trying to update .NET and the workloads as we speak. I made the foolish decision to update my Maui toolkit packages which use a different version of the compiler. I updated it, but now I'm getting lots of errors around the workload.

OK, feel free to file an issue if you need help with those errors.

I'm going to close this, because it looks like it was something transitory on your machine, but feel free to reopen if you disagree or figure out what exactly happened, and then we'll have a second look.

@mmiller-d8
Copy link
Author

@rolfbjarne I don't see how to re-open it. I'm not a contributor.

At any rate, I'm not seeing this specific issue, but I still can't deploy to a phone when publishing via Xcode 15.3. There is still no support for 15.3. I had originally posted in #20257 but created the issue here because it wasn't getting a response over there.

15.3 has been out since late January and now 15.4 is out. Users on the other issue are reporting crashes on devices running iOS 17.4 in a similar fashion to what is happening on simulators running 17.4.

@rolfbjarne
Copy link
Member

At any rate, I'm not seeing this specific issue, but I still can't deploy to a phone when publishing via Xcode 15.3.

We're working on supporting Xcode 15.3, but in the meantime is there any reason you can't use Xcode 15.2?

15.3 has been out since late January and now 15.4 is out. Users on the other issue are reporting crashes on devices running iOS 17.4 in a similar fashion to what is happening on simulators running 17.4.

The problem with the 17.4 simulators has been fixed and released (#20257 (comment)).

@rolfbjarne rolfbjarne reopened this May 20, 2024
@rolfbjarne rolfbjarne added need-info Waiting for more information before the bug can be investigated and removed need-attention An issue requires our attention/response labels May 20, 2024
Copy link
Contributor

Hi @mmiller-d8. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

Copy link
Contributor

Hi @mmiller-d8. Due to inactivity, we will be closing this issue. Please feel free to re-open this issue if the issue persists. For enhanced visibility, if over 7 days have passed, please open a new issue and link this issue there. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issues affecting Xamarin.iOS need-info Waiting for more information before the bug can be investigated support The issue is related to support
Projects
None yet
Development

No branches or pull requests

3 participants