Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

./two_factor.sh generates TypeError: Cannot read property 'set' of undefined #87

Open
aram535 opened this issue Oct 19, 2020 · 0 comments

Comments

@aram535
Copy link

aram535 commented Oct 19, 2020

Your Environment Information ---------------------------
Operating System: linux
Node Version: 14.13.1
Framework Version: 2.8.0
Plugin Version: 4.1.1
SDK Version: 2.3.2
Components Version: 3.2.4

$ ./two_factor.sh Please provide the e-mail of the user you want to setup 2FA for: [email protected] Serverless: Configuration warning: Serverless: at root: unrecognized property 'default_cors' Serverless: at 'service': unrecognized property 'tableDeletionPolicy' Serverless: at 'functions.login.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.prelogin.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.profile.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.profile_put.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.keys.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.register.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.accounts_revision_date.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.device_push_token.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.sync.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.cipher_post.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.cipher_put.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.cipher_delete.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.folder_post.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.folder_put.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.folder_delete.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.import.events[0].http.cors': unrecognized property 'allowMethods' Serverless: at 'functions.default.events[0].http.cors': unrecognized property 'allowMethods' Serverless: Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation Serverless: "ERROR: TypeError: Cannot read property 'set' of undefined" Copy the URL above into your browser, scan the QR code in your authenticator app, and enter a code once to verify:

I'm not sure if the default_cors definition is causing the TypeError in the serverless run or not.
I replaced all of the includes with "cors: yes"
but then:
Serverless: Configuration warning:
Serverless: at 'service': unrecognized property 'tableDeletionPolicy'
Serverless: at 'functions.login.events[0].http.cors': should be object
Serverless: at 'functions.login.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.prelogin.events[0].http.cors': should be object
Serverless: at 'functions.prelogin.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.profile.events[0].http.cors': should be object
Serverless: at 'functions.profile.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.profile_put.events[0].http.cors': should be object
Serverless: at 'functions.profile_put.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.keys.events[0].http.cors': should be object
Serverless: at 'functions.keys.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.register.events[0].http.cors': should be object
Serverless: at 'functions.register.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.accounts_revision_date.events[0].http.cors': should be object
Serverless: at 'functions.accounts_revision_date.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.device_push_token.events[0].http.cors': should be object
Serverless: at 'functions.device_push_token.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.sync.events[0].http.cors': should be object
Serverless: at 'functions.sync.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.cipher_post.events[0].http.cors': should be object
Serverless: at 'functions.cipher_post.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.cipher_put.events[0].http.cors': should be object
Serverless: at 'functions.cipher_put.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.cipher_delete.events[0].http.cors': should be object
Serverless: at 'functions.cipher_delete.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.folder_post.events[0].http.cors': should be object
Serverless: at 'functions.folder_post.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.folder_put.events[0].http.cors': should be object
Serverless: at 'functions.folder_put.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.folder_delete.events[0].http.cors': should be object
Serverless: at 'functions.folder_delete.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.import.events[0].http.cors': should be object
Serverless: at 'functions.import.events[0].http.cors': unsupported configuration format
Serverless: at 'functions.default.events[0].http.cors': should be object
Serverless: at 'functions.default.events[0].http.cors': unsupported configuration format
Serverless:
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant