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

Uncaught TypeError via Buffer on import of aws-amplify #1010

Closed
anstosa opened this issue Jun 11, 2018 · 1 comment · Fixed by #1773
Closed

Uncaught TypeError via Buffer on import of aws-amplify #1010

anstosa opened this issue Jun 11, 2018 · 1 comment · Fixed by #1773
Labels
Build Related to build issues good first issue Good for newcomers

Comments

@anstosa
Copy link

anstosa commented Jun 11, 2018

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

I have a react/webpack/babel project where I'm trying to import aws-amplify. It's the first import in the entry file. It builds fine, but when run, it fails on the import line itself with a stack that ends up in buffer:

index.js:311 Uncaught TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at fromObject (index.js:311)
    at from (index.js:137)
    at new Buffer (index.js:113)
    at index.js:9
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (index.js:8)
    at Object../node_modules/browserify-sign/browser/index.js (index.js:91)
    at __webpack_require__ (bootstrap:709)
    at fn (bootstrap:94)
    at Object../node_modules/crypto-browserify/index.js (index.js:39)

What is the expected behavior?

Don't fail on import or provide more useful error. I don't see others with this problem so it must be something specific to my situation but I'm at a total loss as to where to start to debug this. Any direction?

Which versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?

amplify@0.4.4, Chrome, Ubuntu. Tried rolling back to previous amplify versions to no avail

You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Build Related to build issues good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants