bubenshchykov / ngrok

Expose your localhost to the web. Node wrapper for ngrok.
https://ngrok.com
2.33k stars 317 forks source link

complains about set subdomain #34

Closed fiws closed 8 years ago

fiws commented 9 years ago
> ngrok.connect({addr: 3000, authtoken: process.env.TOKEN}, function(err){console.log(err)})
undefined
> [Error: {"error_code":103,"status_code":502,"msg":"failed to start tunnel","details":{"err":"Custom subdomains are only available for paid plans. Upgrade at https://dashboard.ngrok.com/billing/plan"}}]

even though I did not set any subdomain.

bubenshchykov commented 9 years ago

@fiws sorry for that, I'll see what I can do today. meanwhile u can use ngrok@0.1.99 - it uses ngrok 1 and doesn't require an authtoken at all

that happens because I have to assign the "name" when creating a tunnel through ngrok's api ( https://github.com/bubenshchykov/ngrok/blob/master/index.js#L111-L114 opts.name = String(opts.name || id++);

@inconshreveable I guess it's the same issue we discussed before. when making a tunnel through api ngrok requires a "name" as a tunnel ID, but same time treats it as a custom subdomain and thus requires a paid subscription. Am I correct? Is name still required for api posts and acts as a tunnel ID?

vvo commented 9 years ago

Also seeing this as an issue

abrkn commented 9 years ago

:+1:

sebpiq commented 9 years ago

Same issue here :(

lejeunerenard commented 9 years ago

:+1:

liabru commented 8 years ago

+1

henninghorn commented 8 years ago

You can use ngrok-my-server:

That module works and it seems to be using this module - I'm not sure.

fiws commented 8 years ago

@henninghorn probably because it uses 0.1.x ("ngrok": "~0.1.8")

mlemainque commented 8 years ago

We also have that problem :-1:

spacedawwwg commented 8 years ago

Same issue here. Reverted back to v1.x for the time being

bubenshchykov commented 8 years ago

@spacedawwwg you did right, it's also recommended in readme to use 0.1.x the latest version on npm still awaits a critical fix from native ngrok written in go, @inconshreveable will let us know sorry for inconveniences!

BenjaminConant commented 8 years ago

same issue ... followed the instructions on the ngrok npm module ...

var ngrok = require('ngrok');
ngrok.connect(9000, function (err, url) {
    console.log("ngrok err", err);
    console.log("ngrok url", url);
});

getting

ngrok err [Error: {"error_code":103,"status_code":502,"msg":"failed to start tunnel","details":{"err":"Custom subdomains are only available for paid plans. Signup at https://ngrok.com/signup"}}]
ngrok url undefined
BenjaminConant commented 8 years ago

@henninghorn thanks for the tip!

danieldafoe commented 8 years ago

Just so others viewing this are aware, the best workaround (for now) is indeed to change your entry for ngrok in your package.json to "ngrok": "~0.1.8" and then do an npm install in your project main directory again.

bubenshchykov commented 8 years ago

thanks @danieldafoe 0.1.99 is also recommended on readme

status update on the issue itself:

On March 21, 2016 all 1.X sessions without an authtoken will stop working. On April 4, 2016, all 1.X sessions will stop working. The easiest way to continue using ngrok is to upgrade to 2.0

as soon as we receive new ngrok bins, this bug will be fixed and covered by tests. thanks for patience!

bubenshchykov commented 8 years ago

guys, pls try 2.1.1 - issue should be fixed. and covered by tests https://travis-ci.org/bubenshchykov/ngrok/jobs/115454650#L224-L314

swarooppuranik commented 4 years ago

I am getting the same error. I am using python for ngrok. please advise

bubenshchykov commented 4 years ago

@swarooppuranik How do you use this node.js module with python?

swarooppuranik commented 4 years ago

May be this is wrong thread. I am using pyngrok (python with ngrok). I am trying to establish connection with reserved tcp address and getting this error.

bubenshchykov commented 4 years ago

np, please contact binary owner at ngrok.com (contact@ngrok.com)