AWSPinpointProvider error when executing GraphQL operations on project without Analytics category
See original GitHub issueThere seems to be changes introduced in aws-amplify
that causes AWS PinPoint code to execute when doing GraphQL operations even though Analytics is not added to the Amplify project.
The error happens when executing GraphQL operations server side (TypeScript)
Error: No credentials, applicationId or region
at AWSPinpointProvider.<anonymous> (C:\Users\meiri\dev\betterbook\betterbook-backend\node_modules\@aws-amplify\analytics\src\Providers\AWSPinpointProvider.ts:159:36)
at step (C:\Users\meiri\dev\betterbook\betterbook-backend\node_modules\@aws-amplify\analytics\lib\Providers\AWSPinpointProvider.js:40:23)
at Object.next (C:\Users\meiri\dev\betterbook\betterbook-backend\node_modules\@aws-amplify\analytics\lib\Providers\AWSPinpointProvider.js:21:53)
at fulfilled (C:\Users\meiri\dev\betterbook\betterbook-backend\node_modules\@aws-amplify\analytics\lib\Providers\AWSPinpointProvider.js:12:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
This started happening after upgrading my project to the latest versions, although I’m not sure which package causes the issue. (This also relates to #3486 that happens after the version upgrade, I added the workaround polyfill as suggested there and now this happens.
Environment:
node 10.16.0 amplify 1.7.4
"dependencies": {
"@aws/dynamodb-batch-iterator": "^0.7.1",
"@sentry/browser": "^5.4.0",
"@sentry/node": "4.4.2",
"@types/aws-lambda": "^8.10.27",
"@types/babel__traverse": "^7.0.7",
"@types/yargs": "^13.0.0",
"amazon-cognito-auth-js": "^1.3.2",
"amazon-cognito-identity-js": "^3.0.12",
"apollo-cache-inmemory": "^1.6.2",
"aws-amplify": "^1.1.29",
"aws-appsync": "^1.8.0",
"aws-lambda-multipart-parser": "^0.1.3",
"aws-sdk": "^2.474.0",
"aws4": "^1.8.0",
"axios": "^0.18.1",
"axios-es6": "^0.11.1",
"bcrypt-nodejs": "^0.0.3",
"blueimp-md5": "^2.10.0",
"body-parser": "^1.19.0",
"cryptr": "^4.0.2",
"errorhandler": "^1.5.1",
"es6-promise": "^4.2.8",
"form-data": "^2.3.2",
"google-libphonenumber": "^3.2.2",
"graphql-tag": "^2.10.1",
"handlebars": "^4.1.2",
"isomorphic-fetch": "^2.2.1",
"jsonwebtoken": "^8.5.1",
"jwk-to-pem": "^2.0.1",
"lodash": "^4.17.11",
"node-cmd": "^3.0.0",
"node-fetch": "^2.6.0",
"node-jose": "^1.1.3",
"qs": "^6.7.0",
"request": "^2.88.0",
"tabletop": "^1.5.2",
"uuid": "^3.3.2",
"ws": "^7.0.0"
},
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Error handling - Apollo GraphQL Docs
The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run.
Read more >Resolve unauth errors for GraphQL requests in AWS AppSync
I receive "Unauthorized" errors when I run GraphQL requests with AWS AppSync. How do I troubleshoot these errors?
Read more >API (GraphQL) - Getting started - Swift - AWS Amplify Docs
Learn more about how to get started with Amplify's API category - Swift - AWS ... in the backend, go to your project...
Read more >GraphQL API style guide - GitLab Docs
Schema items marked as alpha are exempt from the deprecation process, and can be removed or changed at any time without notice. Global...
Read more >GraphQL vs. REST APIs: Why you shouldn't use GraphQL
As a query language for APIs, GraphQL gives clients the power to execute queries to get exactly what they need. But, what if...
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
When using AWS Amplify CLI (or MobileHub), the configuration is contained in the auto-generated aws-exports.js.
Seeing these PinPoint issues re-appearing from time to time, maybe Amplify-CLI could add the Analytics: { disabled: true } iff the CLI has not added the Analytics service.
In the meantime,
Fixes the issue.