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.

Analytics has not been configured

See original GitHub issue

Describe the bug When using an oauth configured auth(), it fires this exception. It was working fine a few days ago.

To Reproduce Steps to reproduce the behavior:

  1. aws-amplify@^1.1.26
  2. configure it with oauth for a federatedSignIn
  3. do the federatedSignIn, get access_token
  4. See error

Expected behavior Using the access_token from URL, automatically creating a session.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 1.1.26

Sample code

    // REQUIRED only for Federated Authentication - Amazon Cognito Identity Pool ID
    identityPoolId: environment.cognito.identityPoolId,
    // REQUIRED - Amazon Cognito Region
    region: environment.cognito.region,
    // OPTIONAL - Amazon Cognito User Pool ID
    userPoolId: environment.cognito.userPoolId,
    // OPTIONAL - Amazon Cognito Web Client ID (26-char alphanumeric string)
    userPoolWebClientId: environment.cognito.userPoolWebClientId,
    // OPTIONAL - Enforce user authentication prior to accessing AWS resources or not
    mandatorySignIn: true,
    oauth: {
        domain: "xxxxxxxxx.auth.eu-west-1.amazoncognito.com",
        scope: ['email', 'profile', 'openid'],
        redirectSignIn: encodeURIComponent(window.location.href),
        redirectSignOut: encodeURIComponent(window.location.href),
        responseType: 'token',
        options: {
            AdvancedSecurityDataCollectionFlag: false
        }
    }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

10reactions
CaryLandholtcommented, Apr 16, 2019

Found a way to disable Analytics and prevent that exception.

import { Analytics } from 'aws-amplify'

Analytics.configure({ disabled: true })
1reaction
Chibuzor44commented, Aug 19, 2020

@CaryLandholt your solution rescued me, thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

[GA4] Troubleshoot tag setup on your website - Analytics Help
You may not see data from your website in Google Analytics for the following reasons: ... The GA4 Configuration tag has not been...
Read more >
Why Your Google Analytics Isn't Working (and How to Fix It)
1. Your Google Analytics tracking code is not implemented correctly · 2. You're not tracking the correct property or view · 3. You've...
Read more >
Configure Analytics data collection and usage - Firebase
Configure the use of Analytics data​​ If you have linked your Google Analytics project to an ads account or otherwise enabled an ads...
Read more >
Google Analytics not working? Here are 21 ways to fix it
Google Analytics not working? Here are 21 ways to fix it. #1 Delete and Disable the cache #2 Use Google Tag Assistant and...
Read more >
29 Common Google Analytics Data Errors And How To Fix Them
Google Analytics data not showing all traffic or no view data? Here's why your data is wrong and how to fix the most...
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