Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I set my ngrok authtoken? #7

Open
jameshfisher opened this issue Sep 1, 2022 · 5 comments
Open

How do I set my ngrok authtoken? #7

jameshfisher opened this issue Sep 1, 2022 · 5 comments
Labels
question Further information is requested

Comments

@jameshfisher
Copy link

jameshfisher commented Sep 1, 2022

I ran all of the notebook in colab, but requests fail with responses like:

$ curl -X POST http://2e04-34-90-174-157.ngrok.io/api/img2img
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1201  100  1201    0     0   2327      0 --:--:-- --:--:-- --:--:--  2332<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="author" content="ngrok">
    <meta name="description" content="ngrok is the fastest way to put anything on the internet with a single command.">
    <meta name="robots" content="noindex, nofollow">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link id="style" rel="stylesheet" href="https://cdn.ngrok.com/static/css/error.css">
    <noscript>Before you can serve HTML content, you must sign up for an ngrok account and install your authtoken. (ERR_NGROK_6022)</noscript>
    <script id="script" src="https://cdn.ngrok.com/static/js/error.js" type="text/javascript"></script>
  </head>
  ...
</html>

I've signed up for an ngrok account and got an authtoken, but how do I set it in this environment?

@jameshfisher
Copy link
Author

The notebook runs pip install ngrok - is that https://pypi.org/project/ngrok/?

Is it supposed to be https://pypi.org/project/pyngrok/ ?

@jameshfisher
Copy link
Author

Okay, I got it running by:

  1. Changing pip install ngrok to pip install pyngrok
  2. Running !ngrok authtoken <myauthtokenhere> immediately after

jameshfisher added a commit to jameshfisher/koi that referenced this issue Sep 2, 2022
Fixes second problem in nousr#7
@nousr
Copy link
Owner

nousr commented Sep 4, 2022

have you confirmed wether this is still necessary inside of colab? or is this an issue for non-colab notebooks?

@nousr nousr added the question Further information is requested label Sep 4, 2022
@jameshfisher
Copy link
Author

@nousr I'm fairly sure this is an issue in Colab. Ngrok requires an authtoken, and fails if you don't set it, so when the user is setting up a new Colab instance, they somehow need to set their ngrok authtoken.

@guumaster it sounds like you also experienced this? Could you confirm?

@guumaster
Copy link

Exactly, just followed this instructions. Maybe it should be added to README/notebook guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants