Skip to content

Exception: Unable to retrieve metadata of file at location "...." #26

@sayeed205

Description

@sayeed205

I was using fs and it was working fine in the dev env

I tried to deploy the application and getting [cause]: NotImplemented: GetObjectAcl not implemented

I am using r2 in production and it is uploading file successfully but can not retrieve it

Here is log
Exception: Unable to retrieve metadata of file at location "avatars/11111111.jpg"
    at DriveFile.getVisibility (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/flydrive/build/chunk-TZSKXVQT.js:248:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async Attachment.computeUrl (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@jrmc/adonis-attachment/build/src/attachments/attachment_base.js:110:32)
    ... 15 lines matching cause stack trace ...
    at async <anonymous> (/home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@adonisjs/static/src/static_middleware.ts:74:11) {
  status: 500,
  code: 'E_CANNOT_GET_METADATA',
  [cause]: NotImplemented: GetObjectAcl not implemented
      at ProtocolLib.getErrorSchemaOrThrowBaseException (/home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js:69:67)
      at AwsRestXmlProtocol.handleError (/home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js:1610:65)
      at AwsRestXmlProtocol.deserializeResponse (/home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js:301:24)
      at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
      at async /home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js:26:24
      at async /home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:386:20
      at async /home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@smithy/middleware-retry/dist-cjs/index.js:254:46
      at async /home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:63:28
      at async /home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:90:20
      at async /home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:5:26
      at async S3Driver.getVisibility (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/flydrive/build/drivers/s3/main.js:299:22)
      at async DriveFile.getVisibility (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/flydrive/build/chunk-TZSKXVQT.js:246:14)
      at async Attachment.computeUrl (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@jrmc/adonis-attachment/build/src/attachments/attachment_base.js:110:32)
      at async Attachment.preComputeUrl (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@jrmc/adonis-attachment/build/src/attachments/attachment.js:108:9)
      at async AttachmentManager.preComputeUrl (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@jrmc/adonis-attachment/build/src/attachment_manager.js:103:9)
      at async file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@jrmc/adonis-attachment/build/src/services/attachment/attachment_persister_service.js:62:21
      at async Promise.all (index 0)
      at async AttachmentPersisterService.preComputeUrls (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@jrmc/adonis-attachment/build/src/services/attachment/attachment_persister_service.js:56:9)
      at async AttachmentRecorderService.preComputeUrl (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@jrmc/adonis-attachment/build/src/services/attachment/attachment_recorder_service.js:59:9)
      at async afterFindHook (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@jrmc/adonis-attachment/build/src/utils/hooks.js:13:5)
      at async #exec (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@poppinss/hooks/build/index.js:114:24)
      at async ModelQueryBuilder.first (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@adonisjs/lucid/build/src/orm/query_builder/index.js:365:13)
      at async User.verifyCredentials (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@adonisjs/auth/build/src/mixins/lucid.js:40:22)
      at async AuthController.login (/home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/app/controllers/auth_controller.ts:24:20)
      at async ShieldMiddleware.handle (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@adonisjs/shield/build/chunk-2UDO3ZLM.js:28:5)
      at async SessionMiddleware.handle (/home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@adonisjs/session/src/session_middleware.ts:81:22)
      at async InertiaMiddleware.handle (file:///home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@adonisjs/inertia/build/chunk-W7TVEB4V.js:393:5)
      at async ViteMiddleware.handle (/home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@adonisjs/vite/src/vite_middleware.ts:42:5)
      at async <anonymous> (/home/hitarashi/sayeed/github/freelance/royal-jewellery/royal-jewellery/node_modules/@adonisjs/static/src/static_middleware.ts:74:11) {
    '$fault': 'server',
    '$retryable': undefined,
    '$metadata': {
      httpStatusCode: 501,
      requestId: undefined,
      extendedRequestId: undefined,
      cfId: undefined,
      attempts: 1,
      totalRetryDelay: 0
    },
    Code: 'NotImplemented'
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions