microsoft / Oryx

Build your repo automatically.
Other
755 stars 174 forks source link

Errors in BuildScriptGenerator for Static Web app API build #1981

Closed TwonkyTheRobot closed 1 year ago

TwonkyTheRobot commented 1 year ago

Bug Report

A couple of days ago we made a new build for an Azure Static Web app. This app hasn't been built for a year or so, and no real changes were made (it was an added Dependabot config file that caused the build.) Since that build calls to the backend (an Azure Functions proxy) give 404.

The site is built and deployed with a Github action using Azure/static-web-apps-deploy@v1

Looking at the build logs I see these lines when the API is built:

/tmp/BuildScriptGenerator/7b94a6a078de44b4a2d4cb12e2342395/build.sh: line 195: IsNotBlank: command not found /tmp/BuildScriptGenerator/7b94a6a078de44b4a2d4cb12e2342395/build.sh: line 195: [: missing `]'

Something seems to go wrong with the backend build, but the deploy continues anyway.

I've tried different node versions, but the thing that I cannot change (I think) is the version of Oryx, which was obviously different at the time of the last build that worked.

Does anyone have an idea on how to fix it?

Run Azure/static-web-apps-deploy@v1
  with:
    azure_static_web_apps_api_token: ***
    repo_token: ***
    action: upload
    app_location: /
    api_location: api
    output_location: dist
/usr/bin/docker run --name ed866e3c833d5[2](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:2)d58[3](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:3)[4](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:4)[5](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:5)28b14ffc8902030[6](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:6)10_a4dd[7](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:7)d --label ed[8](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:8)66e --workdir /github/workspace --rm -e "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN" -e "INPUT_REPO_TOKEN" -e "INPUT_ACTION" -e "INPUT_APP_LOCATION" -e "INPUT_API_LOCATION" -e "INPUT_OUTPUT_LOCATION" -e "INPUT_API_BUILD_COMMAND" -e "INPUT_APP_ARTIFACT_LOCATION" -e "INPUT_APP_BUILD_COMMAND" -e "INPUT_ROUTES_LOCATION" -e "INPUT_SKIP_APP_BUILD" -e "INPUT_CONFIG_FILE_LOCATION" -e "INPUT_SKIP_API_BUILD" -e "INPUT_PRODUCTION_BRANCH" -e "INPUT_DEPLOYMENT_ENVIRONMENT" -e "INPUT_IS_STATIC_EXPORT" -e "INPUT_DATA_API_LOCATION" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/web-disturbance-admin/web-disturbance-admin":"/github/workspace" ed866e:3c833d52d5834528b14ffc8[9](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:10)020306[10](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:11)
DeploymentId: 8a629996-8f91-4444-8261-c4f0cd24d69d

App Directory Location: '/' was found.
Looking for event info
Starting to build app with Oryx
Azure Static Web Apps utilizes Oryx to build both static applications and Azure Functions. You can find more details on Oryx here: https://github.com/microsoft/Oryx
---Oryx build logs---

Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues

Oryx Version: 0.2.20230501.1, Commit: 58513374525ab2977af68fc5b3c344d32858d8af, ReleaseTagName: 20230501.1

Build Operation ID: cca36cbed2ddda5c
OS Type           : bullseye
Image Type        : jamstack

Detecting platforms...
Detected following platforms:
  nodejs: 16.20.0
Version '16.20.0' of platform 'nodejs' is not installed. Generating script to install it...
Detected the following frameworks: Typescript,Vue.js

Source directory     : /github/workspace
Destination directory: /bin/staticsites/8a629996-8f91-4444-8261-c4f0cd24d69d-swa-oryx/app

Installing common platform dependencies...
Get:1 http://deb.debian.org/debian bullseye InRelease [[11](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:12)6 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [239 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.6 kB]
Fetched 8644 kB in 2s (5201 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.30.2-1+deb11u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Downloading and extracting 'nodejs' version '16.20.0' to '/opt/nodejs/16.20.0'...
Detected image debian flavor: bullseye.
Downloaded in 1 sec(s).
Verifying checksum...
Extracting contents...
performing sha5[12](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:13) checksum for: nodejs...
Done in 2 sec(s).

Removing existing manifest file
Creating directory for command manifest file if it does not exist
Creating a manifest file...
Node Build Command Manifest file created.

Using Node version:
v16.20.0

Using Npm version:
8.19.4

Running 'npm install'...

npm WARN deprecated vite-plugin-components@0.8.4: renamed to `unplugin-vue-components`, see https://github.com/antfu/unplugin-vue-components/releases/tag/v0.14.0
npm WARN deprecated shvl@2.0.3: older versions vulnerable to prototype pollution
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated vuex-persistedstate@4.0.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated vscode-web-custom-data@0.3.5: This package has been renamed to @vscode/web-custom-data, please update to the new name
npm WARN deprecated @iconify/json-tools@1.0.10: no longer maintained, use @iconify/utils
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

added 581 packages, and audited 582 packages in 15s

69 packages are looking for funding
  run `npm fund` for details

11 vulnerabilities (4 moderate, 2 high, 5 critical)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

Running 'npm run build'...

> web-disturbance-admin@0.0.0 build
> vite build

vite v2.5.7 building for production...
transforming...
✓ 907 modules transformed.
rendering chunks...
dist/index.html                                1.07 KiB
dist/manifest.webmanifest                      0.39 KiB
dist/assets/vendor.99bacb60.css                2.21 KiB / brotli: 0.52 KiB
dist/assets/virtual_pwa-register.c2b9b06b.js   5.48 KiB / brotli: 2.00 KiB
dist/assets/index.1ba1ea65.js                  69.56 KiB / brotli: 19.09 KiB
dist/assets/index.7f9fcf95.css                 90.94 KiB / brotli: 19.39 KiB
dist/assets/vendor.e1ea29f7.js                 1708.21 KiB / brotli: skipped (large chunk)

(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
Preparing output...

Copying files to destination directory '/bin/staticsites/8a629996-8f91-4444-8261-c4f0cd24d69d-swa-oryx/app'...
Done in 2 sec(s).

Removing existing manifest file
Creating a manifest file...
Manifest file created.
Copying .ostype to manifest output directory.

Done in 49 sec(s).

---End of Oryx build logs---
Finished building app with Oryx
Using 'staticwebapp.config.json' file for configuration information, 'routes.json' will be ignored.
Copying 'staticwebapp.config.json' to build output
Api Directory Location: 'api' was found.
Starting to build function app with Oryx
---Oryx build logs---

Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues

Oryx Version: 0.2.20230501.1, Commit: 585[13](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:14)374525ab2977af68fc5b3c344d32858d8af, ReleaseTagName: 20230501.1

Build Operation ID: 7973b0839a097e1b
Repository Commit : 53e041efe0a18e7e4483db29ed9fcbbcc33b6a7f
OS Type           : bullseye
Image Type        : jamstack

Detecting platforms...
Detected following platforms:
  nodejs: 16.20.0

Source directory     : /github/workspace/api
Destination directory: /bin/staticsites/8a629996-8f91-4444-8261-c4f0cd24d69d-swa-oryx/api

Removing existing manifest file
Creating directory for command manifest file if it does not exist
Creating a manifest file...
Node Build Command Manifest file created.

Using Node version:
v16.20.0

Using Npm version:
8.19.4
/tmp/BuildScriptGenerator/7b94a6a078de44b4a2d4cb12e2342395/build.sh: line 195: IsNotBlank: command not found
/tmp/BuildScriptGenerator/7b94a6a078de44b4a2d4cb12e2342395/build.sh: line 195: [: missing `]'

Installing production dependencies in '/github/workspace/api/.oryx_prod_node_modules'...

Running 'npm install --production'...

npm WARN config production Use `--omit=dev` instead.

up to date, audited 1 package in [14](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:15)0ms

found 0 vulnerabilities

Running 'npm install'...

up to date, audited 1 package in 133ms

found 0 vulnerabilities
Preparing output...

Copying files to destination directory '/bin/staticsites/8a629996-8f91-4444-8261-c4f0cd[24](https://github.com/ue-web-team/web-disturbance-admin/actions/runs/4894131478/jobs/8737956142?pr=17#step:4:25)d69d-swa-oryx/api'...
Done in 0 sec(s).

Removing existing manifest file
Creating a manifest file...
Manifest file created.
Copying .ostype to manifest output directory.

Done in 1 sec(s).

---End of Oryx build logs---
daniv-msft commented 1 year ago

Thanks for opening this issue! Adding @pauld-msft who is looking into customer issues this week. @pauld-msft At first sight I couldn't find what is the cause of the issue. Looking at https://github.com/microsoft/Oryx/blob/main/src/BuildScriptGenerator/Node/NodeBashBuildSnippet.sh.tpl line 195, this seems like a part of the code we didn't update recently (even though SWA might not be up to date with their version).

@TwonkyTheRobot By any chance, is this application public so that we can try to reproduce and determine what goes wrong? If not, could you please share if you're using anything specific in your package.json when building your app?

TwonkyTheRobot commented 1 year ago

The change does not have to be that recent. It seems the last build before now was Jun 16, 2022. So any change between whatever was used then and 0.2.20230501.1 (that is used according to the log) could have caused it.

The source code is unfortunately not public, but I can share the package.json:

  "name": "web-disturbance-admin",
  "version": "0.0.0",
  "scripts": {
    "dev": "vite --port 8080",
    "dev:bypass": "vite --mode bypass",
    "build": "vite build",
    "serve": "vite preview"
  },
  "dependencies": {
    "@geoman-io/leaflet-geoman-free": "^2.10.0",
    "@headlessui/vue": "^1.4.1",
    "@meforma/vue-toaster": "^1.2.2",
    "@popperjs/core": "^2.9.2",
    "@turf/centroid": "^6.3.0",
    "@turf/kinks": "^6.5.0",
    "@types/leaflet": "^1.7.0",
    "@vuelidate/core": "^2.0.0-alpha.25",
    "@vuelidate/validators": "^2.0.0-alpha.21",
    "axios": "^0.21.4",
    "date-fns": "^2.21.2",
    "leaflet": "^1.7.1",
    "vue": "^3.2.6",
    "vue-router": "^4.0.11",
    "vue3-markdown-it": "^1.0.8",
    "vuex": "^4.0.2",
    "vuex-persistedstate": "^4.0.0"
  },
  "devDependencies": {
    "@iconify/json": "^1.1.396",
    "@types/lodash": "^4.14.173",
    "@types/node": "^15.0.2",
    "@vitejs/plugin-vue": "^1.6.0",
    "@vue/compiler-sfc": "^3.2.6",
    "@vuedx/typecheck": "^0.6.0",
    "@vuedx/typescript-plugin-vue": "^0.6.0",
    "typescript": "^4.1.3",
    "vite": "^2.5.3",
    "vite-plugin-components": "^0.8.4",
    "vite-plugin-icons": "^0.5.1",
    "vite-plugin-pwa": "^0.11.2",
    "vite-plugin-windicss": "^1.4.3",
    "windicss": "^3.1.7"
  }
}
peruzzof commented 1 year ago

Hi, I am facing a similar issue. as I have multiple deploys per day I was able to identify that the issue started between 02/05 and 04/05. I will add both last success and first failed, hopefully this will help to identify the issue.

I am using this from Azure DevOps, it seems that usually this is executed from GitHub, not sure if this will have any impact. This is not a public repo, but there is no big secrets into it so maybe I can give more details if necessary.

--- Last success execution ---- Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx You can report issues at https://github.com/Microsoft/Oryx/issues

Oryx Version: 0.2.20221103.1, Commit: a2c65dde152b749fea395f4d1242ea9350942258, ReleaseTagName: 20221103.1

Build Operation ID: |YJQFS9Di274=.f121b650_ Repository Commit : b55821ac67ef0b721c5c8a5784ad7a8ab679b831

Detecting platforms... Detected following platforms: nodejs: 18.16.0 Version '18.16.0' of platform 'nodejs' is not installed. Generating script to install it...

Source directory : /working_dir/api Destination directory: /7e388fa7-0ed2-40d7-ba37-772ff293f399-swa-oryx/api

Downloading and extracting 'nodejs' version '18.16.0' to '/opt/nodejs/18.16.0'... Detected image debian flavor: bullseye. Downloaded in 1 sec(s). Verifying checksum... Extracting contents... performing sha512 checksum for: nodejs... Done in 2 sec(s).

Removing existing manifest file Creating directory for command manifest file if it does not exist Creating a manifest file... Node Build Command Manifest file created.

Using Node version: v18.16.0

Using Npm version: 9.5.1

Installing production dependencies in '/working_dir/api/.oryx_prod_node_modules'...

Running 'npm install --unsafe-perm --production'...

npm WARN config production Use --omit=dev instead.

added 4 packages, and audited 5 packages in 334ms

found 0 vulnerabilities

Copying production dependencies from '/working_dir/api/.oryx_prod_node_modules' to '/working_dir/api/node_modules'... Done in 0 sec(s).

Running 'npm install --unsafe-perm'...

up to date, audited 5 packages in 330ms

found 0 vulnerabilities --- Last success execution ----

And this is the first one that failed:

--- First execution with error --- Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx You can report issues at https://github.com/Microsoft/Oryx/issues

Oryx Version: 0.2.20230501.1, Commit: 58513374525ab2977af68fc5b3c344d32858d8af, ReleaseTagName: 20230501.1

Build Operation ID: e0fac17cb99ebacf OS Type : bullseye Image Type : jamstack

Detecting platforms... Detected following platforms: nodejs: 18.16.0 Version '18.16.0' of platform 'nodejs' is not installed. Generating script to install it...

Source directory : /working_dir/api Destination directory: /308cb20f-75ac-4cb5-9a3d-bd4eb4d0ca3a-swa-oryx/api

Installing common platform dependencies... Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB] Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB] Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB] Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB] Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [237 kB] Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.6 kB] Fetched 8643 kB in 1s (6393 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Calculating upgrade... 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Reading package lists... Building dependency tree... Reading state information... git is already the newest version (1:2.30.2-1+deb11u2). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Downloading and extracting 'nodejs' version '18.16.0' to '/opt/nodejs/18.16.0'... Detected image debian flavor: bullseye. Downloaded in 0 sec(s). Verifying checksum... Extracting contents... performing sha512 checksum for: nodejs... Done in 2 sec(s).

Removing existing manifest file Creating directory for command manifest file if it does not exist Creating a manifest file... Node Build Command Manifest file created.

Using Node version: v18.16.0

Using Npm version: 9.5.1 /tmp/BuildScriptGenerator/94d3d2f7cb0c4da68cc33d2c8a9f3917/build.sh: line 340: [: missing `]' /tmp/BuildScriptGenerator/94d3d2f7cb0c4da68cc33d2c8a9f3917/build.sh: line 340: IsNotBlank: command not found

Installing production dependencies in '/working_dir/api/.oryx_prod_node_modules'...

Running 'npm install --production'...

npm WARN config production Use --omit=dev instead.

added 4 packages, and audited 5 packages in 384ms

found 0 vulnerabilities

Copying production dependencies from '/working_dir/api/.oryx_prod_node_modules' to '/working_dir/api/node_modules'... Done in 0 sec(s).

Running 'npm install'...

up to date, audited 5 packages in 326ms

found 0 vulnerabilities --- First execution with error ---

pauld-msft commented 1 year ago

Hi all, thanks for reporting! I've put out a PR to fix this issue with IsNotBlank: command not found: https://github.com/microsoft/Oryx/pull/1987

That being said, I'm not sure that these errors would necessarily be causing the Oryx build to fail. It still seems to run npm install, and I don't see any other errors from the Oryx side. This theory seems to be corroborated by the examples that @peruzzof provided, as the successful and failed logs both have the exact same oryx version 20230501.1 and both contain the errors mentioned above.

Do you see any potential problems in the other logs, such as after the Oryx build has completed, that could indicate an issue?

peruzzof commented 1 year ago

My bad, I pasted the wrong as success execution, I just edited my original post to adjust it. The execution used the version "Oryx Version: 0.2.20221103.1" that looks quite old but, probably, was the version with the tag "stable" (used by the Azure DevOps task), and there is no option to select anything different.

pauld-msft commented 1 year ago

@peruzzof thanks for the update. That makes sense, it generally takes some time for our partners to rollout updates that we are able to implement.

Would you be able to share exactly how the build is breaking? I was able to reproduce the issue with a simple react app / api, where the app build works fine but the api build shows the errors. That being said, the build / deployment still succeeded and deployed, and I confirmed that the api still works.

https://github.com/pauld-msft/my-first-static-web-app-react/actions/runs/4928028942/jobs/8805853570

TwonkyTheRobot commented 1 year ago

New theory; could it be that the managed API gets built as a v4.0 functions app now? The site uses proxies.json for the API, and that isn't supported by v4, so that could explain the 404. On the other hand, our hosts.json says:

  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  },
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[2.*, 3.0.0)"
  }
}
peruzzof commented 1 year ago

In my case I am using the API to map userRules based in the AD groups. Some users complained that it wasn't working then I noticed the error. Running the pipeline with the previous versions solved the issue.

At the moment, as a workaround, I replaced the task "AzureStaticWebpApp@0" with a similar bash task that will use the docker image "mcr.microsoft.com/appsvc/staticappsclient:prev" to deploy.

I can ask if I am able to break the environment again to get some logs, let me know if this is important.

pauld-msft commented 1 year ago

@TwonkyTheRobot - that sounds like a good theory. Like I mentioned previously, I'm not sure that the IsNotBlank: command not found error would break deployments, but rather is likely a red herring.

@peruzzof - is there any indication in the deployment of the API itself that there could be an issue? Are you also hosting your API in Azure Functions and if so, was your api also upgrade to v4 Azure Function App?

TwonkyTheRobot commented 1 year ago

My workaround was to create a separate Azure Function and use that instead of the managed API. This allowed me to set AzureWebJobsFeatureFlags to EnableProxies, and be able to use the proxies.json in a v4 app. (I could also have set the version to v2 or v3). So now the Static Web app works again.

pauld-msft commented 1 year ago

Closing this issue as the error that oryx generated was fixed, and the root of the issue seems to be with the new v4 azure function apps. There will likely be a delay in seeing the fix in production app service since our partners have fairly long release cycle, but from our side this is resolved. Feel free to re-open or open a new issue if there are other indications that Oryx is the root cause.