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

Analytics Record [Unhandled promise rejection: Error: No credentials, applicationId or region #6145

Closed
evanlarkin10 opened this issue Jun 23, 2020 · 7 comments
Assignees
Labels
Analytics Related to analytics duplicate If marked with duplicate, issue will be closed & original will be added for traceability React Native React Native related issue

Comments

@evanlarkin10
Copy link

evanlarkin10 commented Jun 23, 2020

Describe the bug
Analytics record function throws error:
[Unhandled promise rejection: Error: No credentials, applicationId or region]

  • node_modules/@aws-amplify/analytics/lib-esm/Providers/AWSPinpointProvider.js:173:41 in __generator$argument_1
    ......
    .....

Expected behavior
Analytics logs record event without error.

Code Snippet
Analytics.record({name: 'profileVisit',attributes: { id: marker.id }});

What is Configured?
If applicable, please provide what is configured for Amplify CLI:

  • Which resources do you have configured?
    Auth, Storage (S3) and Analytics are configured.
    • If applicable, please provide your aws-exports file:
    const awsmobile = {
     "aws_project_region": "us-east-1",
     "aws_cognito_identity_pool_id": "us-east-1:xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
     "aws_cognito_region": "us-east-1",
     "aws_user_pools_id": "us-east-1_xxxxxxxxx",
     "aws_user_pools_web_client_id": "xxxxxxxxxxxxxxxxxxxxx",
     "oauth": {},
     "aws_user_files_s3_bucket": "dinnerbellxxxxxx-dev",
     "aws_user_files_s3_bucket_region": "us-east-1",
     "aws_mobile_analytics_app_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
     "aws_mobile_analytics_app_region": "us-east-1"
    

};

Package.json
"@aws-amplify/analytics": "~3.2.1",
"@aws-amplify/api": "~3.1.9",
"@aws-amplify/auth": "~3.2.5",
"@aws-amplify/core": "~3.2.5",
"@aws-amplify/storage": "~3.2.0",

Using expo SDK 37, which uses react native 0.61

At the time of logging the analytics event, the user is authenticated with Auth.signIn().

@evanlarkin10 evanlarkin10 added the to-be-reproduced Used in order for Amplify to reproduce said issue label Jun 23, 2020
@elorzafe elorzafe added the Analytics Related to analytics label Jun 29, 2020
@elliottower
Copy link

I have gotten this same issue with trying to use analytics with auth, tried solutions from this thread (#3484) and disabling analytics fixes it, but I would like to find a real fix.

@jeffsteinmetz
Copy link

I can confirm a similar issue still. It is a plain vanilla react-native expo application, using the exact steps prior to, and up to this step in the getting started guide:
https://docs.amplify.aws/start/getting-started/auth/q/integration/react-native
relates to
#3484
package.json snippet:

    "aws-amplify": "^3.0.24",
    "aws-amplify-react-native": "^4.2.5",
    "expo": "~38.0.8",

@jpignata
Copy link

@joebernard is seeing this also on 3.3.11.

@sammartinez
Copy link
Contributor

sammartinez commented Nov 27, 2020

Hopped on a call with @joebernard and @jpignata, @joebernard is checking if pinning specific versions of the analytics package will resolve his issue.

@danielesalvatore
Copy link

+1

@sammartinez
Copy link
Contributor

Resolving as this issue as a duplicate of the above related issue.

@sammartinez sammartinez added duplicate If marked with duplicate, issue will be closed & original will be added for traceability and removed to-be-reproduced Used in order for Amplify to reproduce said issue labels Feb 9, 2021
@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 Feb 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Analytics Related to analytics duplicate If marked with duplicate, issue will be closed & original will be added for traceability React Native React Native related issue
Projects
None yet
Development

No branches or pull requests

8 participants