dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.25k stars 1.76k forks source link

Problem with publishing app to Apple App Store - Asset validation failed (90171) #8701

Closed RaspeR87 closed 2 years ago

RaspeR87 commented 2 years ago

Description

I have problem with uploading .NET MAUI Blazor App to Apple App Store. My IPA file is successfully created with that command like everytime before: dotnet publish -f:net6.0-ios -c:Release /p:ServerAddress=10.20.30.21 /p:ServerUser=ezslovenia /p:ServerPassword=xxxxxxxx /p:TcpPort=58181 /p:ArchiveOnBuild=true /p:_DotNetRootRemoteDirectory=/Users/ezslovenia/Library/Caches/Xamarin/XMA/SDKs/dotnet/ /p:EnableAssemblyILStripping=false

But when I wanted to publish that app into Apple App Store via Transporter app, I got this errors: image

Does anybody know if I am doing anything wrong? All this steps worked well everytime I tried in past months.

Steps to Reproduce

  1. Create new .NET MAUI Blazor App
  2. Publish that app via remote connected Mac with that command: dotnet publish -f:net6.0-ios -c:Release /p:ServerAddress=10.20.30.21 /p:ServerUser=ezslovenia /p:ServerPassword=xxxxxxxx /p:TcpPort=58181 /p:ArchiveOnBuild=true /p:_DotNetRootRemoteDirectory=/Users/ezslovenia/Library/Caches/Xamarin/XMA/SDKs/dotnet/ /p:EnableAssemblyILStripping=false
  3. Upload generated IPA file with Transporter app on Mac.

Version with bug

6.0.400 (current)

Last version that worked well

6.0 Release Candidate 3

Affected platforms

iOS

Affected platform versions

Xcode 13.4.1, VS 17.3.0 Preview 3.0

Did you find any workaround?

No response

Relevant log output

2022-07-13 12:22:54.374  INFO: ContentDelivery version 2.14.8 (14038).
2022-07-13 12:22:54.385  INFO: Show Progress: Contacting Apple Services…
2022-07-13 12:22:55.085  INFO: Show Progress: Making copy of ‘Xnet.MAUI.Trimo.ipa’…
2022-07-13 12:22:55.086  INFO: Show Progress: Preparing to upload ‘Xnet.MAUI.Trimo.ipa’…
2022-07-13 12:22:55.429  INFO: Show Progress: Analysing package…
2022-07-13 12:23:11.853  INFO: Show Progress: Sending analysis to App Store Connect…
2022-07-13 12:23:13.022  INFO: COMPLETED - PART 1
2022-07-13 12:23:13.025  INFO: Show Progress: Waiting for App Store Connect analysis response…
2022-07-13 12:23:15.877 ERROR: Asset validation failed (90171) Invalid Bundle Structure - The binary file 'Xnet.MAUI.Trimo.app/libSystem.IO.Compression.Native.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure. (ID: ac5b5f54-ae7f-4095-b356-4e9b650776dc)
2022-07-13 12:23:15.877 ERROR: Asset validation failed (90171) Invalid Bundle Structure - The binary file 'Xnet.MAUI.Trimo.app/libmono-component-diagnostics_tracing.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure. (ID: 2e9ce284-3566-4d01-8248-2277ec85262b)
2022-07-13 12:23:15.877 ERROR: Asset validation failed (90171) Invalid Bundle Structure - The binary file 'Xnet.MAUI.Trimo.app/libmono-component-hot_reload.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure. (ID: dffa6132-58fe-4e54-8178-322da495ae40)
2022-07-13 12:23:15.878 ERROR: Asset validation failed (90171) Invalid Bundle Structure - The binary file 'Xnet.MAUI.Trimo.app/libxamarin-dotnet.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure. (ID: 81c2267a-120e-4b66-ad64-63f0713a77a9)
2022-07-13 12:23:15.878 ERROR: Asset validation failed (90171) Invalid Bundle Structure - The binary file 'Xnet.MAUI.Trimo.app/libSystem.Net.Security.Native.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure. (ID: 00dab3d1-f65c-425b-8d4c-4267f646640e)
2022-07-13 12:23:15.878 ERROR: Asset validation failed (90171) Invalid Bundle Structure - The binary file 'Xnet.MAUI.Trimo.app/libSystem.Native.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure. (ID: 1c656e0c-2b98-4fea-a013-4feb9d32550d)
2022-07-13 12:23:15.878 ERROR: Asset validation failed (90171) Invalid Bundle Structure - The binary file 'Xnet.MAUI.Trimo.app/libmonosgen-2.0.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure. (ID: 7f53ed8e-1dfe-4afc-85fb-6d48ae5a3035)
2022-07-13 12:23:15.879 ERROR: Asset validation failed (90171) Invalid Bundle Structure - The binary file 'Xnet.MAUI.Trimo.app/libmono-component-debugger.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure. (ID: c8a48ff7-2809-4f00-bb03-c51108578589)
2022-07-13 12:23:15.879 ERROR: Asset validation failed (90171) Invalid Bundle Structure - The binary file 'Xnet.MAUI.Trimo.app/libSystem.Security.Cryptography.Native.Apple.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure. (ID: c17128aa-696c-4b4c-b0df-3dbb35773b33)
2022-07-13 12:23:16.493  INFO: Show Progress: Upload failed.
Asset validation failed
Invalid Bundle Structure - The binary file 'Xnet.MAUI.Trimo.app/libSystem.IO.Compression.Native.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than a valid CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure. (ID: ac5b5f54-ae7f-4095-b356-4e9b650776dc)
2022-07-13 12:23:16.493  INFO: 
=============
UPLOAD FAILED with 9 errors.
=============
HobDev commented 2 years ago

I have same issue while publishing Maui App version 6.0.408 . Should I create new issue as this issue is about Maui Blazor app.

jfversluis commented 2 years ago

@HobDev no need, I think it's the same cause.

@drasticactions it's a bit of a long shot, but I see Hot Reload, any idea how that ends up in the resulting ipa?

RaspeR87 commented 2 years ago

@jfversluis still not working on latest VS 2022 Version 17.3.0 Preview 4.0 and VS for Mac 17.3 Preview (17.3 build 2012)...:-(

rsbepvb commented 2 years ago

Getting a somewhat similar error trying to upload IPA through transporter to AppStore.

"Asset validation failed (90704) Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for iOS, iPadOS, or watchOS. Without this icon, apps cannot be submitted for review. For details, see https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/. (ID: 60e5dd23-9477-44f7-bc91-5f046185899b)"

Symbai commented 2 years ago

Im having the same issue with missing app icon (90704). The information in plist file is correct: <string>Assets.xcassets/appicon.appiconset</string> and in my csproj file: <MauiIcon Include="Resources\AppIcon\appicon.svg" Color="#FFFFFF" />

RaspeR87 commented 2 years ago

@jfversluis still not working on latest VS 2022 Version 17.3.0 Preview 5.0 and VS for Mac 17.3 Preview (17.3 build 2083)... :-(

Am I doing anything wrong or am I only who have problems with publishing MAUI app to Apple App Store generally?

Symbai commented 2 years ago

@RaspeR87 I was able to publish my iOS app without a problem after I figured out why the app icon was missing. But I also had got a different issue than you.

RaspeR87 commented 2 years ago

@Symbai in which way you create ipa file? With this command? dotnet publish -f:net6.0-ios -c:Release /p:ServerAddress=10.20.30.21 /p:ServerUser=***** /p:ServerPassword=xxxxxxxx /p:TcpPort=58181 /p:ArchiveOnBuild=true /p:_DotNetRootRemoteDirectory=/Users/ezslovenia/Library/Caches/Xamarin/XMA/SDKs/dotnet/ /p:EnableAssemblyILStripping=false

Symbai commented 2 years ago

dotnet publish -f:net6.0-ios -c:Release on a macbook. Publishing/Debugging/testing on a windows host is almost extremely buggy, I don't even going to bother with it anymore.

anupam99 commented 2 years ago

same thing here .

dotnet publish -f:net6.0-ios -c:Release /p:ServerAddress=192.168.1.43 /p:ServerUser=anupam /p:TcpPort=58181 /p:ArchiveOnBuild=true /p:_DotNetRootRemoteDirectory=/Users/anupam/Library/Caches/Xamarin/XMA/SDKs/dotnet/ /p:EnableAssemblyILStripping=true

i too receive the same 9 issues in Transporter upload of .ipa file.

jfversluis commented 2 years ago

Could anywhere here that is experiencing this issue add the -bl switch to your command? For example dotnet publish -f:net6.0-ios -c:Release /p:ServerAddress=192.168.1.43 /p:ServerUser=anupam /p:TcpPort=58181 /p:ArchiveOnBuild=true /p:_DotNetRootRemoteDirectory=/Users/anupam/Library/Caches/Xamarin/XMA/SDKs/dotnet/ /p:EnableAssemblyILStripping=true -bl

This will produce a so-called binlog file which you can find in the folder you run the command from. It should be named msbuild.binlog and please add that file here so we can inspect what is exactly going on during the build and publishing. Thanks!

ghost commented 2 years ago

Hi @RaspeR87. We have added the "s/needs-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.

RaspeR87 commented 2 years ago

@jfversluis here is my msbuild.binlog file (I added it into zip file because binlog extension is not supported here). msbuild.zip .

RaspeR87 commented 2 years ago

I tried to upload app via Archive Manager from Visual Studio 2022 too, but I got this message: image

Is here possible to get more information like from Transporter app?

anupam99 commented 2 years ago

msbuild.binlog from my machine attached here. msbuild1.zip

dev environment: win11 Pro intel i7 + M2 macbook pro ( paired)

anupam99 commented 2 years ago

meanwhile , same repo, cloned and built on the Macbook directly with dotnet publish -f:net6.0-ios -c:Release , uploads just fine, through transporter

attaching the msbuild log from MacBook, if it could help figure out the issue. msbuild.binlog.zip

chamons commented 2 years ago

I would like to confirm that people seeing this are all remote building from Windows, and none are building on a mac directly. Please let us know if that is not true.

From @anupam99 's log and my inability to reproduce this locally, building on a mac right now appears to be a potential work around.

chamons commented 2 years ago

Looking into this a bit more, the difference appears to be that macOS is choosing (in ResolveRuntimePackAssets) a static lib:

/usr/local/share/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.ios-arm64/6.0.7/runtimes/ios-arm64/native/libSystem.IO.Compression.Native.a

while Windows remote build is choosing a dylib

C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.ios-arm64\6.0.7\runtimes\ios-arm64\native\libSystem.IO.Compression.Native.dylib
RaspeR87 commented 2 years ago

eanwhile , same repo, cloned and built on the Macbook directly with dotnet publish -f:net6.0-ios -c:Release , uploads just fine, through transporter

Yes, for me same repo cloned and build on the Macbook with this command + uploads through transporter app works well too :-)

chamons commented 2 years ago

So @RaspeR87 @anupam99 @Symbai - I'm trying to reproduce this locally on a Windows machine and I can't publish at all without a runtime identifier configured, which I see missing in your invocations..

Are you not seeing something like this:

error : A runtime identifier must be specified in order to publish this project. 

Are you not setting /p:RuntimeIdentifier, or is it set in your csproj? Does setting it explicitly with:

/p:RuntimeIdentifier=ios-arm64

change any behavior?

Symbai commented 2 years ago

Its set in csproj, see the XML of this documentation section. And yes it only fails when trying to build from Windows (11) machine connected to a macOS machine. Building on macOS works out of the box.

chamons commented 2 years ago

I understand you can set RuntimeIdentifier's in the csproj, but without a csproj to compare against I'm not 100% sure what it's being set to.

@Symbai - Doe setting /p:RuntimeIdentifier=ios-arm64 in your remote build change any behavior?

anupam99 commented 2 years ago

image

drasticactions commented 2 years ago

@HobDev no need, I think it's the same cause.

@drasticactions it's a bit of a long shot, but I see Hot Reload, any idea how that ends up in the resulting ipa?

It can't, ever. The assemblies are injected into the running application on debug, and only on debug. No files are copied to the output directory. No users could directly reference them unless they actively copied and referenced the DLLs directly.

ghost commented 2 years ago

Thanks for the issue report @RaspeR87! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.

  1. Go to the Visual Studio for Windows feedback tool or Visual Studio for Mac feedback tool to report the issue
  2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.

This issue will be automatically closed in 3 days if there are no further comments.

ghost commented 2 years ago

This issue is being closed due to inactivity. If this issue is still affecting you, please follow the steps above to use the VS Feedback Tool to report the issue.