Misleading error message - Cannot read property 'byteLength' of undefined
See original GitHub issueDescribe 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:
- Created 2 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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.