Forum Discussion

BigSmokeLondontown's avatar
BigSmokeLondontown
Copper Contributor
Dec 12, 2024

MSIX Packaging Tool Crash: Error code: 0x80131500

I am experiencing an MPT crash on several of our 23h2 Win 11 sequencer’s. MPT version 1.2024.405.0

Issue Presentation:

1.    When Options gear cog is clicked MPT  crashes with “unknown Error” log below
2.    MPT GUI disappears during a standard package commencement workflow. 

A work around:

1.    Resetting the MPT: Navigate to "installed apps" and rest the MPT once reset re-configure the MPT tool like first time it was installed.

The error code has been reported in MSIX forum on several posts from 2020 onwards resulting from different inputs.  A definitive fix has not been alluded to. 

MPT Log:


[10/12/2024 12:03:28] [Error] Error Occurred: Newtonsoft.Json.JsonSerializationException: Error getting value from 'CertificatePassword' on 'MsixPackagingTool.Common.Utils.SigningInput'. --->[10/12/2024 12:03:25] [Info] Microsoft (R) MsixPackagingTool Tool
[10/12/2024 12:03:25] [Info] Copyright (C) 2024 Microsoft.  All rights reserved.
[10/12/2024 12:03:25] [Info] ************************************************************
[10/12/2024 12:03:25] [Info]  MSIX Packaging Tool Launch
[10/12/2024 12:03:25] [Info] ************************************************************
[10/12/2024 12:03:25] [Info] Log file is located under: %UserProfile%\AppData\Local\Packages\Microsoft.MSIXPackagingTool_8wekyb3d8bbwe\LocalState\DiagOutputDir\Logs_6\Log.txt
[10/12/2024 12:03:25] [Info] Tool Version: 1.2024.405.0
[10/12/2024 12:03:25] [Info] Feedback logs are located under: %UserProfile%\AppData\Local\Packages\Microsoft.MSIXPackagingTool_8wekyb3d8bbwe\LocalState\DiagOutputDir\FeedbackLogs\Logs_6
[10/12/2024 12:03:25] [Debug] Attempting to read settings file: %UserProfile%\AppData\Local\Packages\Microsoft.MSIXPackagingTool_8wekyb3d8bbwe\LocalState\settings.xml
[10/12/2024 12:03:25] [Debug] Updating the settings file from version 1.2024.405.0 to a newer version.
[10/12/2024 12:03:25] [Debug] Enabling Telemetry
[10/12/2024 12:03:26] [Debug] Tool install location: C:\Program Files\WindowsApps\Microsoft.MSIXPackagingTool_1.2024.405.0_x64__8wekyb3d8bbwe
[10/12/2024 12:03:27] [Debug] Open MSIX Settings
[10/12/2024 12:03:27] [Debug] ************************************************************
[10/12/2024 12:03:27] [Debug] Settings
[10/12/2024 12:03:27] [Debug] ************************************************************
[10/12/2024 12:03:28] [Error] Error Occurred: Newtonsoft.Json.JsonSerializationException: Error getting value from 'CertificatePassword' on 'MsixPackagingTool.Common.Utils.SigningInput'. ---> System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.

   at MsixGenerator.Utils.DataProtectionHelper.Decrypt(String protectedData)
   at GetCertificatePassword(Object )
   at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
   at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
   at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
   at MsixPackagingTool.Common.SettingsFile.SettingsInput.CopyPropertiesFromOther(SettingsInput settingsInput)
   at MsixPackagingTool.ViewModel.SettingsWorkflow.MasterSettingsEditorViewModel..ctor(ViewStateOrchestrator orchestrator, ViewStateOrchestrator parentViewStateOrchestrator, SettingsInput masterSettingsInput)
   at MsixPackagingTool.Model.Common.ViewStateOrchestrator.CreateMainWindowPage()
[10/12/2024 12:03:37] [Debug] ************************************************************
[10/12/2024 12:03:37] [Debug]  Closing MSIX Packaging Tool
[10/12/2024 12:03:37] [Debug] ************************************************************

  • FYI

    I recall seeing similar behavior in the following scenario.  On a system where the packaging tool was configured with a code signing certificate, as well as other important settings like a modified exclusion list, the configuration file was copied to a different VM. Upon copying the file (overwriting the %LocalAppData\Packages copy) and starting the packaging tool it would crash.  When this was done without code signing configured this scenario works.  It appeared likely that when the packaging tool tries to decrypt the code signing information on the other machine it did not handle the exception.

    So I would guess that your configuration file was somehow broken, and your solution to repair would have cleaned out the file.

Resources