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

Comments

Projects
None yet
@mariotoffia

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

This comment has been minimized.

Show comment
Hide comment
@BradStell

BradStell Apr 21, 2017

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

BradStell commented Apr 21, 2017

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

This comment has been minimized.

Show comment
Hide comment
@devchakraborty

devchakraborty Apr 28, 2017

Same issue - Windows 10.0.15063, Ubuntu 16.04.

devchakraborty commented Apr 28, 2017

Same issue - Windows 10.0.15063, Ubuntu 16.04.

@mabdelfattah

This comment has been minimized.

Show comment
Hide comment
@mabdelfattah

mabdelfattah commented May 31, 2017

+1

@Apoorv97

This comment has been minimized.

Show comment
Hide comment
@Apoorv97

Apoorv97 Jun 3, 2017

+1
same here

Apoorv97 commented Jun 3, 2017

+1
same here

@kogeva

This comment has been minimized.

Show comment
Hide comment
@kogeva

kogeva commented Jun 14, 2017

+1

@aaronkzhou

This comment has been minimized.

Show comment
Hide comment
@aaronkzhou

aaronkzhou Jun 21, 2017

same to me, we are under company network

aaronkzhou commented Jun 21, 2017

same to me, we are under company network

@sqlsolver

This comment has been minimized.

Show comment
Hide comment
@sqlsolver

sqlsolver commented Jul 1, 2017

+1

@tomjw64

This comment has been minimized.

Show comment
Hide comment
@tomjw64

tomjw64 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

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

This comment has been minimized.

Show comment
Hide comment
@harrysarson

harrysarson 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

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

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Jul 8, 2017

Member

@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?

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?

@sunilmut sunilmut added the feature label Jul 8, 2017

@harrysarson

This comment has been minimized.

Show comment
Hide comment
@harrysarson

harrysarson Jul 8, 2017

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.

harrysarson commented Jul 8, 2017

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

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Jul 14, 2017

Member

@harrysarson - No problems.

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

Member

sunilmut commented Jul 14, 2017

@harrysarson - No problems.

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

@mgcox2

This comment has been minimized.

Show comment
Hide comment
@mgcox2

mgcox2 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"

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

This comment has been minimized.

Show comment
Hide comment
@abdilahrf

abdilahrf Nov 7, 2017

same issue 👍

abdilahrf commented Nov 7, 2017

same issue 👍

@iamfaith

This comment has been minimized.

Show comment
Hide comment
@iamfaith

iamfaith Dec 11, 2017

same issue.
hope solve soon.

iamfaith commented Dec 11, 2017

same issue.
hope solve soon.

@therealkenc

This comment has been minimized.

Show comment
Hide comment
@therealkenc

therealkenc Dec 11, 2017

Collaborator

Ref #601

Collaborator

therealkenc commented Dec 11, 2017

Ref #601

@rfgamaral

This comment has been minimized.

Show comment
Hide comment
@rfgamaral

rfgamaral Jan 17, 2018

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

rfgamaral commented Jan 17, 2018

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

@Brian-Perkins

This comment has been minimized.

Show comment
Hide comment
@Brian-Perkins

Brian-Perkins Jan 17, 2018

Collaborator

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.

Collaborator

Brian-Perkins commented Jan 17, 2018

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

This comment has been minimized.

Show comment
Hide comment
@rfgamaral

rfgamaral Jan 17, 2018

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 commented Jan 17, 2018

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

This comment has been minimized.

Show comment
Hide comment
@rfgamaral

rfgamaral Jan 17, 2018

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 commented Jan 17, 2018

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

This comment has been minimized.

Show comment
Hide comment
@rfgamaral

rfgamaral 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...

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

This comment has been minimized.

Show comment
Hide comment
@benhillis

benhillis Jan 18, 2018

Member

Marking as fixed in 17025.

Member

benhillis commented Jan 18, 2018

Marking as fixed in 17025.

@feryardiant

This comment has been minimized.

Show comment
Hide comment
@feryardiant

feryardiant Apr 22, 2018

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

image

feryardiant commented Apr 22, 2018

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

image

@francoisneron

This comment has been minimized.

Show comment
Hide comment
@francoisneron

francoisneron commented Apr 28, 2018

+1

@StoIos

This comment has been minimized.

Show comment
Hide comment
@StoIos

StoIos commented May 6, 2018

+1

@therealkenc therealkenc added fixedin1803 and removed feature labels May 24, 2018

@therealkenc

This comment has been minimized.

Show comment
Hide comment
@therealkenc

therealkenc May 24, 2018

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#.

Collaborator

therealkenc commented May 24, 2018

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

This comment has been minimized.

Show comment
Hide comment
@feryardiant

feryardiant Jun 2, 2018

It works now.

Thanks team.

feryardiant commented Jun 2, 2018

It works now.

Thanks team.

@geetfun

This comment has been minimized.

Show comment
Hide comment
@geetfun

geetfun 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?

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

This comment has been minimized.

Show comment
Hide comment
@rfgamaral

rfgamaral Jun 11, 2018

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

rfgamaral commented Jun 11, 2018

@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