Help me to solve these Errors: “Cannot read ...'fantasy-land/map' and “Given action "SET_LAYOUT", ...”

I deployed my dash application to a rental server service.
When I access to my web page(“https://<my_domain>/dash/test/”), the message “Loading…” appeared and blank page is returned.

I got following result when I reload after Result1.

I use following codes.

  • index.cgi
# -*- coding: utf-8 -*-

import cgitb
#cgitb.enable()

from wsgiref.handlers import CGIHandler
from sys import path

path.insert(0, '/home/<user>/public_html/<my_domain>/dash/test')

from testDash import app
application = app.server
#from helloFlask import app as application

class ProxyFix(object):
  def __init__(self, application):
      self.app = application
  def __call__(self, environ, start_response):
      environ['SERVER_NAME'] = "<my_domain>"
      environ['SERVER_PORT'] = "80"
      environ['REQUEST_METHOD'] = "GET"
      environ['SCRIPT_NAME'] = ""
      environ['PATH_INFO'] = "/"
      environ['QUERY_STRING'] = ""
      environ['SERVER_PROTOCOL'] = "HTTP/1.1"
      return self.app(environ, start_response)

if __name__ == '__main__':
   cgitb.enable()
   application.wsgi_app = ProxyFix(application.wsgi_app)
   CGIHandler().run(application)
  • testDash,.py
import dash_html_components as html
import dash_core_components as dcc
import plotly.express as px
import pandas as pd
from flask import Flask

from os import environ
from argparse import ArgumentParser

#parser = ArgumentParser()
#parser.add_argument('-p', '--port', default=80)
#args = parser.parse_args()

#server = Flask(__name__)
app = dash.Dash(__name__,) #server=server)
#app = dash.Dash(__name__, server=server, requests_pathname_prefix='/dash/test/')

app.config.update({
  'routes_pathname_prefix': '/',
  'requests_pathname_prefix': '/dash/test/',
})
app.scripts.config.serve_locally = False
app.css.config.serve_locally = False

app.layout = html.Div(children=[
    html.H1(children='Hello Dash'),
], id='my-id')

if __name__ == '__main__':
    app.run_server(debug=False,) #port=args.port)
  • .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /home/<user>/public_html/<my_domain>/dash/test/index.cgi/$1 [QSA,L]

When I used a flask application(“helloFlask.py”) instep of the dash application, my web page was worked.

  • helloFlask.py
from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello, World!'

Please solve my problem.
My environment is next.

Python 3.8.9

Package              Version
-------------------- -------
Brotli               1.0.9
click                7.1.2
dash                 1.19.0
dash-core-components 1.15.0
dash-html-components 1.1.2
dash-renderer        1.9.0
dash-table           4.11.2
Flask                1.1.2
Flask-Compress       1.8.0
future               0.18.2
itsdangerous         1.1.0
Jinja2               2.11.3
MarkupSafe           1.1.1
numpy                1.20.0
pandas               1.2.1
pip                  21.3
plotly               4.14.3
python-dateutil      2.8.1
pytz                 2021.1
retrying             1.3.3
setuptools           53.0.0
six                  1.15.0
tenacity             8.0.1
Werkzeug             1.0.1