amplify-hosting
amplify-hosting copied to clipboard
CodeSHA256 is different from current CodeSHA256 in $LATEST
Before opening, please confirm:
- [X] I have checked to see if my question is addressed in the FAQ.
- [X] I have searched for duplicate or closed issues.
- [X] I have read the guide for submitting bug reports.
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
App Id
dsi5yonsoby0v
Region
eu-central-1
Amplify Hosting feature
Not applicable
Describe the bug
Framework: Next.js In the Frontend Build step. after SSR build, SSG build starts and sometimes this error happens.
2022-09-07T08:52:16.784Z [INFO]: Starting SSR Build...
2022-09-07T08:58:25.993Z [ERROR]: InvalidParameterValueException: CodeSHA256 () is different from current CodeSHA256 in $LATEST (). Please try again with the CodeSHA256 in $LATEST.
at Object.extractError (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/protocol/json.js:52:27)
at Request.extractError (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/protocol/rest_json.js:49:8)
at Request.callListeners (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/request.js:688:12)
at Request.callListeners (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
at Request.emit (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/request.js:688:12)
at Request.callListeners (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
at callNextListener (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
at IncomingMessage.onEnd (/root/.//node_modules/@sls-next/aws-lambda/node_modules/aws-sdk/lib/event_listeners.js:335:13)
at IncomingMessage.emit (events.js:412:35)
at IncomingMessage.emit (domain.js:475:12)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
code: 'InvalidParameterValueException',
time: 2022-09-07T08:58:25.690Z,
requestId: '',
statusCode: 400,
retryable: false,
retryDelay: 24.817332052595376
}
2022-09-07T08:58:25.995Z [ERROR]: [G[?25h[G[J
321s › dsi5yonsoby0v › InvalidParameterValueException: CodeSHA256 () is different from current CodeSHA256 in $LATEST (). Please try again with the CodeSHA256 in $LATEST.
Terminating logging...
Expected behavior
Successful build
Reproduction steps
Frontend Next.JS SSR Build
Build Settings
version: 1
frontend:
phases:
preBuild:
commands:
- nvm install $NODE_VERSION
- npm install -g yarn
- yarn install
build:
commands:
- nvm use $NODE_VERSION
- yarn build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
Additional information
Next.js - 12.1.5 Node.js - 14.18.1