Subsequent identical Blazor pipeline deployment to SWA deploys broken build
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Hey,
We host our repo with Azure DevOps, and have a pipeline to publish our Blazor WASM application to SWA.
The pipeline has worked for us for a while, and we haven't made any changes to it. We last successfully deployed a week ago (on the 13th May). We attempted another deploy this morning, with purely just some text changes - nothing you would expect to break a build.
The pipeline runs successfully, and everything appears to be working, however our site does not deploy correctly. It hangs at the Blazor loading animation, with errors awaiting in the console.
```
MONO_WASM: TypeError: Cannot read properties of undefined (reading 'out')
Error in mono_download_assets: TypeError: Cannot read properties of undefined (reading 'out')
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'out')
Uncaught (in promise) Error: Failed to start platform. Reason: TypeError: Cannot read properties of undefined (reading 'out')
```

We have of course tried to deploy the last known working version, prior to the text changes, but this produces the same result.
Having looked at the output from the devops pipeline runs, the only notable difference I am able to really see is that the "workload manifest" version numbers differ - `Installing workload manifest microsoft.net.workload......... version 8.0.4` - That is for the last successful run last week, whereas now it is using versions 8.0.5 for everything.
It is worth noting that the blazor project has always, and still does run perfectly fine locally, on more than 1 machine. There appears to be an issue with the deployment, I just am at a loss as to what the cause is.
**To Reproduce**
Not really sure
This is our devops pipeline step:
```yaml
steps:
- checkout: self
submodules: true
- task: AzureStaticWebApp@0
env:
ENABLE_MULTIPLATFORM_BUILD: true
inputs:
azure_static_web_apps_api_token: $(SWA_TOKEN)
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "frontend" # App source code path
api_location: "data" # Api source code path - optional
output_location: "wwwroot" # Built app content directory - optional
app_build_command: "dotnet publish -c Release"
###### End of Repository/Build Configurations ######
```
And our swa-cli config:
```json
{
"$schema": "https://aka.ms/azure/static-web-apps-cli/schema",
"configurations": {
"eit.app": {
"appLocation": "frontend",
"outputLocation": "bin\\wwwroot",
"appBuildCommand": "dotnet publish -c Debug -o bin",
"run": "dotnet watch run",
"appDevserverUrl": "http://localhost:8000",
"dataApiLocation": "swa-db-connections"
}
}
}
```
**Expected behavior**
Identical behaviour with identical inputs to the run - It worked a week ago, now with the same commit it doesn't.
**Additional context**
Just one more bit to add, and that is that static content appears to be working fine. As in, I can load our css files, our images etc by accessing them directly and they are fine. The initial HTML is correct also. But it appears that the deployment has done something with the WASM related files only.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.