-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure: Debug Failure. False expression. #228
Comments
@derevandal thanks for reporting this, so does this happen with the deployed function as well, or only when you run it locally with |
Depending on the bundle configuration, when running locally you may sometimes stumble into errors with the event-sources because This usually isn't a problem in lambda since accessing aws-sdk is there by default. But running locally you should probably have |
I thought I forgot to make this addition ... But no.
I tried to yarn run v1.22.4
$ cross-env NODE_ENV=development sls deploy --stage $NODE_ENV
Serverless: Bundling with Webpack...
Starting type checking service...
Serverless: No external modules needed
Serverless: Packaging service...
Type Error ---------------------------------------------
TypeError: this.getStage(...).toUpperCase is not a function
at AwsProvider.getCredentials (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:371:58)
at AwsProvider.request (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:241:48)
at AwsDeploy.<anonymous> (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/deploy/lib/createStack.js:73:12)
From previous event:
at AwsDeploy.createStack (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/deploy/lib/createStack.js:71:8)
From previous event:
at Object.aws:deploy:deploy:createStack [as hook] (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/deploy/index.js:99:67)
at /home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:483:55
From previous event:
at PluginManager.invoke (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:483:22)
at PluginManager.spawn (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:503:17)
at AwsDeploy.<anonymous> (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/deploy/index.js:93:48)
From previous event:
at Object.deploy:deploy [as hook] (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/deploy/index.js:89:30)
at /home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:483:55
From previous event:
at PluginManager.invoke (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:483:22)
at /home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:518:24
From previous event:
at PluginManager.run (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:518:8)
at /home/derevandal/projetcs/serverless/node_modules/serverless/lib/Serverless.js:133:33
From previous event:
at Serverless.run (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/Serverless.js:120:74)
at /home/derevandal/projetcs/serverless/node_modules/serverless/scripts/serverless.js:54:26
at processImmediate (internal/timers.js:456:21)
From previous event:
at Object.<anonymous> (/home/derevandal/projetcs/serverless/node_modules/serverless/scripts/serverless.js:54:4)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/derevandal/projetcs/serverless/node_modules/serverless/bin/serverless.js:41:1)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.18.3
Framework Version: 1.76.1
Plugin Version: 3.6.17
SDK Version: 2.3.1
Components Version: 2.32.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
❯ yarn deploy
yarn run v1.22.4
$ cross-env NODE_ENV=development SLS_DEBUG=* sls deploy --stage $NODE_ENV
Serverless: Load command interactiveCli
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command config:tabcompletion
Serverless: Load command config:tabcompletion:install
Serverless: Load command config:tabcompletion:uninstall
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command upgrade
Serverless: Load command uninstall
Serverless: Load command webpack
Serverless: Load command offline
Serverless: Load command offline:start
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command generate-event
Serverless: Load command test
Serverless: Load command dashboard
Serverless: Load command output
Serverless: Load command output:get
Serverless: Load command output:list
Serverless: Load command param
Serverless: Load command param:get
Serverless: Load command param:list
Serverless: Load command studio
Serverless: Load command dev
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Invoke webpack:validate
Serverless: Invoke webpack:compile
Serverless: Bundling with Webpack...
Starting type checking service...
Serverless: Invoke webpack:package
Serverless: No external modules needed
Serverless: Packaging service...
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:deploy:deploy
Type Error ---------------------------------------------
TypeError: this.getStage(...).toUpperCase is not a function
at AwsProvider.getCredentials (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:371:58)
at AwsProvider.request (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:241:48)
at AwsDeploy.<anonymous> (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/deploy/lib/createStack.js:73:12)
From previous event:
at AwsDeploy.createStack (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/deploy/lib/createStack.js:71:8)
From previous event:
at Object.aws:deploy:deploy:createStack [as hook] (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/deploy/index.js:99:67)
at /home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:483:55
From previous event:
at PluginManager.invoke (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:483:22)
at PluginManager.spawn (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:503:17)
at AwsDeploy.<anonymous> (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/deploy/index.js:93:48)
From previous event:
at Object.deploy:deploy [as hook] (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/plugins/aws/deploy/index.js:89:30)
at /home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:483:55
From previous event:
at PluginManager.invoke (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:483:22)
at /home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:518:24
From previous event:
at PluginManager.run (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/classes/PluginManager.js:518:8)
at /home/derevandal/projetcs/serverless/node_modules/serverless/lib/Serverless.js:133:33
From previous event:
at Serverless.run (/home/derevandal/projetcs/serverless/node_modules/serverless/lib/Serverless.js:120:74)
at /home/derevandal/projetcs/serverless/node_modules/serverless/scripts/serverless.js:54:26
at processImmediate (internal/timers.js:456:21)
From previous event:
at Object.<anonymous> (/home/derevandal/projetcs/serverless/node_modules/serverless/scripts/serverless.js:54:4)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/derevandal/projetcs/serverless/node_modules/serverless/bin/serverless.js:41:1)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.18.3
Framework Version: 1.76.1
Plugin Version: 3.6.17
SDK Version: 2.3.1
Components Version: 2.32.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. When I disable |
This is a bit of an assumption but in the logs you've posted, looking at these lines:
Surely this implies the error isn't to do with this library. Since you've manged to complete the packaging part of the process. It seems like the issue is more to do with the deployment part of the process, which could imply this is more of an issue to do with |
hmm, I understand. it makes sense ... I agree with you. Thank you very much for your attention ... if i have any updates on how i solved this, i will also post it here. |
This is a Bug Report
Description
Upon receiving a request with
@dazn/lambda-powertools-pattern-basic
on, the server closes unexpectedly.Return the object informed in the function.
I'm using two serverless plugins
serverless-bundle
andserverless-offline
with this debug commandcross-env NODE_ENV=development SLS_DEBUG=* node --inspect ./node_modules/.bin/serverless -s dev offline start
.my function:
Additional Data
Which powertool package are you using?:
After much debugging, I believe the problem is related to package
@dazn/lambda-powertools-middleware-correlation-ids
.When I run with
@dazn/lambda-powertools-middleware-sample-logging
and@dazn/lambda-powertools-middleware-log-timeout
enabled, no error occurs.Which version are you using?:
"@middy/core": "^1.0.0",
W10 - WSL2 with Ubuntu 20.04
While debugging the package, I realized that the Webpack cannot find the following files but I don't know why:
The text was updated successfully, but these errors were encountered: