ngrok - consoleui failed: Failed to initialize terminal: invalid argument
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
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
Same issue - Windows 10.0.15063, Ubuntu 16.04.
+1
+1 same here
+1
same to me, we are under company network
+1
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
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
@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?
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 - No problems.
Just FYI that here is another request for signal I/O #601
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"
same issue 👍
same issue. hope solve soon.
Ref #601
What's the status on this and does anyone now if anything is being done to fix this issue?
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.
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!?
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?