Closed Stivenmore closed 1 year ago
Hey @Stivenmore thanks for posting this issue.
Let's clarify these points so we can help you better:
1) Can you please confirm you are using 0.6.1 and not the next version of Amplify (ie. ^1.0.0-next.1)
2) Can you please provide code snippets of you sending the event. Also how do you send the event in relation to the app onPause?
3) In your tests do you run the app after the pause state. The app must be unpaused for events to be sent.
4) Have you tried sending custom events with a simple case, like calling Amplify.recordEvent when your app first starts up?
5) Lastly you said you have the issue on iOS and Android but you also mention Windows 11 as a device. Is that a typo or are you on the next version of Amplify testing on Windows platform as well?
flushEvents is needed for your events to be sent to Pinpoint. This is called automatically every 10/15 seconds but you can call it manually as well.
Hi @Stivenmore - Have you had a chance to look at the questions above?
Hi @Stivenmore - Do you have any updates for this issue?
Description
Custom events logged to pinpoint do not appear. No errors are thrown and Amplify is correctly being configured. I am using Cognito, storage_s3, amplify_api.
Categories
Steps to Reproduce
It does not show an error or anything like that, but the events are not reflected either.
Screenshots
No response
Platforms
Android Device/Emulator API Level
No response
Environment
Dependencies
Device
Xiaomi Redmi Note 8
OS
Windows 11
Deployment Method
Amplify CLI
CLI Version
2.0
Additional Context
No response
Amplify Config
const awsGlobalConfig = { 'UserAgent': 'aws-amplify-cli/2.0', 'Version': '1.0', ...authConfig, ...apiConfig, ...storageConfig, ...analyticsConfig, };
const authConfig = { 'auth': { 'plugins': { 'awsCognitoAuthPlugin': { 'IdentityManager': {'Default': {}}, 'CredentialsProvider': { 'CognitoIdentity': { 'Default': { 'PoolId': Environment.awsIdentityPoolId, 'Region': Environment.awsRegion, } } }, 'CognitoUserPool': { 'Default': { 'PoolId': Environment.awsPoolId, 'AppClientId': Environment.awsPoolClientId, 'Region': Environment.awsRegion } }, 'Auth': { 'Default': { 'authenticationFlowType': 'USER_SRP_AUTH', 'socialProviders': [], 'usernameAttributes': ['EMAIL'], 'signupAttributes': ['EMAIL', 'SMS'], 'passwordProtectionSettings': { 'passwordPolicyMinLength': 8, 'passwordPolicyCharacters': [] }, 'mfaConfiguration': 'ON', 'mfaTypes': ['SMS'], 'verificationMechanisms': ['EMAIL'] } }, } } } };
const apiConfig = { 'api': { 'plugins': { 'awsAPIPlugin': { 'apix': { 'endpointType': 'GraphQL', 'endpoint': Environment.awsGraphqlEndpoint, 'region': Environment.awsRegion, 'authorizationType': 'AMAZON_COGNITO_USER_POOLS', } } } } };
const storageConfig = { 'storage': { 'plugins': { 'awsS3StoragePlugin': { 'bucket': Environment.awsBucketS3, 'region': Environment.awsRegion } } } };
const analyticsConfig = { 'analytics': { 'plugins': { 'awsPinpointAnalyticsPlugin': { 'pinpointAnalytics': { 'appId': Environment.awsPinpointIdProject, 'region': Environment.awsRegion, }, 'pinpointTargeting': { 'region': Environment.awsRegion, }, 'autoFlushEventsInterval': 10000 } } } };