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

No Auth module registered in Amplify when try to use Storage.get #1977

Closed
lisandrolan opened this issue Oct 24, 2018 · 5 comments
Closed

No Auth module registered in Amplify when try to use Storage.get #1977

lisandrolan opened this issue Oct 24, 2018 · 5 comments
Labels
Auth Related to Auth components/category Storage Related to Storage components/category

Comments

@lisandrolan
Copy link

Describe the bug
Im getting the error
No Auth module registered in Amplify
When Im doing the following call
Storage.get( 'images/1540344600001.JPEG', { level: 'protected' })
.then(result => resolve( result))
.catch(err => console.log(err));
;
I am already logged in and when I verify with
await Amplify.Auth.currentAuthenticatedUser().then(response=>console.log(response))

I get the propper user information

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

You can turn on the debug mode to provide more info for us by setting window.LOG_LEVEL = 'DEBUG'; in your app.
ConsoleLogger.js:84 [DEBUG] 18:00.886 Credentials - getting credentials
12:18:00.886 ConsoleLogger.js:84 [DEBUG] 18:00.886 Credentials - picking up credentials
12:18:00.887 ConsoleLogger.js:84 [DEBUG] 18:00.887 Credentials - getting new cred promise
12:18:00.888 ConsoleLogger.js:84 [DEBUG] 18:00.888 Credentials - checking if credentials exists and not expired
12:18:00.890 ConsoleLogger.js:84 [DEBUG] 18:00.890 Credentials - need to get a new credential or refresh the existing one

@nidsharm nidsharm added Auth Related to Auth components/category Storage Related to Storage components/category labels Oct 24, 2018
@powerful23
Copy link
Contributor

@lisandrolan can you provide the code snippet about how you are importing and using Amplify? The error usually happens when you are using modularized libraries and didn't import them in a correct order.

@mriccid
Copy link

mriccid commented Oct 25, 2018

I've had similar problems caused by modular imports and managed to get around it by configuring the module then registering it with the Amplify singleton using this method.

@lisandrolan
Copy link
Author

The problem was related to AWS-SDK previous instalation.
What I did was delete all the node_modules folders. and then npm install again

@nidsharm
Copy link

Closing the issue, as the problem is resolved. Please feel free to re-open if the issue persists.

@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
Auth Related to Auth components/category Storage Related to Storage components/category
Projects
None yet
Development

No branches or pull requests

4 participants