amplify-hosting icon indicating copy to clipboard operation
amplify-hosting copied to clipboard

Amplify build Fail with Next since today

Open multivoltage opened this issue 3 years ago • 8 comments

Before opening, please confirm:

App Id

d2skhgz4a0rx0t

Region

eu-west-1

Amplify Hosting feature

Build settings

Describe the bug

I use amplify with next 11 and node 12 since 6 months. Last good deploy was 3 days ago. Today all commit produce:

2022-09-20T14:50:54.730Z [ERROR]: NoSuchBucket: The specified bucket does not exist
                                  at Request.extractError (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/services/s3.js:711:35)
                                  at Request.callListeners (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
                                  at Request.emit (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
                                  at Request.emit (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/request.js:686:14)
                                  at Request.transition (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/request.js:22:10)
                                  at AcceptorStateMachine.runTo (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/state_machine.js:14:12)
                                  at /root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/state_machine.js:26:10
                                  at Request.<anonymous> (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/request.js:38:9)
                                  at Request.<anonymous> (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/request.js:688:12)
                                  at Request.callListeners (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
                                  at Request.emit (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
                                  at Request.emit (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/request.js:686:14)
                                  at Request.transition (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/request.js:22:10)
                                  at AcceptorStateMachine.runTo (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/state_machine.js:14:12)
                                  at /root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/state_machine.js:26:10
                                  at Request.<anonymous> (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/request.js:38:9)
                                  at Request.<anonymous> (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/request.js:688:12)
                                  at Request.callListeners (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
                                  at callNextListener (/root/.//node_modules/@sls-next/s3-static-assets/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
                                  at IncomingMessage.onEnd (/root/.//node_modules/@sls-next/s3-static-assets/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:1333:12)
                                  at processTicksAndRejections (internal/process/task_queues.js:82:21) {
                                  code: 'NoSuchBucket',
                                  region: null,
                                  time: 2022-09-20T14:50:54.601Z,
                                  requestId: '6TCJVFS3E1JXWWFK',
                                  extendedRequestId: 'J/gnSejXYAVn4g7RkgMErH3zypYjpNXOHImmmI6Xx5SzSpYeEyKvDs7qV+4Rk0KUg+kbjkhDOjs=',
                                  cfId: undefined,
                                  statusCode: 404,
                                  retryable: false,
                                  retryDelay: 5.652999337724407
                                  }

Expected behavior

Build without errors

Reproduction steps

Deploy a React app with the following dependency:

"next": "11.1.4"

Build Settings

version: 0.1
frontend:
  phases:
    preBuild:
      commands:
        - yarn install
    build:
      commands:
        - yarn run build
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

Additional information

No response

multivoltage avatar Sep 20 '22 15:09 multivoltage

I'm seeing the same behavior in my account using amplify, we have 200+ applications and the impact of this is huge, the 3 errors I've identified in my apps are:

1- NoSuchBucket: The specified bucket does not exist 2- Cannot find any generated SSR resources to deploy 3 - New Cloudfront distributions created with no reason

edenriquez avatar Sep 20 '22 16:09 edenriquez

Since how many days did you see this error? 1 - Maybe. But in the amplify dashboard where can I see this bucket? 2 and 3. Probably I have to spend days to learn how I can move inside aws panels.

multivoltage avatar Sep 20 '22 16:09 multivoltage

1- you don't, the way I've figured out the bucket name is by taking the cloudfront id from amplify cli console, find it in cloudfront panel and look at the origin tab there is the s3 bucket name, I don't think the issue is the bucket but the creation of new distributions and the internal metadata that amplify app has to identify the bucket supposed to be linked with the app.

edenriquez avatar Sep 20 '22 16:09 edenriquez

I think is related with this In fact some deploy (I change only a basic js file) produce a "green" deploy but the site did not reflect the change :)

multivoltage avatar Sep 20 '22 16:09 multivoltage

I think is related with this In fact some deploy (I change only a basic js file) produce a "green" deploy but the site did not reflect the change :)

Same problem here, started today

raframil avatar Sep 20 '22 17:09 raframil

@raframil @multivoltage @edenriquez - We're actively investigating this under priority and have been able to reproduce this on our end as well. We'll keep you posted with an update shortly.

arundna avatar Sep 20 '22 18:09 arundna

Related https://github.com/aws-amplify/amplify-hosting/issues/2996

ferdingler avatar Sep 20 '22 19:09 ferdingler

https://github.com/aws-amplify/amplify-hosting/issues/2996#issuecomment-1252904135

gggiii avatar Sep 20 '22 20:09 gggiii

@arundna You can close. After second deploy on staging I think problem is fixes

multivoltage avatar Sep 26 '22 15:09 multivoltage

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Sep 26 '22 15:09 github-actions[bot]

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Oct 28 '22 00:10 github-actions[bot]