Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 Client not working with next@14.1.3 #5925

Closed
3 tasks done
coronapl opened this issue Mar 20, 2024 · 4 comments
Closed
3 tasks done

S3 Client not working with next@14.1.3 #5925

coronapl opened this issue Mar 20, 2024 · 4 comments
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.

Comments

@coronapl
Copy link

Checkboxes for prior research

Describe the bug

When using the S3Client with next@14.1.3 we get the following error:
TypeError: endpointFunctions[fn] is not a function following a long error message related to the package @smithy+util-endpoints@1.2.0. We tried pinning the version of this package, but no success.

There is another old issue related to this problem #5435, but the recommended solution is not working anymore. Please see the last comments.

SDK version number

@aws-sdk/client-s3@3.537.0

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v18.19.0

Reproduction Steps

@janvorwerk created this repo https://github.com/janvorwerk/aws-s3-demo to reproduce the error.

Observed Behavior

TypeError: endpointFunctions[fn] is not a function
    at callFunction (webpack-internal:///(rsc)/../../node_modules/.pnpm/@smithy+util-endpoints@1.2.0/node_modules/@smithy/util-endpoints/dist-cjs/index.js:271:31)
    at evaluateCondition (webpack-internal:///(rsc)/../../node_modules/.pnpm/@smithy+util-endpoints@1.2.0/node_modules/@smithy/util-endpoints/dist-cjs/index.js:280:17)
    at evaluateConditions (webpack-internal:///(rsc)/../../node_modules/.pnpm/@smithy+util-endpoints@1.2.0/node_modules/@smithy/util-endpoints/dist-cjs/index.js:293:34)
    at evaluateTreeRule (webpack-internal:///(rsc)/../../node_modules/.pnpm/@smithy+util-endpoints@1.2.0/node_modules/@smithy/util-endpoints/dist-cjs/index.js:412:39)
    at evaluateRules (webpack-internal:///(rsc)/../../node_modules/.pnpm/@smithy+util-endpoints@1.2.0/node_modules/@smithy/util-endpoints/dist-cjs/index.js:433:35)
    at evaluateTreeRule (webpack-internal:///(rsc)/../../node_modules/.pnpm/@smithy+util-endpoints@1.2.0/node_modules/@smithy/util-endpoints/dist-cjs/index.js:416:10)
    at evaluateRules (webpack-internal:///(rsc)/../../node_modules/.pnpm/@smithy+util-endpoints@1.2.0/node_modules/@smithy/util-endpoints/dist-cjs/index.js:433:35)
    at resolveEndpoint (webpack-internal:///(rsc)/../../node_modules/.pnpm/@smithy+util-endpoints@1.2.0/node_modules/@smithy/util-endpoints/dist-cjs/index.js:462:20)
    at Object.defaultEndpointResolver [as endpointProvider] (webpack-internal:///(rsc)/../../node_modules/.pnpm/@aws-sdk+client-s3@3.537.0/node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js:11:83)
    at getEndpointFromInstructions (webpack-internal:///(rsc)/../../node_modules/.pnpm/@smithy+middleware-endpoint@2.5.0/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js:127:33)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async eval (webpack-internal:///(rsc)/../../node_modules/.pnpm/@smithy+middleware-endpoint@2.5.0/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js:167:22)
    at async eval (webpack-internal:///(rsc)/../../node_modules/.pnpm/@aws-sdk+middleware-sdk-s3@3.535.0/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:97:20)
    at async eval (webpack-internal:///(rsc)/../../node_modules/.pnpm/@aws-sdk+middleware-sdk-s3@3.535.0/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js:120:14)
    at async eval (webpack-internal:///(rsc)/../../node_modules/.pnpm/@aws-sdk+middleware-logger@3.535.0/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:33:22)
    at async Module.create (webpack-internal:///(rsc)/../../packages/core/src/domains/patient.ts:35:26)
    at async createPatient (webpack-internal:///(rsc)/./app/actions.ts:35:9)
    at async /Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:39:406
    at async t2 (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:38:6412)
    at async rS (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:41:1369)
    at async doRender (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js:1376:30)
    at async cacheEntry.responseCache.get.routeKind (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js:1537:28)
    at async DevServer.renderToResponseWithComponentsImpl (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js:1445:28)
    at async DevServer.renderPageComponent (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js:1842:24)
    at async DevServer.renderToResponseImpl (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js:1880:32)
    at async DevServer.pipeImpl (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js:893:25)
    at async NextNodeServer.handleCatchallRenderRequest (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/next-server.js:269:17)
    at async DevServer.handleRequestImpl (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/base-server.js:789:17)
    at async /Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/next-dev-server.js:331:20
    at async Span.traceAsyncFn (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/trace/trace.js:151:20)
    at async DevServer.handleRequest (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/dev/next-dev-server.js:328:24)
    at async invokeRender (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js:174:21)
    at async handleRequest (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js:353:24)
    at async requestHandlerImpl (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/router-server.js:377:13)
    at async Server.requestListener (/Users/pablovc/Documents/caremates-app/node_modules/.pnpm/next@14.1.3_@babel+core@7.24.0_react-dom@18.2.0_react@18.2.0/node_modules/next/dist/server/lib/start-server.js:140:13)

Expected Behavior

Get object from S3 bucket.

Possible Solution

No response

Additional Information/Context

No response

@coronapl coronapl added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 20, 2024
@kuhe kuhe self-assigned this Mar 21, 2024
@RanVaknin
Copy link
Contributor

Hi @coronapl ,

Thanks for opening this separate issue. We are looking into this.
All the best,
Ran~

@RanVaknin RanVaknin added p2 This is a standard priority issue queued This issues is on the AWS team's backlog and removed needs-triage This issue or PR still needs to be triaged. labels Mar 21, 2024
@kuhe
Copy link
Contributor

kuhe commented Mar 22, 2024

After this PR #5933 makes it into the release notes, which is expected to be in 5-6 hours from now as v3.540.0, please give it another try.

@kuhe kuhe added pending-release This issue will be fixed by an approved PR that hasn't been released yet. and removed queued This issues is on the AWS team's backlog labels Mar 22, 2024
@janvorwerk
Copy link

@kuhe it works for me! Great job 🚀👌🙏

@kuhe kuhe closed this as completed Mar 29, 2024
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. p2 This is a standard priority issue pending-release This issue will be fixed by an approved PR that hasn't been released yet.
Projects
None yet
Development

No branches or pull requests

4 participants