diff --git a/CHANGELOG.md b/CHANGELOG.md index f46cc62f8f..8d60cf432a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ This project adheres to [Semantic Versioning](https://semver.org/). - [#1976](https://github.com/plotly/dash/pull/1976) Fix [#1962](https://github.com/plotly/dash/issues/1962) in which DatePickerSingle and DatePickerRange are extremely slow when provided a long list of disabled_days. +- [#2035](https://github.com/plotly/dash/pull/2035) Fix [#2033](https://github.com/plotly/dash/issues/2033) In-App error reporting does not render HTML. + ### Changed - [#2016](https://github.com/plotly/dash/pull/2016) Drop the 375px width from default percy_snapshot calls, keep only 1280px diff --git a/dash/dash-renderer/src/components/error/FrontEnd/FrontEndError.react.js b/dash/dash-renderer/src/components/error/FrontEnd/FrontEndError.react.js index 49939ea1de..83c638d4e0 100644 --- a/dash/dash-renderer/src/components/error/FrontEnd/FrontEndError.react.js +++ b/dash/dash-renderer/src/components/error/FrontEnd/FrontEndError.react.js @@ -109,9 +109,10 @@ function UnconnectedErrorContent({error, base}) { )} {/* Backend Error */} - {typeof error.html !== 'string' ? null : error.html.indexOf( - '
{/* Embed werkzeug debugger in an iframe to prevent diff --git a/dash/testing/browser.py b/dash/testing/browser.py index 63ea244592..4449f0abb5 100644 --- a/dash/testing/browser.py +++ b/dash/testing/browser.py @@ -5,6 +5,7 @@ import logging import warnings import percy +import requests from selenium import webdriver from selenium.webdriver.support import expected_conditions as EC @@ -188,8 +189,14 @@ def percy_snapshot( """ ) + try: self.percy_runner.snapshot(name=snapshot_name, widths=widths) + except requests.HTTPError as err: + # Ignore retries. + if err.request.status_code != 400: + raise err + if convert_canvases: self.driver.execute_script( """ const stash = window._canvasStash; @@ -204,9 +211,6 @@ def percy_snapshot( """ ) - else: - self.percy_runner.snapshot(name=snapshot_name, widths=widths) - def take_snapshot(self, name): """Hook method to take snapshot when a selenium test fails. The snapshot is placed under.