'Visual Studio, Maui, dotnet publish. Unable to authenticate using the following authentication method: KeyboardInteractiveAuthenticationMethod
When publishing Maui (preview 14) App in Visual Studio 2022 (Preview 2.1) connected to Mac Mini (M1) the publishing fails on code sign, but it seems to be some authentication error:
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : [xma]: Unable to authenticate using the following authentication method: KeyboardInteractiveAuthenticationMethod [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
Environment information
- Windows 10;
- Visual studio 2022 Preview 2.1;
- Mac Mini (M1, 2020 Processor) MacOS Monterey;
Additional info
- Build/publish is a release (store) build (not development) certificate is valid;
- Worked in Maui (preview 13/Visual studio preview 2);
Tried actions
Complete re-install mac and certificates;
Installed mac root and intermediate certificates(https://www.apple.com/certificateauthority/);
re-install Visual studio;
Cleared cache folders;
Verified rights for certificates and terminal access.
Additional logging:
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : [xma]: Unable to authenticate using the following authentication met
hod: KeyboardInteractiveAuthenticationMethod [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : [xma]: Unable to authenticate using the following authentication met
hod: KeyboardInteractiveAuthenticationMethod [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : data [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.Security.Cryptography.BlockCipher.Encrypt(Byte[]
data, Int32 offset, Int32 length) [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.Session.SendMessage(Message message) [C:\repo\eco
touch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.KeyboardInteractiveAuthenticationMethod.Authentic
ate(Session session) [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Xamarin.Messaging.Ssh.MessagingAuthenticationMethod.TryAuthent
icate(Session session, AuthenticationMethod method) in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\MessagingAuthenticationMethod.cs:line 118 [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : data [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.Security.Cryptography.BlockCipher.Encrypt(Byte[]
data, Int32 offset, Int32 length) [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.Session.SendMessage(Message message) [C:\repo\eco
touch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.KeyboardInteractiveAuthenticationMethod.Authentic
ate(Session session) [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Xamarin.Messaging.Ssh.MessagingAuthenticationMethod.TryAuthent
icate(Session session, AuthenticationMethod method) in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\MessagingAuthenticationMethod.cs:line 118 [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : [xma]: Unable to authenticate using the following authentication met
hod: PasswordAuthenticationMethod [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : [xma]: Unable to authenticate using the following authentication met
hod: PasswordAuthenticationMethod [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : data [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.Security.Cryptography.BlockCipher.Encrypt(Byte[]
data, Int32 offset, Int32 length) [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.Session.SendMessage(Message message) [C:\repo\eco
touch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.PasswordAuthenticationMethod.Authenticate(Session
session) [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Xamarin.Messaging.Ssh.MessagingAuthenticationMethod.TryAuthent
icate(Session session, AuthenticationMethod method) in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\MessagingAuthenticationMethod.cs:line 118 [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : data [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.Security.Cryptography.BlockCipher.Encrypt(Byte[]
data, Int32 offset, Int32 length) [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.Session.SendMessage(Message message) [C:\repo\eco
touch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Renci.SshNet.PasswordAuthenticationMethod.Authenticate(Session
session) [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\6.0.200-preview.14.5099\targets\Microsoft.Maui.Resizetizer.targets(518,9): warning : at Xamarin.Messaging.Ssh.MessagingAuthenticationMethod.TryAuthent
icate(Session session, AuthenticationMethod method) in D:\a\_work\1\s\src\Xamarin.Messaging.Ssh\MessagingAuthenticationMethod.cs:line 118 [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
Filtered out Authentication fails:
Unable to authenticate using the following authentication method: KeyboardInteractiveAuthenticationMethod
Unable to authenticate using the following authentication method: PasswordAuthenticationMethod
Client not connected.
An error occurred while using the SCP Client. Details: Permission denied (publickey).
An error occurred while uploading files
Session operation has timed out
- There are files copied to the mac ~/Library/Xamarin/mtbs/*;
- I can (manually) connect using ssh(cmd and putty) to the target locations;
- Eventually there is an IPA file created that does not contain the app resulting in the error
ERROR ITMS-90207: "Invalid Bundle. The bundle at 'ecotouch-mobile.app' does not contain a bundle executable."
;
When runned a second time (when some files are created) the first error lines in the log are:
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.2.302-preview.14.122\tools\msbuild\iOS\Xamarin.Shared.targets(2095,3):
Access to the path 'C:\Users\ecomation\Library\Caches\Xamarin\mtbs\builds\ecotouch
mobile\45238eb08c3968e031ffb939c9cf1096a0590a34cdab32179a5ce61bef63d9ed\bin\Release\net6.0-ios\ios-arm64\ecotouch-mobile.app\_CodeSignature\CodeResources' is denied. [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.2.302-preview.14.122\tools\msbuild\iOS\Xamarin.Shared.targets(2095,3):
warning : Access to the path 'C:\Users\ecomation\Library\Caches\Xamarin\mtbs\builds\ecotouch
mobile\45238eb08c3968e031ffb939c9cf1096a0590a34cdab32179a5ce61bef63d9ed\bin\Release\net6.0-ios\ios-arm64\ecotouch-mobile.app\ecotouch-mobile' is denied. [C:\repo\ecotouch-mobile\ecotouch-mobile.csproj]
These folders were created automatically in the previous run.
Issue in the Maui Github: https://github.com/dotnet/maui/issues/5632
[ADDED INFORMATION]
It could be the case the warnings are not the reason why it doesn't work.
The IPA that is generated seems to be valid, but most files are empty:
Which seems to be causing:
ERROR ITMS-90207:
"Invalid Bundle. The bundle at 'ecotouch-mobile.app' does not contain a bundle executable."
Solution 1:[1]
Fully updated everything to latest (mac, all workloads, visual studio etc.), now it works. Throws all the same warnings but produces a working package anyways.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Firewizz |