Dash[testing] DashAppLoadingError

I’ve been in this error. DashAppLoadingError . There’s a other computer with same configuration and that’s working there. The chromedriver can opens and close but the app doesn’t open. Please, cold someone help me ?

app_test.py:107 (test_bsly001_falsy_child)
self = <dash.testing.composite.DashComposite object at 0x7f8a17ea9b80>
url = None, timeout = 10

def wait_for_page(self, url=None, timeout=10):
    """wait_for_page navigates to the url in webdriver wait until the
    renderer is loaded in browser.

    use the `server_url` if url is not provided.
    """
    self.driver.get(self.server_url if url is None else url)
    try:
      self.wait_for_element_by_css_selector(
            self.dash_entry_locator, timeout=timeout
        )

/home/raphadeveloper/anaconda3/envs/base7/lib/python3.9/site-packages/dash/testing/browser.py:361:


self = <dash.testing.composite.DashComposite object at 0x7f8a17ea9b80>
selector = ‘#react-entry-point’, timeout = 10

def wait_for_element_by_css_selector(self, selector, timeout=None):
    """Explicit wait until the element is present, timeout if not set,
    equals to the fixture's `wait_timeout` shortcut to `WebDriverWait` with
    `EC.presence_of_element_located`."""
  return self._wait_for(
        EC.presence_of_element_located,
        ((By.CSS_SELECTOR, selector),),
        timeout,
        "timeout {}s => waiting for selector {}".format(
            timeout if timeout else self._wait_timeout, selector
        ),
    )

/home/raphadeveloper/anaconda3/envs/base7/lib/python3.9/site-packages/dash/testing/browser.py:273:


self = <dash.testing.composite.DashComposite object at 0x7f8a17ea9b80>
method = <class ‘selenium.webdriver.support.expected_conditions.presence_of_element_located’>
args = ((‘css selector’, ‘#react-entry-point’),), timeout = 10
msg = ‘timeout 10s => waiting for selector #react-entry-point

def _wait_for(self, method, args, timeout, msg):
    """Abstract generic pattern for explicit WebDriverWait."""
    _wait = (
        self._wd_wait if timeout is None else WebDriverWait(self.driver, timeout)
    )
    logger.debug(
        "method, timeout, poll => %s %s %s",
        method,
        _wait._timeout,  # pylint: disable=protected-access
        _wait._poll,  # pylint: disable=protected-access
    )
  return _wait.until(method(*args), msg)

/home/raphadeveloper/anaconda3/envs/base7/lib/python3.9/site-packages/dash/testing/browser.py:262:


self = <selenium.webdriver.support.wait.WebDriverWait (session=“99f2375801aa6cda92c69d27f860c0bc”)>
method = <selenium.webdriver.support.expected_conditions.presence_of_element_located object at 0x7f8a216df2b0>
message = ‘timeout 10s => waiting for selector #react-entry-point

def until(self, method, message=''):
    """Calls the method provided with the driver as an argument until the \
    return value is not False."""
    screen = None
    stacktrace = None

    end_time = time.time() + self._timeout
    while True:
        try:
            value = method(self._driver)
            if value:
                return value
        except self._ignored_exceptions as exc:
            screen = getattr(exc, 'screen', None)
            stacktrace = getattr(exc, 'stacktrace', None)
        time.sleep(self._poll)
        if time.time() > end_time:
            break
  raise TimeoutException(message, screen, stacktrace)

E selenium.common.exceptions.TimeoutException: Message: timeout 10s => waiting for selector #react-entry-point

/home/raphadeveloper/anaconda3/envs/base7/lib/python3.9/site-packages/selenium/webdriver/support/wait.py:80: TimeoutException

The above exception was the direct cause of the following exception:

dash_duo = <dash.testing.composite.DashComposite object at 0x7f8a17ea9b80>

def test_bsly001_falsy_child(dash_duo):
    # 3. define your app inside the test function
    app = dash.Dash(
        __name__,
        url_base_pathname=BASE_PATH,
        meta_tags=[{"name": "viewport", "content": "width=device-width"}],
        external_stylesheets=[dbc.themes.DARKLY],
        prevent_initial_callbacks=True, suppress_callback_exceptions=True
    )
    df_tk_users = cfg.df_tk_users = get_tekton_users()
    # auth = dash_auth.BasicAuth(app, dict(zip(df_tk_users.login, df_tk_users.password)))
    app.title = "Tekton Finance"
    server = app.server

    app.layout = serve_layout
    Display.df_users = df_tk_users
    Display.page(app)
    Display.update_tables(app)
    Display.disable_all(app)
    Display.change_url(app)
    Display.callback_screen_size(app)
    Accts.callbacks(app)
    Models.callbacks(app)
    Header.callback_user_password(app)
    # 4. host the app locally in a thread, all dash server configs could be
    # passed after the first app argument
  dash_duo.start_server(app)

app_test.py:134:


/home/raphadeveloper/anaconda3/envs/base7/lib/python3.9/site-packages/dash/testing/composite.py:16: in start_server
self.server_url = self.server.url
/home/raphadeveloper/anaconda3/envs/base7/lib/python3.9/site-packages/dash/testing/browser.py:621: in server_url
self.wait_for_page()


self = <dash.testing.composite.DashComposite object at 0x7f8a17ea9b80>
url = None, timeout = 10

def wait_for_page(self, url=None, timeout=10):
    """wait_for_page navigates to the url in webdriver wait until the
    renderer is loaded in browser.

    use the `server_url` if url is not provided.
    """
    self.driver.get(self.server_url if url is None else url)
    try:
        self.wait_for_element_by_css_selector(
            self.dash_entry_locator, timeout=timeout
        )
    except TimeoutException as exc:
        logger.exception("dash server is not loaded within %s seconds", timeout)
        logger.debug(self.get_logs())
      raise DashAppLoadingError(
            "the expected Dash react entry point cannot be loaded"
            " in browser\n HTML => {}\n Console Logs => {}\n".format(
                self.driver.find_element_by_tag_name("body").get_property(
                    "innerHTML"
                ),
                "\n".join((str(log) for log in self.get_logs())),
            )
        ) from exc

E dash.testing.errors.DashAppLoadingError: the expected Dash react entry point cannot be loaded in browser
E HTML =>

Internal Server Error


E

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.


E
E Console Logs =>

/home/raphadeveloper/anaconda3/envs/base7/lib/python3.9/site-packages/dash/testing/browser.py:367: DashAppLoadingError