-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Authorization for Analytics fails with "No userpool" #229
Comments
@floric are you using react native or web/js? If React Native, you need to update imports to import from 'aws-amplify' no long er 'aws-amplify-react-native' (this is only for HOCs and components now). Also, if in an existing project you may need to delete your node_modules and |
Hey, sorry for missing the information: building a web SPA with "aws-amplify@0.2.3" using Yarn, also double checked this already (looking into the yarnlock and the node_modules folder) I debugged the code as described above. Might be important as well, that in Auth in "essentialCredentials(credentials)", credentials is null and so credentials.accesskeyId will lead to an exception. |
We have seen some issues with yarn that we are looking into still, can you give npm install a try just to eliminate this possibility? |
Of course :) Tested using NPM 5.3. |
Are you including the aws-js-sdk in your project as well? If so, can you verify the version you have in node_modules |
aws-sdk: It's not part of my package.json but 2.177.0 is included in Yarn as well as NPM. Should be enough, right? |
Yes that's right I just wanted to make sure that was the version since the later one has a breaking change with the cognito library. |
Did you create your backend through Mobile Hub or via the awsmobile-cli? Or did you manually setup your resources? |
At first I manually integrated aws-amplify based on the manual instructions and an existing project. |
I'm still having this "credentials.accesskeyId" being undefined problem. It started with APIs I created myself through the command line and now it continues with an imported cloud logic service created outside of Mobile Hub. I haven't successfully connected to any API. First I a warning about it in the console and then I directly tried to run Auth.essentialCredentials() and got an unhandled promise warning because credentials.accesskeyId undefined is not an object. This is all post-logging in. Amplify 0.2.6 |
Try checking for duplicate node_modules installations. check for node_modules in the library aws-amplify-react and if it's there, delete it |
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 |
Hey,
I currently tried to upgrade from 0.1.x to 0.2.3 (also tried 2.0.0).
Unfortunately, the logging of metrics to Pinpoint doesn't work anymore. Somehow the initialization of Analytics fails already.
In "currentUserCredentials()" it rejects the "currentUser()" in Auth.ts promise with "No userPool". This will lead to "credentialsOK" in Analytics.ts to be false and so prevent Mobile Analytics and Pinpoint from getting initialized. But I'd like to collect metrics for unauthorized users of course and so I think I don't need a user pool for this.
Is this an expected behavior? There is no error output in the console.
I also double checked the configuration and it worked before the same in 0.1.x.
Thanks :)
Florian
The text was updated successfully, but these errors were encountered: