-
Notifications
You must be signed in to change notification settings - Fork 414
Open
Labels
area: command: deploytype: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Describe the bug
I am adding multi-language support to one of our web apps. We use GitHub actions to deploy new versions. This has worked so far but since changing the structure of our app the deployment appears to fail rather often. The error logs mention a 422 unprocessable entity error.
The file structure in the file browser looks like this:
- en (contains index.html and other files)
- de (contains index.html and other files)
- netlify.toml
But the deployment itself seems (?) to have worked as the changes seem to be available in production hence it might be something after the deployment that the Netlify CLI is attempting to do which causes our GitHub workflow to fail.
Error logs
✔ Finished uploading blobs to deploy store
- Hashing files...
- Looking for a functions cache...
✔ Deploying functions from cache (use --skip-functions-cache to override)
✔ Finished hashing 741 files and 4 functions
- CDN diffing files...
✔ CDN requesting 8 files and 0 functions
- Uploading 10 files
› Warning: JSONHTTPError: No records matched 422
› Warning:
{
"name": "JSONHTTPError",
"status": 422,
"json": {
"code": 422,
"message": "No records matched"
}
}
Save updated config
────────────────────────────────────────────────────────────────
(options.onEnd completed in 172ms)
Internal error during "options.onPostBuild"
────────────────────────────────────────────────────────────────
Error message
JSONHTTPError: Unprocessable Entity
Error location
During options.onPostBuild
at parseResponse (file:///home/runner/work/web-app/web-app/node_modules/netlify-cli/node_modules/netlify/lib/methods/response.js:10:39)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async callMethod (file:///home/runner/work/web-app/web-app/node_modules/netlify-cli/node_modules/netlify/lib/methods/index.js:26:28)
at async tryUpload (file:///home/runner/work/web-app/web-app/node_modules/netlify-cli/dist/utils/deploy/upload-files.js:80:29)
{
name: 'JSONHTTPError',
status: 422,
json: { code: 422, message: 'No records matched' }
}
Steps to reproduce
It is hard to reproduce reliably but here is my best guess:
- Change a lot of files
- Run the deployment command:
npx netlify deploy --prod --build --filter apps/web-app
Configuration
[build]
publish = "dist/web-app"
command = "npm run build:main-app"
functions = "./functions"
environment = { NODE_ENV = "development", NODE_VERSION = "20.6.1" }
[[plugins]]
package = "@netlify/plugin-functions-install-core"
# Since this is a single page application, we need to redirect all requests to the index.html file
[[redirects]]
from = "/en/*"
to = "/en/index.html"
status = 200
[[redirects]]
from = "/de/*"
to = "/de/index.html"
status = 200
# fallback for URLs without language prefix
[[redirects]]
from = "/*"
to = "/en/index.html"
status = 200
Environment
I am using [email protected].
System:
OS: macOS 14.3.1
Memory: 1.50 GB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.6.1 - ~/.nvm/versions/node/v20.6.1/bin/node
npm: 9.8.1 - ~/.nvm/versions/node/v20.6.1/bin/npm
jkahlina and StevenGBrown
Metadata
Metadata
Assignees
Labels
area: command: deploytype: bugcode to address defects in shipped codecode to address defects in shipped code