I have the same multipage dash app running on 3 different machines (1 for dev, 2 for prod).
Everthing is running smooth for me and most users except for a few who have difficulties to even load the first page and get stuck on “loading…”.
User A may access one server fine but have issues when trying another. Vice versa for user B.
Opening the app in private mode seems to resolve the issue. Clearing the cache in normal mode didn’t help. Issue can happens with Edge or/and Chrome.
exemple error 1: SynthaxError: Unexpected token
exemple error 2: SynthaxError: missing catch
exemple error 3
“Loading chunk 790 failed. (missing: http://192.168.1.119:8050/_dash-component-suites/dash/dash_table/async-highlight.js)”
All servers share the same code via git.
packages version:
dash==2.14.2
dash-ag-grid==2.3.0
dash-bootstrap-components==1.4.0
dash-bootstrap-templates==1.0.8
dash-core-components==2.0.0
dash-daq==0.5.0
dash-html-components==2.0.0
dash-table==5.0.0
from dash import Dash, dcc, html, Input, Output, callback, State
from dash_bootstrap_templates import load_figure_template
from flask import Flask, flash, redirect
from flask_login import (
login_user,
logout_user,
LoginManager,
UserMixin,
current_user,
login_required,
)
load_figure_template("superhero")
flask_server = Flask(__name__)
flask_server.config["SECRET_KEY"] = "XXX"
login_manager = LoginManager()
login_manager.session_protection = None
login_manager.init_app(flask_server)
login_manager.login_view = '/login'
class User(UserMixin):
def __init__(self, id):
self.id = id
@login_manager.user_loader
def user_loader(email):
user = User(email)
return user
@flask_server.route("/logout")
def logout():
logout_user()
return redirect("/login")
app = Dash(
__name__,
server=flask_server,
external_stylesheets=[dbc.themes.SUPERHERO],
suppress_callback_exceptions=True,
)
if __name__ == "__main__":
app.run(debug=True, host="0.0.0.0")