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

[Edge] @aws-sdk/client-dynamodb throws error in edge runtime #49144

Closed
1 task done
agadzik opened this issue May 3, 2023 · 1 comment · Fixed by facebook/react#26771
Closed
1 task done

[Edge] @aws-sdk/client-dynamodb throws error in edge runtime #49144

agadzik opened this issue May 3, 2023 · 1 comment · Fixed by facebook/react#26771
Labels
bug Issue was opened via the bug report template.

Comments

@agadzik
Copy link
Contributor

agadzik commented May 3, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 21.6.0: Mon Dec 19 20:43:09 PST 2022; root:xnu-8020.240.18~2/RELEASE_ARM64_T6000
    Binaries:
      Node: 16.14.0
      npm: 8.12.1
      Yarn: 1.22.19
      pnpm: 7.29.0
    Relevant packages:
      next: 13.3.5-canary.5
      eslint-config-next: 13.3.4
      react: 18.2.0
      react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue

https://github.com/uncurated-tests/next-aws-sdk-edge

To Reproduce

  1. Navigate to https://next-aws-sdk-edge.vercel.app/node
  2. Verify that count of dynamodb tables is greater than 0 (working)
  3. Navigate to https://next-aws-sdk-edge.vercel.app/ (this page is an edge runtime page)
  4. Verify that count of dynamodb tables is 0 (not working)

Describe the Bug

My edge function fails to fetch data from DynamoDB and when I look at the logs I see this error

TypeError: This ReadableStream is disturbed (has already been read from), and cannot be used as a body.
    at (node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/compiled/react/cjs/react.shared-subset.production.min.js:11:247)
    at (node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/esm/server/lib/patch-fetch.js:204:0)
    at (node_modules/.pnpm/[email protected]_biqbaboplfbrettd7655fr4n2y/node_modules/next/dist/esm/server/lib/patch-fetch.js:307:0)

Expected Behavior

The edge function should successfully fetch data from DynamoDB

Which browser are you using? (if relevant)

Chrome 112.0.5615.137

How are you deploying your application? (if relevant)

Vercel

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2023

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant