question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invoke hangs when using MinGW/Git Bash

See original GitHub issue

This is a Bug Report

Description

Following the quick-start guide, the deployment of the “hello” Lambda function to AWS was successful. Trying to invoke function in the Git Bash/MinGW console results in an indefinite hang when running the following:

$ serverless invoke -f hello -l

However, if I use the Windows CMD prompt, I get the expected response:

D:\Repositories\serverless-test>serverless invoke -f hello -l
{
    "statusCode": 200,
    "body": "{\"message\":\"Go Serverless v1.0! Your function executed successfully!\",\"input\":{}}"
}
--------------------------------------------------------------------
START RequestId: 6af14a9a-667e-11e7-bafb-3b0e315fa13d Version: $LATEST
END RequestId: 6af14a9a-667e-11e7-bafb-3b0e315fa13d
REPORT RequestId: 6af14a9a-667e-11e7-bafb-3b0e315fa13d  Duration: 3.00 ms       Billed Duration: 100 ms         Memory Size: 1024 MB    Max Memory Used: 18 MB

The Windows CMD prompt is an awful tool and Powershell is just CMD with a blue background, so I would prefer to use a real terminal if possible. Any ideas on what is causing this?

Additional Data

  • Serverless Framework Version you’re using: 1.17.0
  • Operating System: Windows 10 Education
  • Stack Trace: N/A
  • Provider Error messages: N/A

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:10
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
neverendingqscommented, Aug 21, 2018

Try running winpty first (which comes with Git bash):

$ winpty bash
$ serverless invoke -f hello -l

Not 100% sure what’s going on, but something something Git bash not being able to handle Windows signals?

Some console programs, most notably non-MSYS2 Python, PHP, Node and OpenSSL, interact correctly with MinTTY only when called through winpty (e.g. the Python console needs to be started as winpty python instead of just python).

https://github.com/git-for-windows/build-extra/blob/master/ReleaseNotes.md#known-issues

0reactions
medikoocommented, Nov 26, 2020

This looks as an issue specific to given environment.

Not sure if we can do anything about that in context of a Framework, still if there’s any way to improve the experience we’re open for suggestions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

git bash freezes when I run "python manage.py runserver"
I'm trying to learn django and have already created my project using startproject. Now I want to run the ...
Read more >
pg_dump hangs in Git Bash but works in Windows command ...
I tried to make a backup of a database from Git Bash environment, but the executable does not output anything.
Read more >
SSH suddenly stopped working in git-bash on Windows 10
As a workaround I´ve installed OpenSSH for Win32 (https://github.com/PowerShell/Win32-OpenSSH) using the Chocolatey package manager (see https ...
Read more >
Frequent Crashes In Windows/MinGW? : r/emacs - Reddit
I'm running EMACS in a git bash window (intentionally, so I have access to the mingw tools & ecosystem), but I frequently encounter...
Read more >
Issues with git push when linking my local and GitHub ...
Gitbash hangs with `git push -u` and https credentials ... Then try to run your commands again, commit and push to your repo...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found