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

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

Closed
RaspeR87 opened this issue Jul 13, 2022 · 26 comments
Closed
Assignees
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) investigate platform/iOS 🍎 s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue t/bug Something isn't working

Comments

@RaspeR87
Copy link

RaspeR87 commented Jul 13, 2022

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.
=============
@RaspeR87 RaspeR87 added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Jul 13, 2022
@Eilon Eilon added the area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) label Jul 13, 2022
@HobDev
Copy link

HobDev commented Jul 14, 2022

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
Copy link
Member

@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?

@jfversluis jfversluis added platform/iOS 🍎 and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels Jul 14, 2022
@RaspeR87
Copy link
Author

@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

This comment was marked as off-topic.

@Symbai

This comment was marked as off-topic.

@RaspeR87
Copy link
Author

RaspeR87 commented Aug 2, 2022

@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
Copy link
Contributor

Symbai commented Aug 2, 2022

@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
Copy link
Author

RaspeR87 commented Aug 2, 2022

@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
Copy link
Contributor

Symbai commented Aug 2, 2022

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
Copy link

anupam99 commented Aug 2, 2022

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
Copy link
Member

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!

@jfversluis jfversluis added the s/needs-info Issue needs more info from the author label Aug 3, 2022
@ghost
Copy link

ghost commented Aug 3, 2022

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
Copy link
Author

RaspeR87 commented Aug 3, 2022

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

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Aug 3, 2022
@RaspeR87
Copy link
Author

RaspeR87 commented Aug 3, 2022

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
Copy link

anupam99 commented Aug 3, 2022

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

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

@jfversluis jfversluis added investigate and removed s/needs-attention Issue has more information and needs another look labels Aug 3, 2022
@jfversluis jfversluis added this to the 7.0-rc2 milestone Aug 3, 2022
@anupam99
Copy link

anupam99 commented Aug 3, 2022

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
Copy link

chamons commented Aug 3, 2022

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
Copy link

chamons commented Aug 3, 2022

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
Copy link
Author

RaspeR87 commented Aug 4, 2022

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
Copy link

chamons commented Aug 4, 2022

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
Copy link
Contributor

Symbai commented Aug 5, 2022

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
Copy link

chamons commented Aug 5, 2022

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
Copy link

anupam99 commented Aug 6, 2022

image

@drasticactions
Copy link
Contributor

@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.

@Redth Redth modified the milestones: 7.0-rc2, 7.0 Aug 31, 2022
@PureWeen PureWeen modified the milestones: 7.0, .NET 7 Planning Sep 28, 2022
@mattleibow mattleibow added the s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue label Nov 10, 2022
@ghost
Copy link

ghost commented Nov 10, 2022

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
Copy link

ghost commented Nov 14, 2022

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.

@ghost ghost closed this as completed Nov 14, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 14, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-publishing Issues with the app packaging/publishing process (ipk/apk/msix/trimming) investigate platform/iOS 🍎 s/move-to-vs-feedback Tells automation to ask the person to use VS Feedback to report the issue t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests