New WARNING coming from Amplify
See original GitHub issueDescribe the bug My AWS project uses aws-amplify/auth (1.0.8) and aws-amplify/analyics (1.0.9) and we’re getting a new warning message output into our test runs. This is slowing down the test runs quite a but.
console.warn node_modules/@aws-amplify/core/lib/Logger/ConsoleLogger.js:78
[WARN] 23:50.92 Hub - WARNING onHubCapsule is Deprecated. Please pass in a callback.
Expected behavior Since this warning is thrown from within amplify packages, I would assume that the packages need to be updated to no longer throw this warning internally.
Desktop (please complete the following information):
- OS: MacOs
- command line
Sample code
import { AnalyticsData } from "./types";
import Analytics from "@aws-amplify/analytics";
const context: { [s: string]: string } = {};
export const addAnalyticsContext = (newContext: { [s: string]: string }) => {
Object.assign(context, newContext);
};
export const logAnalytics = (analyticsData: AnalyticsData, metrics?: Record<string, number>) => {
const { name, ...attributes } = analyticsData;
Analytics.record({ name, attributes: { ...context, ...attributes }, metrics });
};
and
import Auth from "@aws-amplify/auth";
import Analytics from "@aws-amplify/analytics";
import { getClientConfig } from "common/clientConfig";
import { addAnalyticsContext } from "common/analytics";
import { getUserId } from "common/utils/authUtils";
export const analyticsInit = () => {
const analyticsConfig = getClientConfig().analytics;
if (analyticsConfig) {
const authConfig = { identityPoolId: analyticsConfig.identityPoolId, region: analyticsConfig.identityPoolRegion };
const pinpointConfig = { appId: analyticsConfig.pinpointAppId, region: analyticsConfig.pinpointRegion };
Auth.configure(authConfig);
Analytics.configure(pinpointConfig);
addAnalyticsContext({ beehiveId: getUserId() });
}
};
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Notifications - AWS Amplify Hosting
You can set up notifications for an AWS Amplify app to alert stakeholders or team members when a build succeeds or fails. Amplify...
Read more >Project-level configurations - Troubleshooting guide
Warning: Once an application is deployed to the cloud using Amplify CLI the cloud resources like DynamoDB tables, Cognito Roles, or IAM policies...
Read more >6–8 Science Curriculum - Phenomena Based ... - Amplify
... and real-world problems, develop and strengthen claims by collecting evidence and testing assumptions, and apply their learning in new contexts.
Read more >Trying to get the Amplify CI/CD release process to deploy to a ...
2022-04-06T17:58:02.363Z [WARNING]: - Building resource api/myapi 2022-04-06T17:58:13.032Z [INFO]: GraphQL schema compiled successfully. Edit ...
Read more >FEMA Integrated Public Alert and Warning Systems (IPAWS)
Weekly editorial newsletter covering the latest content, events and more taking place on NAB Amplify. Subscribe. © 2022 National Association of Broadcasters ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No. It’s not by design. Please read my whole ticket. I’m not using onHubCapsule, amplify/auth is. This warning spits out thousands of times when we run your code.
@jkeys-ecg-nmsu,
I noticed that as well. Looks like the UI components have not yet been refactored for the Hub change. We will prioritize this refactor next week.