Amplify-js: RN [Analytics] multiple bugs - updateEndpoint, callable, putEvents

Created on 25 Oct 2019  路  5Comments  路  Source: aws-amplify/amplify-js

Describe the bug
I keep getting this errors while using analytics
TypeError: Cannot read property 'updateEndpoint' of undefined
TypeError: constructor is not callable
TypeError: Cannot read property 'putEvents' of undefined

To Reproduce

Analytics.record({
  name: 'GraphQLError',
  attributes: {
    errorName: error.name,
    errorMessage: error.message,
    errorPath: error.path,
  }
})

```js
Analytics.updateEndpoint({
userId: xxx-xxx-xxx,
address: token,
optOut: 'NONE',
channelType
})


**Smartphone (please complete the following information):**
```json
    "aws-amplify": "^1.2.3",
    "aws-amplify-react-native": "^2.2.3",
    "aws-appsync": "^2.0.1",
    "aws-appsync-react": "^2.0.1",
    "react": "^16.11.0",
    "react-native": "^0.61.2",
React Native bug

Most helpful comment

@rainflute yarn add [email protected] or npm install [email protected]

All 5 comments

@usmansbk, I pushed a quick fix for this which is now published to unstable, can you please test it with this version(unstable tag) and let us know if it solved this issue?

@Amplifiyer now it's working as expected. Thanks.

@usmansbk Can you please show us how to pull the unstable branch with npm install?

@rainflute yarn add [email protected] or npm install [email protected]

@rainflute yarn add [email protected] or npm install [email protected]

Thanks. It's working now. This bug got me so frustrated for the last two days. I thought it was something wrong with my AWS setup

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rygo6 picture rygo6  路  3Comments

DougWoodCDS picture DougWoodCDS  路  3Comments

guanzo picture guanzo  路  3Comments

karlmosenbacher picture karlmosenbacher  路  3Comments

ddemoll picture ddemoll  路  3Comments