Skip to content
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

ngrok - consoleui failed: Failed to initialize terminal: invalid argument #1951

Closed
mariotoffia opened this issue Apr 19, 2017 · 29 comments
Closed

Comments

@mariotoffia
Copy link

mariotoffia commented Apr 19, 2017

Hi I'm trying to get ngrok working due to nodejs development and sharepoint online and webhooks. But it seems only to work on the CMD and not on the WSL. Is there any obvious that I need to do in order to run ngrok. It works very well in the commandline.

Cheers,
Mario

  • Your Windows build number:
    Microsoft Windows [Version 10.0.15063]
    Ubuntu version 16.04.1 LTS

  • What you're doing and what's happening:
    ngrok http 3000
    (installed via npm i -g ngrok)

  • What's wrong / what should be happening instead:
    consoleui failed: Failed to initialize terminal: invalid argument

Expecting ngrok tunnel to be set up like it would in the CMD.

  • Strace of the failing command, if applicable:
    Multiple strace.txt so I've zipped them as a attachment.
    strace.zip
@BradStell
Copy link

I am facing the same issue on WSL with the same windows version - 10.0.1.15063. With WSL Ubuntu version 16.04.1 LTS

@devchakraborty
Copy link

Same issue - Windows 10.0.15063, Ubuntu 16.04.

@mabdelfattah
Copy link

+1

@Apoorv97
Copy link

Apoorv97 commented Jun 3, 2017

+1
same here

@kogeva
Copy link

kogeva commented Jun 14, 2017

+1

@aaronkzhou
Copy link

same to me, we are under company network

@sqlsolver
Copy link

+1

@tomjw64
Copy link

tomjw64 commented Jul 3, 2017

I had the same issue on WSL. Using ngrok's --log option to write the log to stdout or stderr solved the problem for me. e.g. ngrok http 3000 --log stderr

@harrysarson
Copy link

harrysarson commented Jul 4, 2017

The --log work around works for me :)

EDIT

Scrap that, --log removes the error and gives me sensible output but the tunnel does not start.

EDIT

--log does work, see below

@sunilmut
Copy link
Member

sunilmut commented Jul 8, 2017

@ALL - Apologize for the delay in getting to this and thanks for the report & traces. I looked at the traces. The problem seems to be coming from the lack of support for signal driven I/O in WSL. Here are some snippets from the traces that establishes that. Also adding @SvenGroot as FYI.

$ grep 'EINVAL' *
strace.txt.76:fcntl(4, F_SETOWN, 74)                  = -1 EINVAL (Invalid argument)

$ grep '= 4' *
strace.txt.74:socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 4
strace.txt.74:openat(AT_FDCWD, "/dev/tty", O_RDONLY)  = 4

And, in the case ngrok http 3000 --log stderr where it doesn't give out the error, there is not such fcntl issued. I would recommend opening up a user voice ticket for signal driven I/O as it is a feature level request.

Regarding tunnel does not start, the web service starts fine for me at 127.0.0.1:4040. How can I validated whether the tunnel started or not?

@harrysarson
Copy link

Sorry, I just panicked when the command didn't give me a url to go to.

Have tried again and the web service works fine, many apologies.

@sunilmut
Copy link
Member

@harrysarson - No problems.

Just FYI that here is another request for signal I/O #601

@mgcox2
Copy link

mgcox2 commented Oct 18, 2017

I used the following options and I was able to see the public URL in the debug output, and it did in fact work. I was able to browse to it on my Android phone:
--log "stdout" --log-level "debug"

@abdilahrf
Copy link

same issue 👍

@iamfaith
Copy link

same issue.
hope solve soon.

@therealkenc
Copy link
Collaborator

Ref #601

@rfgamaral
Copy link

What's the status on this and does anyone now if anything is being done to fix this issue?

@Brian-Perkins
Copy link

There have been changes in Insiders Build to address issues like signal-driven IO support for tty/pty (see therealkenc's ref above) so it would be interesting to try this on a recent Insiders release. If there are still issues then we need to dig into the strace, et al. to see what is still blocking.

@rfgamaral
Copy link

My machine has been very unstable as of late otherwise I'd by willing to install the Insiders build and give it ago. Hopefully someone else can do it and report back!?

@rfgamaral
Copy link

Looking at the issue @therealkenc referenced and the Release Notes on Build 17017 should have this fixed? I mean, there's this:

O_ASYNC support for tty/pty files.

Then again, I have no idea what I'm talking about and I'm just trying to put the pieces together.

tl;dr;
Is it possible that the Windows Insider Build 17017 fixes this issue?

@rfgamaral
Copy link

rfgamaral commented Jan 18, 2018

Decide to install the latest downloadable Insider Preview ISO on a virtual machine and test this for myself and it's working :)

image

Now I'm thinking on upgrading to Insider Preview on my main system, but afraid that it might not be very stable...

@benhillis
Copy link
Member

Marking as fixed in 17025.

@feryardiant
Copy link

Just install ngrok-client via apt install & got same issue

image

@francoisneron
Copy link

+1

1 similar comment
@StoIos
Copy link

StoIos commented May 6, 2018

+1

@therealkenc
Copy link
Collaborator

I haven't confirmed the fixininsiderbuilds applied in January, but the +1 static is reason enough to close this. If sudo npm install -g ngrog still fails on 17134 or better, reboot under a new issue#.

@feryardiant
Copy link

It works now.

Thanks team.

@geetfun
Copy link

geetfun commented Jun 11, 2018

On Build 16299.461 and using ngrok version 2.2.8 (direct from ngrok website) on Ubuntu 18.04 seems to fail.

At this point, is there a recommended version of Windows Build that is confirmed to work?

@rfgamaral
Copy link

@geetfun Yes, update to the latest 1803 version (April 2018 Update).

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

No branches or pull requests