serverless-google-cloudfunctions: "invoke local" doesn't do anything
I’m using the default Node.js template. Running invoke works perfectly fine on the deployed application, but running sls invoke local -f first doesn’t do anything or print anything to the console.
When logging debug info no errors are shown. It gets to Serverless: Invoke invoke:local then the process just exits.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 5
- Comments: 16
Same here.
Any updates about it?
Any update for this? Workaround dont work for me. When i invoke in shell
serverless invoke local -f first --data '{"name": "Bernie"}'nothing happens. this doesn’t do anything or print anything to the console
Well yes I confirm, the following config “just works” for me right now:
` {
If I remove the “–data dummyData” section, Invoke Lambda gets stuck as before. Latest Vscode, and my OS is an Ubuntu 18.04 LTS in case it matters…
I am experiencing the same thing, except rather than hanging it just exits after “Serverless: Invoke invoke:local” with no output or even attempting to compile the code (introducing a deliberate syntax error doesn’t have any effect). Seems like maybe this plugin is not ready for use?
I also run into this issue as well. The debug output looks like this:
Afterwards it stops and the return value is 0.
Just ran into this problem, it seems to happen when two conditions are met:
sls invoke localcommand via a debugger (Vscode in my case), and:invoke local(via eitherdataorpathparameters).In that scenario,
InvokeLocalplugin gets stuck trying to read data on stdin. The problem seems to be located inget-stdin/index.js, where the conditionif (stdin.isTTY)is false for some reason. May be related to the way VScode calls programs to debug?!An easy workaround is to add a dummy
--dataor--pathparameter to yourinvoke localcommand.Same here.
Any updates about it?