question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Misleading error message - Cannot read property 'byteLength' of undefined

See original GitHub issue

Describe the bug

The exception Cannot read property 'byteLength' of undefined is thrown by a client instance in many cases, but, as pointed out in https://github.com/aws/aws-sdk-js-v3/issues/2411#issuecomment-864127937, the problem might be, that keys in the credentials object are spelled in PascalCase, instead of camelCase.

I just had the same problem, and this was indeed what caused it. What makes it worse is the fact, that in the SDK Reference, lower-case properties marked as readonly, so you would never think to dig in that direction.

Your environment

SDK version number

@aws-sdk/client-s3@v3, @aws-sdk/lib-storage@v3

Is the issue in the browser/Node.js/ReactNative?

Browser

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
AllanZhengYPcommented, Aug 15, 2022

Removing the needs-review because we know it requires a better error message. But it’s not blocking customer from making request to AWS services. We will implement a fix soon.

0reactions
github-actions[bot]commented, Sep 15, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'byteLength' of undefined
I am using Kinesis with v3 nodejs. Error TypeError: Cannot read property 'byteLength' of undefined at Object.
Read more >
Cannot read property 'byteLength' of undefined - AWS S3 ...
I got this error in a React Native app. I was able to fix it by turning off my Dev Tools network inspector....
Read more >
aws/aws-sdk-js-v3 - Gitter
I am converting AWS Polly code in Javascript (node) from v2 to v3. ... TypeError: Cannot read property 'byteLength' of undefined at Object....
Read more >
TypeError: Cannot read property 'byteLength' of undefined
I got this error in a React Native app. I was able to fix it by turning off my Dev Tools network inspector....
Read more >
cannot read properties of undefined (reading 'buffer') - You.com
The error says: TypeError: Cannot read properties of undefined (reading 'VERTEX_SHADER') and seems to be caused by this line: this.loaded.load({ webgl, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found