flaskwebgui: flaskwebgui is getting killed immediately
Hi, I have just created an single page flask web app all it does is say hello world here is the program
# gui.py
from flask import Flask
from flaskwebgui import FlaskUI
from os import path
b_path = path.join(path.dirname(__file__), 'Browsor', 'chrlauncher.exe')
app = Flask(__name__)
ui = FlaskUI(app, fullscreen=True, start_server='flask',browser_path= b_path)
@app.get('/')
def home():
return "Hello World"
@app.get('/page')
def page():
return '''
This is Another Page
<a href="/">Go To Home page</a>
'''
if __name__ == '__main__':
ui.run()
when i run this file python3 gui.py
it start chromium and program ends after that, which is why it shows

and this is on terminal
and i am using this chromium version
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 28 (13 by maintainers)
Version 0.3.0 should fix this issue.
As we can find at flaskwebgui documentation is required to create an additional configuration in order to keep alive de process during the UI execution time.
Inside your static folder you should create a .js file with the following config:
App Path/static/js/keep.alive.js
Inside every HTML file used by the UI you should add the following lines:
An that’s it!! Hope this work for you!
Change the idle_interval to 50.