From 6f718c44367bf5607d848e0d37b51f097b73d8f4 Mon Sep 17 00:00:00 2001 From: philippe Date: Tue, 3 May 2022 12:58:39 -0400 Subject: [PATCH 1/3] Fix debugger html check. --- .../src/components/error/FrontEnd/FrontEndError.react.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 From 9a91e5edd8beb101361214966ff13692f1f7321b Mon Sep 17 00:00:00 2001 From: philippe Date: Tue, 3 May 2022 13:30:39 -0400 Subject: [PATCH 2/3] Ignore percy retry errors. --- dash/testing/browser.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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. From 773ad6780358e2aaf2e3c2d6cf79efbedcdd9f6a Mon Sep 17 00:00:00 2001 From: philippe Date: Tue, 3 May 2022 13:36:22 -0400 Subject: [PATCH 3/3] Update changelog. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) 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