I was running a "local" web app on Google Colab using flask-ngrok according to this article: Flask on Google Colab. It was working appropriately in the past but today I started to get the error: "Tunnel _______.ngrok.io not found" whenever I try to access the generated public URL by ngrok. Everything was unchanged since the last time when it still worked. I checked the flask-ngrok package, looks like the package version remains unchanged since 2018. Couldn't figure out what is going wrong. Any help would be appreciated!
!pip install flask-ngrok
from flask_ngrok import run_with_ngrok
from flask import Flask
app = Flask(__name__)
run_with_ngrok(app) #starts ngrok when the app is run
@app.route("/")
def home():
return "<h1>Running Flask on Google Colab!</h1>"
app.run()
Here's another similar article: Running Python Flask Apps on Google Colab, there is a link to the full code in colab where you can run it yourself. It now gives the same tunnel not found error too.
There was an inadvertent block put in place by the ngrok engineering team for the Google Colab environment due to a new tweak to the abuse prevention system.
It's since been rolled back so you shouldn't see this ""Tunnel _______.ngrok.io not found"
from within Google Colab anymore (hopefully).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With