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.

AuthClass - getting session failed: "No userPool"

See original GitHub issue

** Which Category is your question related to? ** Auth/Cognito/Storage ** What AWS Services are you utilizing? ** Auth/Cognito/Storage ** Provide additional details e.g. code snippets ** I’m fairly new to AWS and am having some issues. Currently when logging into our app the user has the ability to view and upload files to our S3 bucket using Storage.put(). When closing and reopening the app, although the user appears to be signed in, they no longer have the ability to view or upload the files. When trying to upload, an Access Denied error is thrown.

It seems that the session isn’t persisting after closing and reopening, and logs this:

[DEBUG] 23:00.862 AuthClass - getting current authenticted user [DEBUG] 23:00.866 AuthClass - cannot load federated user from auth storage [DEBUG] 23:00.866 AuthClass - get current authenticated userpool user [DEBUG] 23:00.875 AuthClass - getting session failed: "No userPool"} [DEBUG] 23:00.885 Credentials - setting credentials for guest

Logging out, then back in fixes it, and the user is able to view and upload files again. We’re using the withAuthenticator HOC: export default withAuthenticator(App, false, [ <SignIn />, <ConfirmSignIn />, <VerifyContact />, <RequireNewPassword />, <ForgotPassword /> ]);

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jitsunencommented, Dec 6, 2018

@Evokator , in case you have configured your user pool properly and your app suddenly stopped working, upgrade your aws-amplify and aws-amplify-react to latest versions. I had a similar problem yesterday and upgrading to latest solved the issue.

0reactions
github-actions[bot]commented, Jun 13, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No current user for authenticated user in Amplify
The error is literally saying No current user - you need to sign in using the supported identity ...
Read more >
https://unpkg.com/@aws-amplify/auth@4.1.2/src/Auth.ts
userPool.getCurrentUser(); if (!user) { logger.debug('Failed to get user from user pool'); rej('No current user'); return; } const clientMetadata = this.
Read more >
Authentication - Sign up, Sign in & Sign out - JavaScript
Create a new user in the Amazon Cognito UserPool by passing the new user's email address, password, and other attributes to Auth.signUp ....
Read more >
AWS-Amplify/Lobby - Gitter
what am I missing here? ... Error: Missing region in config at Request. ... [DEBUG] 46:56.905 AuthClass - get current authenticated userpool user...
Read more >
Use existing Cognito resources for your Amplify API, Storage ...
Make sure your Cognito User Pool has at least two app clients with the following configuration: one app client without a client secret;...
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