AnomalyInnovations / serverless-stack-demo-client

Source for the demo app client in the Serverless Stack Guide
https://demo2.serverless-stack.com
MIT License
635 stars 204 forks source link

TypeError: __WEBPACK_IMPORTED_MODULE_3__sigV4Client__.a.newClient(...).signRequest is not a function #17

Open bencarlson opened 6 years ago

bencarlson commented 6 years ago

Several people are getting this error, but have opened the issue under the wrong project:

https://github.com/AnomalyInnovations/serverless-stack-com/issues/114

TypeError: WEBPACK_IMPORTED_MODULE_3__sigV4Client.a.newClient(...).signRequest is not a function

I've confirmed that my awsLib.js and sigV4Client.js are identical to the source in github. This issue seems to only occur upon login. If I reload the page (hard refresh) the homepage with items renders just fine. I'm guessing it has something to do with the proximity of the AWS call to Lambda, and the login/authentication?

I'm not finding a resolution - any ideas?

jayair commented 6 years ago

@bencarlson Can I try it in your project? Link me to your repo or upload it. I'd like to see what is going on.

bencarlson commented 6 years ago

It's in a private Bitbucket repo... I've emailed it to you at: contact at anoma dot ly.

sanjosedennis7593 commented 6 years ago

I'm also getting that kind of error, i found out that invokeApiG function needed some credentials to execute the function.

In my case, what i'm trying to do here is after entering the confirmation code in the registration process, i add some function that will trigger a lambda function that will save user's additional information to dynamodb. This function that i've made works, it saves the information to the dynamodb, unfortunately, the error will be displayed, but if i refreshed the page, the error message will be gone and display the page that is intended to be shown.

I found out that in the sigV4Client file, i console the config.accessKey and config.secretKey it returns an undefined value.

bencarlson commented 6 years ago

@sanjosedennis7593 Dennis, that's pretty much exactly what I'm trying to do!

  1. User signs up
  2. User clicks email verification link
  3. User loads login page
  4. User enters credentials and submits
  5. Upon submission, user is logged in, and I fire a invokeApiG() call to create a user DB entry in DynamoDB for storing misc data. When this fires, the error shows up. Reloading the page resolves the issue.

-Ben

forste commented 6 years ago

They have posted a fix here: https://github.com/AnomalyInnovations/serverless-stack-com/issues/113#issuecomment-346095708