philnash / ngrok-for-vscode

🚇 A VSCode extension to control ngrok from the command palette
MIT License
117 stars 13 forks source link

Never starts my tunnel #53

Open skadz opened 1 year ago

skadz commented 1 year ago

I'm on a mac, arm64, latest vscode, latest ngrok, latest everything :)

Every time I run ngrok start, I get zero feedback. I have a config file in place, so I get the dropdown with my tunnels, but they don't start and it doesn't error. I've tried with both one and two tunnels in my config file and a tunnel never starts. But when I head over to my terminal, I check my procs and I see this:

/Users/skadz/.vscode/extensions/philnash.ngrok-for-vscode-1.10.1/dist/bin/ngrok start --none --log=stdout --config=/Users/skadz/Desktop/skadz-ngrok.yml

So, it looks like it TRIED to start, but didn't select a tunnel to start? The strange part to me is the --none, as it seems like its saying I did not select a tunnel. I have tried clicking, typing the whole name in, just hitting enter on the one that is selected, but this is the behavior I have seen every time.

I have tried enabling and disabling, restarting vscode, reloading vscode, but always with the same results.

My config file is rather basic (and it seem like the extension can parse it because I see the tunnels in the dropdown):

version: "2"
authtoken: AnAuthToken
region: us
web_addr: localhost:8888
tunnels:
  machine1:
    proto: http
    addr: 8000
    hostname: host1.ngrok.io
  laptop:
    proto: http
    addr: 8000
    hostname: host2.ngrok.io

Any help is appreciated. I'm happy to help debug too, just tell me the steps.

skadz commented 1 year ago

(sorry for the crappy formatting on the config)

Dovrol commented 1 year ago

Same issue for me

philnash commented 1 year ago

Hi @skadz!

Sorry for the slow response on this, I'm not sure how I missed the notification.

I'm not sure what's going on there, but perhaps you can help debug. You should be able to open the developer tools in VSCode from the Help menu. Then if you can run the ngrok command to start the tunnel and see if anything is logged.

skadz commented 1 year ago

Sadly, nothing :( I even deleted the binary and my previous download. It just shows it downloading and then putting it in to place and then nothing else. But I do still have a bad process. Anywhere else I can check? Got a debug version? Anything specific in the console I should set?

skadz commented 1 year ago

image

I get this when I try to stop it or go to the dashboard, maybe this is something?

And it most definitely IS running, albeit incorrectly. (Same command as the first one)

philnash commented 1 year ago

That error would be expected if the extension were unable to start the ngrok service and manage it itself. Also, the parsing of the config file to show the available tunnels is done by the extension and a YAML parser, so it doesn't guarantee that the config is correct.

Are you able to use the binary directly from the terminal? Can you run:

/Users/skadz/.vscode/extensions/philnash.ngrok-for-vscode-1.10.1/dist/bin/ngrok start machine1 --config=/Users/skadz/Desktop/skadz-ngrok.yml

and see if it runs correctly or returns any errors?

skadz commented 1 year ago

Comes up no problem! Only issue I see is that its a VERY old version of ngrok (2.3.41 when 3.3.0 is out), but seems to be just fine. I did machine1 from my config above.

ngrok by @inconshreveable                                                         (Ctrl+C to quit)

Session Status                online
Account                       My Company (Plan: Basic)
Version                       2.3.41
Region                        United States (us)
Web Interface                 http://localhost:8888
Forwarding                    http://host1.ngrok.io -> http://localhost:8000
Forwarding                    https://host1.ngrok.io -> http://localhost:8000

Connections                   ttl     opn     rt1     rt5     p50     p90
                              0       0       0.00    0.00    0.00    0.00

I did try upgrading to the 3.0 agent and had the same issue.

philnash commented 1 year ago

Yeah, the underlying ngrok library still depends on the ngrok executable from the version 2 line. I actually work on that too, and have a beta out for upgrading to v3, but I'm still testing it with this extension.

I don't have a debug version, I'm afraid. And since the executable is working fine, but the extension isn't connecting to it, I'm a little out of ideas. I am hoping to get those new versions out soon (this week?) so perhaps you'd be able to wait and try with the updates and the underlying ngrok v3?