Closed sarink closed 2 years ago
The default configuration file location for ngrok is ~/.ngrok2/ngrok.yml
. Though I believe that ngrok version 1 stored its config in ~/.ngrok/
.
This module actually downloads and stores its own copy of the ngrok binary within ${PROJECT_DIRECTORY}/node_modules/ngrok/bin
so it should have had no effect on things inside your home directory. My guess for ~/.ngrok/asdfasdf-some-guid-asdfasf.zip
is that the ngrok binary itself downloads it as part of its own update mechanism.
Are you still running ngrok version 1 outside of this module? Or have you configured a different location for the config file?
I acknowledge the ECONNREFUSED
error and that it causes another error because the library doesn't handle it. I've just been unable to reproduce the error myself and #231 fails the existing tests. Reading back through the issues shows that there are reports of having ngrok open on a different machine causing this issue, which is something I can look into.
I just tried running ngrok with a free account and then tried to run ngrok with the same account from this module and I did get an error, but it was expected. It was a NgrokClientError: failed to start tunnel
error. So the module correctly handles it when ngrok can't start because it's already open elsewhere for the account.
There haven't been any further comments on this since January, so I am going to close the issue for now. If there are still questions or issues, please feel free to reopen.
I can't seem to make this module work at all
I tried digging through the source to reveal the real error (https://github.com/bubenshchykov/ngrok/issues/229), which is apparently
ECONNREFUSED
After some more digging, I found https://github.com/bubenshchykov/ngrok/issues/138 which led me to look at my auth token (in my actual app where I'm using this I set an auth token, but in the sample demo repo I made to test this issue, I did not).
That's when I noticed a
~/.ngrok/asdfasdf-some-guid-asdfasf.zip
file - what is this? Whatever script wrote this presumably also is what moved my original~/.ngrok
folder (the one which has aconfig.yml
that contains my auth token) to~/.ngrok2
.Fixed everything
Why did this happen?