Comments (13)
I believe i found the possible error in my code, I have "n-ethereum-ropsten" as the chainID and not n-ethereum-goerli,
let me change this, re-bootstrap my CDK and test
from simple-nft-marketplace.
Also, the link with the api gateway (https://APIgatewayID.execute-api.us-east-1.amazonaws.com/prod/account) returns:
{"message":"Unauthorized"}
from simple-nft-marketplace.
It seems that you are not logged in. Did you create your account first? If so, did you login to the system? Also, you can confirm your account existence on Congito on AWS Management Console. Did you provide user pool id environment variables to the frontend? Please check the above. Thanks for trying!
from simple-nft-marketplace.
Yes, I can see my created account in AWS Congito, and all 4 environment variables:
cat <<EOF > .env.local
VUE_APP_AWS_REGION=<region>
VUE_APP_API_ENDPOINT=<api-endpoint>
VUE_APP_USER_POOL_ID=<user-pool>
VUE_APP_USER_POOL_WEB_CLIENT_ID=<web-client>
EOF
... have been successfully uploaded. I know they were successful because I got an error my pool_id was not the correct len because I mixed up Pool_Id and web-client id, then the page rendered.
from simple-nft-marketplace.
Could it be a problem with my browser not allowing HTTP connects? Or with cloudfront?
from simple-nft-marketplace.
As seen above, it appears that my username is successfully being pulled from the Vue front end, however, my account is not. Im unsure how to solve this problem
from simple-nft-marketplace.
I added this snippet in view to verify my username is being pulled, however when I add the snippet seen below for my account, i get an error:
from simple-nft-marketplace.
Could it be a problem with my browser not allowing HTTP connects? Or with cloudfront?
Login request directly connect to Cognito, not via CloudFront. So that's not a problem. (Both of them are connected via HTTP"S") Additionally, your frontend was rendered correctly. So there is no problem with CloudFront.
I added this snippet in view to verify my username is being pulled
Agree
however when I add the snippet seen below for my account, i get an error
The account info is fetched by API Gateway. That means your request was stacked at here. So we should investigate why the API Gateway didn't respond correctly. The simple way to do the investigation is checking the lambda function's log.
getAccount.ts should be invoked by API Gateway when you request your account info. So go to AWS Management Console, find the getAccount
function (the name of the function is with random strings which was added by CDK. but the name contains GetAccount
prefix.), visit Monitor
tab, and click View Logs
.
If the log group exists, that means your API Gateway invoked the Lambda function correctly. If not, it was failed. Please paste your raw logs (concealing personal stuff if you need) if your could. Thanks!
from simple-nft-marketplace.
Thanks sm for the help!
Here is the log from cloudwatch:
2022-10-12T22:22:55.922-04:00 | START RequestId: 682966a4-89e4-4b01-967e-dee7f1e1f7a2 Version: $LATEST
| 2022-10-12T22:23:02.762-04:00 | 2022-10-13T02:23:02.725Z 682966a4-89e4-4b01-967e-dee7f1e1f7a2 ERROR (node:9) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use node --trace-deprecation ...
to show where the warning was created)
| 2022-10-12T22:23:02.822-04:00 | 2022-10-13T02:23:02.803Z 682966a4-89e4-4b01-967e-dee7f1e1f7a2 ERROR Invoke Error {"errorType":"Error","errorMessage":"[aws-ethjs-provider-http] CONNECTION ERROR: Couldn't connect to node 'nd-vp3yjzncinhb7dxxlxjt7r3cwe.ethereum.managedblockchain.us-east-1.amazonaws.com': {\n "message": "Header host contains invalid value",\n "code": "InvalidHeader",\n "time": "2022-10-13T02:23:02.725Z"\n}","stack":["Error: [aws-ethjs-provider-http] CONNECTION ERROR: Couldn't connect to node 'nd-vp3yjzncinhb7dxxlxjt7r3cwe.ethereum.managedblockchain.us-east-1.amazonaws.com': {"," "message": "Header host contains invalid value","," "code": "InvalidHeader","," "time": "2022-10-13T02:23:02.725Z"","}"," at Object._fireError (/var/task/index.js:29868:17)"," at sendTxCallback (/var/task/index.js:53756:26)"," at /var/task/index.js:47537:18"," at AWSHttpProvider.send (/var/task/index.js:41738:13)"," at RequestManager2.RequestManager.send (/var/task/index.js:47465:23)"," at sendRequest (/var/task/index.js:53820:41)"," at Eth2.send [as getBalance] (/var/task/index.js:53843:11)"," at Runtime.exports.handler (/var/task/index.js:118171:37)"," at processTicksAndRejections (internal/process/task_queues.js:95:5)"]}
| 2022-10-12T22:23:02.883-04:00 | END RequestId: 682966a4-89e4-4b01-967e-dee7f1e1f7a2
| 2022-10-12T22:23:02.883-04:00 | REPORT RequestId: 682966a4-89e4-4b01-967e-dee7f1e1f7a2 Duration: 6961.22 ms Billed Duration: 6962 ms Memory Size: 128 MB Max Memory Used: 116 MB Init Duration: 604.90 ms XRAY TraceId: 1-6347767f-00a8eba459f9c4d10672e483 SegmentId: 66330d305a21be2b Sampled: true
|
from simple-nft-marketplace.
So it seems it cannot connect to AMB, i did enter export AMB_HTTP_ENDPOINT='https://.ethereum.managedblockchain..amazonaws.com' (with my nodes HTTP endpoit)
from simple-nft-marketplace.
Just curious, when you change a file in /provision is there a way to avoid having to run CDK bootstrap and cdk deploy SimpleNftMarketplaceStack again?
from simple-nft-marketplace.
Changed the NetworkID accordingly, got the same error:
2022-10-12T23:44:21.616-04:00 | START RequestId: 0b6334ac-9935-414a-9ca6-2d85f4987d15 Version: $LATEST
-- | --
| 2022-10-12T23:44:28.375-04:00 | 2022-10-13T03:44:28.374Z 0b6334ac-9935-414a-9ca6-2d85f4987d15 ERROR (node:9) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use `node --trace-deprecation ...` to show where the warning was created)
| 2022-10-12T23:44:28.394-04:00 | 2022-10-13T03:44:28.394Z 0b6334ac-9935-414a-9ca6-2d85f4987d15 ERROR Invoke Error {"errorType":"Error","errorMessage":"[aws-ethjs-provider-http] CONNECTION ERROR: Couldn't connect to node 'nd-vp3yjzncinhb7dxxlxjt7r3cwe.ethereum.managedblockchain.us-east-1.amazonaws.com': {\n \"message\": \"Header host contains invalid value\",\n \"code\": \"InvalidHeader\",\n \"time\": \"2022-10-13T03:44:28.373Z\"\n}","stack":["Error: [aws-ethjs-provider-http] CONNECTION ERROR: Couldn't connect to node 'nd-vp3yjzncinhb7dxxlxjt7r3cwe.ethereum.managedblockchain.us-east-1.amazonaws.com': {"," \"message\": \"Header host contains invalid value\","," \"code\": \"InvalidHeader\","," \"time\": \"2022-10-13T03:44:28.373Z\"","}"," at Object._fireError (/var/task/index.js:29868:17)"," at sendTxCallback (/var/task/index.js:53756:26)"," at /var/task/index.js:47537:18"," at AWSHttpProvider.send (/var/task/index.js:41738:13)"," at RequestManager2.RequestManager.send (/var/task/index.js:47465:23)"," at sendRequest (/var/task/index.js:53820:41)"," at Eth2.send [as getBalance] (/var/task/index.js:53843:11)"," at Runtime.exports.handler (/var/task/index.js:118171:37)"," at processTicksAndRejections (internal/process/task_queues.js:95:5)"]}
| 2022-10-12T23:44:28.414-04:00 | END RequestId: 0b6334ac-9935-414a-9ca6-2d85f4987d15
| 2022-10-12T23:44:28.414-04:00 | REPORT RequestId: 0b6334ac-9935-414a-9ca6-2d85f4987d15 Duration: 6798.28 ms Billed Duration: 6799 ms Memory Size: 128 MB Max Memory Used: 116 MB Init Duration: 577.42 ms XRAY TraceId: 1-63478994-4ddcfbbf6d0b5abc6940321b SegmentId: 6a8bbd2c4ed8fa7e Sampled: true
from simple-nft-marketplace.
"errorType": "Error",
"errorMessage": "[aws-ethjs-provider-http] CONNECTION ERROR: Couldn't connect to node 'nd-_nodeID.ethereum.managedblockchain.us-east-1.amazonaws.com': {\n "message": "Header host contains invalid value",\n "code": "InvalidHeader",\n "time": "2022-10-23T17:20:07.087Z"\n}",
from simple-nft-marketplace.
Related Issues (10)
- Prepare English docs
- Handling of private keys HOT 1
- Migrate to CDK 2.x HOT 1
- issue regarding no show for account details HOT 3
- "errorType": "TypeError", "errorMessage": "Cannot read property 'authorizer' of undefined", "trace": [ "TypeError: Cannot read property 'authorizer' of undefined", HOT 3
- Create blockchain node with CDK HOT 1
- Upgrade to Goerli HOT 2
- Insufficient funds HOT 7
- Add automation to steps
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-nft-marketplace.