ngrok
ngrok copied to clipboard
NGROK Immediately Closing
This has to be hands down one of the weirdest computing issues I've ran into. NGROK has worked flawlessly for me for months now, yet all of a sudden, it legitimately just stopped working. No reason is given, but upon trying to do anything, the window terminates. I will attach a video.
My Problem: Steamable Link (Video / GIF)
@inconshreveable
This happening with me too any idea whats happening here?
I've been getting this same issue on OSX Mohave. It just runs a killed: 9
and the binary gets deleted. No idea why it happens.
If I restart my computer, and try to run it real fast, I can for the first few trieds before it gets deleted.
I've had this problem for a while, and have seemingly had no hope in terms of support or solutions. I hope @inconshreveable replies eventually, but until then we'll most likely be waiting.
+1 also seeing this issue in Mojave - tried the 32-bit and 64-bit binary, tried installing from Brew, no luck. Saw this post which has a workaround using Docker but I'm also curious as to why it's happening. I tested with a Mac running Catalina and there were no issues. Hoping for a response here.
@MattDN93 Not sure if the program auto-updated for a hotfix or what, but suddenly mine is working again... it is entirely possible it couldn't been an OS conflict.
Welp, that was short-lived. Void my statement in this comment; it appears to be what @underGhost was experiencing here.
@inconshreveable any updates? Myself and a fair share of other users are experiencing this issue to no resolve. Additionally, I depend (well, did depend) on NGrok for quite a few things related to my work on a semi-consistent / day-to-day basis. Whatever the case is, I really hope it's fixed soon :)
@MattDN93 @underGhost @johnef - Any temporary fixes or workarounds been found for this issue yet?
@RHQ-Rusty I haven't had any time to look into a work around, but I did try building it from source and running it. No luck.
It's funny because when you posted that it worked for you, I reinstalled and it worked for me. The very next day it stopped working and back to the killed: 9
issue.
I'm not sure if there's some other program running that causes this, but some process is happening and causing it to be killed it seems.
@RHQ-Rusty No joy here either I'm afraid. After trying everything I eventually resorted to the Docker workaround just to get my concept running but I'm still hoping there's a fix in the pipeline for whatever this is.
@RHQ-Rusty No joy here either I'm afraid. After trying everything I eventually resorted to the Docker workaround just to get my concept running but I'm still hoping there's a fix in the pipeline for whatever this is.
@MattDN93 - can you share your Docker workaround?
@RHQ-Rusty -> I used the workaround here: https://github.com/inconshreveable/ngrok/issues/649#issuecomment-626048166
@MattDN93 @underGhost @johnef - Small Update for you Lads :)
I have found some very rudimentary / awkward ways of working around this issue. I've done a surprising amount of work investigating this issue and, while I was unable to reproduce it on other locally-located environments, I was able to reproduce it on my own environment.
The issue appears to be occurring due to shoddy process execution on a system level; whether this be a fault of NGrok or a poorly-managed Windows update, I don't know. If you notice, NGrok doesn't really give an error message or anything, it legitimately just exits. So, doing my digging, I found that somehow my PC had been spawning child processes of NGrok, preventing it from working. Whilst normally NGrok would call-back and tell you that only one session is supported on the free version (as this was my case), it was now not saying anything and immediately closing. Well, since this is locally detected (the PC sees multiple NGroks), NGrok servers don't even need to at this point. Upon force-killing the NGrok processes left stranded on my PC, I was able to successfully start and use NGrok for the first time in months. I restarted my PC, tested it again, and sure enough this was the issue.
I recommend introspectively looking through processes and making sure NGrok has 0 instances running when you wish to use it, making your new instance the lone instance of NGrok on your machine. I also wrote an application that acts as a wrapper for NGrok and has dynamic process allocation so when you're done, NGrok 100% kills all NGrok-related or spawned processes. I'll consider touching it up and open-sourcing it soon.
Happy holidays, I hope this was able to help some! I'll leave this issue open if others need to ask any questions.
I have been trying to fix this issue, the moment I click it, it pops up for half a second then vanishes
This is affecting me as well, I had to opt for the docker workaround. Specifically ran:
docker run -d --name ngrok wernight/ngrok ngrok http $(hostname):$LOCAL_PORT
docker exec -i ngrok curl localhost:4040/api/tunnels
for my laptop, MacOS Catalina 10.15.7, I simply brew uninstall + reinstall and it started working again
This issue didn't occur to me just until last month. Idk how to fix this, was using ngrok
from npm i ngrok -g
.
Now using localtunnel.
This looks like it was locked on an old version of ngrok but hard to diagnose at this point. Download the latest version at https://ngrok.com/download
These forums are unmonitored. For active support, check out our slack community: https://ngrok.com/slack
I've just got the same problem. ngrok version 3.3.2, Windows 10 Pro. After login into my ngrok account -> https://dashboard.ngrok.com/ , going to Tunnels -> Agents and deleting my session the ngrok works again. I.e. the cmd prompt doesn't get closed anymore right after starting the ngrok command.
I'm having the same issue and my advice to the ngrok devs is, regardless of the specific cause of this error, don't start a new process. If users want a new process they can decide to do that (e.g. with start ngrok http 3000
in windows) but when you force a new process this creates a new window and if it closes immediately we cannot even see what the error message is.
I solved my issue by uninstalling npm remove -g ngrok
and downloading ngrok.exe myself.
This looks like it was locked on an old version of ngrok but hard to diagnose at this point. Download the latest version at https://ngrok.com/download
These forums are unmonitored. For active support, check out our slack community: https://ngrok.com/slack
@MattDN93 @underGhost @johnef - Small Update for you Lads :)
I have found some very rudimentary / awkward ways of working around this issue. I've done a surprising amount of work investigating this issue and, while I was unable to reproduce it on other locally-located environments, I was able to reproduce it on my own environment.
The issue appears to be occurring due to shoddy process execution on a system level; whether this be a fault of NGrok or a poorly-managed Windows update, I don't know. If you notice, NGrok doesn't really give an error message or anything, it legitimately just exits. So, doing my digging, I found that somehow my PC had been spawning child processes of NGrok, preventing it from working. Whilst normally NGrok would call-back and tell you that only one session is supported on the free version (as this was my case), it was now not saying anything and immediately closing. Well, since this is locally detected (the PC sees multiple NGroks), NGrok servers don't even need to at this point. Upon force-killing the NGrok processes left stranded on my PC, I was able to successfully start and use NGrok for the first time in months. I restarted my PC, tested it again, and sure enough this was the issue.
I recommend introspectively looking through processes and making sure NGrok has 0 instances running when you wish to use it, making your new instance the lone instance of NGrok on your machine. I also wrote an application that acts as a wrapper for NGrok and has dynamic process allocation so when you're done, NGrok 100% kills all NGrok-related or spawned processes. I'll consider touching it up and open-sourcing it soon.
Happy holidays, I hope this was able to help some! I'll leave this issue open if others need to ask any questions.
I was having the same issue running nglok on my local enviroment and @InfernalPlank 's solution above worked perfectly for me, just by erasing current ngrok processes i could use ngrok in about 1 minute