Comments (6)
That is HTTP_E_STATUS_BAD_METHOD
"Method not allowed (405)." So it sounds to me like the deployment stack is trying to do some request to your web application that the server does not support. I don't know off the top of my head what it could be, but you may be able to find out by looking at the requests your server is receiving.
from msix-packaging.
You can get more details on the error by looking at the logs from App Installer. These are located in %LocalAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\
, either as TempState\AILog.txt
or LocalState\DiagOutputDir\AppInstaller-<timestamp>.log
Does the .appinstaller
file point to your web application or the Azure blob storage? If it is pointing to the blob storage, please try changing it to point to the web application. Regardless of the initial URI used to access the file, App Installer will then request the files from the URIs listed in the file to check for updates.
from msix-packaging.
Thanks for the reply.
The .appinstaller
file points to the web application for both, the AppInstaller Uri and the MainPackage Uri.
I looked into the logs, and it seems like the app installer is failing due to error code "0x80070138"
Any idea what that error code means?
For reference, I was able to confirm that the .appinstaller
is hitting my web application endpoint by placing a break point in the API implementation. If it helps, here is how my implementation looks like:
[HttpGet("{toolName}")]
public async Task<IActionResult> Get(string toolName)
{
var blobServiceClient = this.storageSettings.GetBlobServiceClient();
var toolBlob = blobServiceClient.GetBlobContainerClient("tools").GetBlobClient(toolName);
if (!toolBlob.Exists())
{
return this.NotFound();
}
var tool = await toolBlob.DownloadContentAsync();
var contentType = Path.GetExtension(toolName).ToUpperInvariant() switch
{
".APPINSTALLER" => "application/appinstaller",
".MSIX" => "application/msix",
_ => throw new NotSupportedException()
};
return this.File(tool.Value.Content.ToArray(), contentType);
}
from msix-packaging.
That error code is ERROR_NO_RANGES_PROCESSED
"No ranges for the specified operation were able to be processed."
Does your web application support HTTP range requests?
Generally, the package is not downloaded completely and instead only specific pieces of the file are downloaded. For example, the manifest file and icon for showing the install prompt. Then, during actual installation, only the relevant architecture is fetched. For example, if you have a bundle that contains x86, x64 in English and French, only one arch and locale would be downloaded. To do that, HTTP range requests are used.
The error code sounds to me like an issue with those range requests, that could happen if your web application doesn't support them.
from msix-packaging.
Thanks so much! That indeed was the issue. I just had to enable range by changing the last line to
return this.File(tool.Value.Content.ToArray(), contentType, enableRangeProcessing: true);
Unfortunately, now I am getting a new error "Method not allowed". Here are the lines in the log that produced the error:
[Thu Mar 14 14:45:05 2024]{49192} [InstallFromUriAsync] -> Deploying AppInstaller extension file
[Thu Mar 14 14:45:05 2024]{49192} [InstallFromUriAsync] -> Starting AddPackageByUriAsync()
[Thu Mar 14 14:45:05 2024]{49192} DeploymentCompletionCallback
[Thu Mar 14 14:45:05 2024]{49192} DeploymentCompletionCallback -> Install Operation Failed. Error Code: 0x80190195, Extended Error Code: 0x80190195
[Thu Mar 14 14:45:05 2024]{49192} DeploymentCompletionCallback -> fallbackErrorText: Appinstaller operation failed with error code 0x80190195. Detail: Method not allowed (405). (0x80190195)
Any ideas on what could be wrong now?
from msix-packaging.
Hey, thanks a lot for your help.
It turned out that my API did not support an HTTP HEAD request. After fixing that, the "Method not allowed" error got resolved.
I did run into another error, where the app installer was stuck in installing the package. After some debugging, I noticed that my API implementation downloads the MSIX package fully on every range request call. I changed the implementation to cache the package in memory so the API does not keep redownloading the MSIX package when not needed.
A better implementation of my API may be to download only the bytes requested in the range header that I may look into improving in the future.
from msix-packaging.
Related Issues (20)
- [BUG] Cant sign dlls exes inside my MSIX when creating a published package to microsfot store HOT 3
- [BUG] Unable to compile on Linux / Clang 16.0.6 HOT 2
- Help in including Visual C++ redistributable in a .msix package HOT 1
- [BUG] AddPackageByAppInstallerFileAsync causes crash when compiling for x86 on an ARM64 system
- MSIXAUTH not supported on this OS HOT 7
- OpenSSL 1.1 is EOL'd
- [BUG] Schemas need a refresh HOT 2
- [BUG] MSIX doesnt built in Azure DevOps Task HOT 6
- UnauthorizedAccessException on PackageManager.AddPackageAsync
- [Question] Microsoft - why do you hate developers? HOT 5
- [BUG] Inconsistent Zip Structure in .appx Files Created by makemsix.exe Compared to MakeAppx.exe
- [BUG] Build Error on Windows 10 with Visual Studio 2017 Enterprise
- MSIX Windows 10 does not allow to install nor auto-update when publisher changes
- [Question] How to pass AAD auth parameters in MSIX Authentication HOT 4
- [BUG/FEATURE REQUEST] MSIX packaging extension for Azure DevOps release - Configuration combo should not be restricted to 2 values
- ForceUpdateFromAnyVersion Option not included with MSIX App Installer HOT 1
- [BUG] cmake_minimum_required should be set to a more reasonable value
- [BUG] Application shortcut created is not honoring the parameters defined in the AppxManifest.xml
- How to take dependency on a library that loads non-packaged DLLs in a packaged application?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msix-packaging.