You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "CharlesNkdl (via GitHub)" <gi...@apache.org> on 2024/05/27 14:38:15 UTC

[I] Problem Exporting Charts as Diagram [superset]

CharlesNkdl opened a new issue, #28713:
URL: https://github.com/apache/superset/issues/28713

   ### Bug description
   
   Hi Superset Community,
   
   I have a problem exporting Charts as Image, from multiple Dashboards and instance of Superset.
   
   
   
   
   ### How to reproduce the bug
   
   1. Go to a Dashboards with Charts
   2. Click the three dots on the top right of a charts
   3. Download => Download as Image
   
   ### Screenshots/recordings
   
   Here is the result for my charts : 
   ![valeur-moyennes-selon-surface-2024-05-27T14-20-12 529Z](https://github.com/apache/superset/assets/100453363/127e9e1e-e5b7-49dc-a538-f1401d9a9ed8)
   
   I was wondering if maybe this was related to the fact that the query is quite complicated + a lot of filters in the dashboard so i tried to export another charts from the examples datasets.
   
   ![genders-2024-05-27T14-21-50 342Z](https://github.com/apache/superset/assets/100453363/a736255c-cdd2-4469-bae8-d7e95fcd02be)
   
   Not quite right too...
   
   ### Superset version
   
   4.0.1
   
   ### Python version
   
   3.10
   
   ### Node version
   
   Not applicable
   
   ### Browser
   
   Firefox
   
   ### Additional context
   
   I use Apache Superset 4.0.1 in Local using Windows and a WSL Backend, but this problem was also on my prod. env with Apache Superset 4.0.0 used with Cloudron which handles the deployment.
   
   Even if template processing is ON, i can't download image, with or without Jinja Templating in them.
   
   Here are my superset_config.py flags in local : 
   ```
   SECRET_KEY` = ""
   
   SQLALCHEMY_DATABASE_URI = ''
   
   WTF_CSRF_ENABLED = True (tried with False too...)
   WTF_CSRF_EXEMPT_LIST = []
   # A CSRF token that expires in 1 year
   WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365
                                                                                                                   
   MAPBOX_API_KEY = ''
   
   LANGUAGES = {
           'en': {'flag': 'us', 'name': 'English'},
           'fr': {'flag': 'fr', 'name': 'French'}
   }
   
   ENABLE_JAVASCRIPT_CONTROLS = True
   
   APP_NAME = "Superset Local"
   
   WELCOME_MESSAGE = "secret"
   
   PRIMARY_COLOR = "green"
   
   ENABLE_TEMPLATE_PROCESSING = True
   
   CONTENT_SECURITY_POLICY_WARNING = False
   
   TALISMAN_ENABLED = False
   
   DEFAULT_FEATURE_FLAGS = {
           "ENABLE_TEMPLATE_PROCESSING" : True,
   }
   ```
   
   Here is my python stack trace, minus the get and post request : 
   ````
   Superset.explore_json This API endpoint is deprecated and will be removed in version 4.0.0
   2024-05-27 16:34:36,711:WARNING:superset.views.base:Superset.explore_json This API endpoint is deprecated and will be removed in version 4.0.0
   2024-05-27 16:34:36,717:DEBUG:parsedatetime:eval - with context - False, False
   ```
   
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "bhavabhuthi (via GitHub)" <gi...@apache.org>.
bhavabhuthi commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-3044843977

   Superset Version: `4.1.2`
   
   Firefox Version: `139.0.1` (64-bit) [Mozilla Firefox for Arch Linux]
   
   Chromium Version: Version `137.0.7151.68` (Official Build) Arch Linux (64-bit)
   
   
   Same problem here as well.
   
   When I download the chart as Image in dashboard, the feature is working for Chromium browser without the need for aforementioned configuration
   
   ```
   FEATURE_FLAGS = {
   DASHBOARD_VIRTUALIZATION: False
   }
   ```
   
   Whereas it downloads a cropped image in the Firefox browser. 
   
   Images below:
   Dashboard:
   ![Image](https://github.com/user-attachments/assets/293f5039-2891-44bf-80f1-d11cd3ae664a)
   
   
   Firefox downloaded Image: 
   ![Image](https://github.com/user-attachments/assets/fd2d6476-cbc2-4d04-b405-84cf4a1d8d85)
   
   
   Chromium Downloaded Image
   ![Image](https://github.com/user-attachments/assets/064c8fe4-7488-4755-96bb-4a579a228874)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Diagram [superset]

Posted by "visharavana (via GitHub)" <gi...@apache.org>.
visharavana commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2134420821

   @CharlesNkdl Which browser are you using? I am also facing this problem in the Firefox browser, but when I use Chrome, it's working well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "aukfood (via GitHub)" <gi...@apache.org>.
aukfood commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-3322665105

   Hello, I have same problem with 6.0.0rc2, I had 
   ```
   114 # Add Dashboard virtualization
   115 FEATURE_FLAGS = {
   116         "ALERT_REPORTS": True,
   117         "DASHBOARD_VIRTUALIZATION": False,
   118                 }
   ```
   And the result with firefox and chromium : 
   
   ![Image](https://github.com/user-attachments/assets/7782fc36-8d3b-4a7b-846c-7b8f7a377717)
   
   Regards


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Diagram [superset]

Posted by "CharlesNkdl (via GitHub)" <gi...@apache.org>.
CharlesNkdl commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2139827021

   @visharavana I'm using Firefox. The solution was so simple i just didn't thought of it, i'm kind of embarassed, thank you ! I tried on Microsoft Edge and it worked
   
   Maybe due to firefox and safari not being chromium-based, compared to Chrome and Edge


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "tejavegesna-lb (via GitHub)" <gi...@apache.org>.
tejavegesna-lb commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-3382321794

   Individual query/grid download worked find for me on chrome and firefox after adding these feature flags on superset 5.0.0
   
   ```
         "ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS": True,
         "THUMBNAILS": True,
         "ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT": True,
   ```
   
   ```
       THUMBNAIL_CACHE_CONFIG = {
           'CACHE_TYPE': 'RedisCache',
           'CACHE_DEFAULT_TIMEOUT': 86400,
           'CACHE_KEY_PREFIX': 'superset_thumbnail_cache',
           'CACHE_REDIS_URL': f"{env('REDIS_PROTO')}://{env('REDIS_HOST')}:{env('REDIS_PORT')}/{env('REDIS_CELERY_DB')}?ssl_cert_reqs={env('REDIS_SSL_CERT_REQS')}",
       }
   ```
   
   I still have issues when downloading whole dashboard as pdf or image which doesnt work


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "xiaoqufengdi (via GitHub)" <gi...@apache.org>.
xiaoqufengdi commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2232920170

   I solved the problem.
   https://github.com/apache/superset/pull/29614#issue-2413172382


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-5770022206

   Thanks @khushboogupta10october, that's a plausible read of the `dom-to-image-more` foreignObject gap on WebKit. Want to open the PR for the Safari path? `html2canvas` already comes in via `dom-to-pdf`, so it shouldn't need a new dependency.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "Gordonei (via GitHub)" <gi...@apache.org>.
Gordonei commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-5291090703

   Can confirm `6.1.0` with Firefox 153 on Windows is working with image export, but PDF is cutting off on what is currently visible in the viewport.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "LHARISMENDY (via GitHub)" <gi...@apache.org>.
LHARISMENDY commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2754736243

   Same problem here, is there a temporary solution?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "geekdinazor (via GitHub)" <gi...@apache.org>.
geekdinazor commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-3112925377

   Problem remains in version 5.0.0.  We tried to add 
   
   ```py
   FEATURE_FLAGS = {
       DASHBOARD_VIRTUALIZATION: False
   }
   ```
   in superset_config.py but it gives error: 
   
   ```
   [2025-07-24 10:23:24 +0000] [54] [ERROR] Exception in worker process
   Traceback (most recent call last):
     File "/app/.venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker
       worker.init_process()
     File "/app/.venv/lib/python3.10/site-packages/gunicorn/workers/gthread.py", line 94, in init_process
       super().init_process()
     File "/app/.venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 135, in init_process
       self.load_wsgi()
     File "/app/.venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 147, in load_wsgi
       self.wsgi = self.app.wsgi()
     File "/app/.venv/lib/python3.10/site-packages/gunicorn/app/base.py", line 66, in wsgi
       self.callable = self.load()
     File "/app/.venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 57, in load
       return self.load_wsgiapp()
     File "/app/.venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp
       return util.import_app(self.app_uri)
     File "/app/.venv/lib/python3.10/site-packages/gunicorn/util.py", line 423, in import_app
       app = app(*args, **kwargs)
     File "/app/superset/app.py", line 37, in create_app
       app.config.from_object(config_module)
     File "/app/.venv/lib/python3.10/site-packages/flask/config.py", line 231, in from_object
       obj = import_string(obj)
     File "/app/.venv/lib/python3.10/site-packages/werkzeug/utils.py", line 596, in import_string
       __import__(import_name)
     File "/app/superset/config.py", line 1955, in <module>
       import superset_config
     File "/app/pythonpath/superset_config.py", line 57, in <module>
       DASHBOARD_VIRTUALIZATION: False
   NameError: name 'DASHBOARD_VIRTUALIZATION' is not defined
   ```
   
   We use official Apache Superset 5.0.0 Docker image from [Docker Hub](https://hub.docker.com/layers/apache/superset/v5.0.0/images/sha256-2f62fe152008e19669e2402a71e174f44808cbf2ebb7665e634f21feed1e442d).  
   
    Chart image look incorrectly cropped when downloaded in Firefox. We tested it on  Firefox 140.0.4 (64 bit; Windows/Linux).  This problem not occurs on Chrome 138.0.7204.157 (Linux) and Chrome 138.0.7204.159  (Windows).     
   
   Selected chart:
   <img width="1084" height="526" alt="Image" src="https://github.com/user-attachments/assets/9b0bbb7e-283f-461c-9790-7aff23ed10a5" />
   
   Output in Firefox (Which is broken):
   ![Image](https://github.com/user-attachments/assets/60ebc047-51ec-4fe5-bb31-444aa22a3d2c)
   
   Output in Chrome (Which is good):
   
   ![Image](https://github.com/user-attachments/assets/7a151b09-e4d1-4f11-86ec-e4e7e96a964c)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "khushboogupta10october (via GitHub)" <gi...@apache.org>.
khushboogupta10october commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-5250337388

   This is still reproducible in 6.1.0. Root cause : dom-to-image-more  wraps DOM in SVG <foreignObject> -> safari blocks this. 
   Fix: Use html2canvas  for the Safari path. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Diagram [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2138137219

   Seems to be an issue in Safari too. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "aukfood (via GitHub)" <gi...@apache.org>.
aukfood commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-3384324686

   @tejavegesna-lb it seems don't work with 6.0.0rc2
   
   ```
   # Modification THUMBNAIL_CACHE_CONFIG
   THUMBNAIL_CACHE_CONFIG = {
           'CACHE_TYPE': 'RedisCache',
           'CACHE_DEFAULT_TIMEOUT': 86400,
           'CACHE_KEY_PREFIX': 'superset_thumbnail_cache',
           "CACHE_REDIS_HOST": REDIS_HOST,
           "CACHE_REDIS_PORT": REDIS_PORT,
           "CACHE_REDIS_DB": REDIS_RESULTS_DB,
   }
   
   ...
   
   # Add Dashboard virtualization
   FEATURE_FLAGS = {
   	"ALERT_REPORTS": True,
   	"DASHBOARD_VIRTUALIZATION": False,
           "ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS": True,
           "ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT": True,
   	"THUMBNAILS": True
   }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #28713: Problem Exporting Charts as Image
URL: https://github.com/apache/superset/issues/28713


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "doriansechal (via GitHub)" <gi...@apache.org>.
doriansechal commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2739999716

   Same problem with Firefox and Safari, but it works on Chromium-based engines (Brave, Chrome...).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "stasDomb (via GitHub)" <gi...@apache.org>.
stasDomb commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-4458597020

   It doesn't work in 6.1.0 release


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-5883285514

   This traces to Safari blocking `dom-to-image-more`'s SVG `foreignObject` step, and #44529 has an html2canvas fallback for it in review. Still ironing out a deck.gl WebGL capture edge case there, but it's close.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-5028981316

   Still open across a lot of versions and both browsers. Sounds like a real Firefox/Safari-specific rendering bug in the image capture path. Anyone want to pin it down with a Playwright repro so we can actually fix it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2957568808

   These all seem like they might effectively be the same issue:
   
   https://github.com/apache/superset/issues/29394
   https://github.com/apache/superset/issues/31158
   https://github.com/apache/superset/issues/29719
   https://github.com/apache/superset/issues/28713
   https://github.com/apache/superset/issues/27532
   
   Can anyone here test this with DASHBOARD_VIRTUALIZATION set to `false`? I have a suspicion that may fix it. If so, we can probably just disable viewport virtualization when the headless browser is building the screencap.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "stasDomb (via GitHub)" <gi...@apache.org>.
stasDomb commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2173530028

   I still have this type of problem
   ![all-final-acceptance-2024-06-17T13-44-33 596Z](https://github.com/apache/superset/assets/27229336/e37eb1e9-c99c-4570-b557-4ba83bec1409)
   
   Version 4.0.1 (4.0.0)
   I added to **Feature Flags**:
   ```
   FEATURE_FLAGS = {
             "DASHBOARD_CROSS_FILTERS": True,
             "DASHBOARD_EDIT_CHART_IN_NEW_TAB": True,
             "DASHBOARD_RBAC": True,
             "EMBEDDED_SUPERSET": True,
             "ENABLE_TEMPLATE_PROCESSING": True,
             "PLAYWRIGHT_REPORTS_AND_THUMBNAILS": True
           }
   ```
   But it doesn't work. In Safari there are now charts. In Chrome there are a few (as in picture).
   Does anybody can help with this ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-5209328390

   The linked fix in `#29614` closed without landing, and export still goes through `dom-to-image-more`, which has known Firefox/Safari gaps. Can anyone confirm this still repros on a recent release? Anyone want to open a new/revised PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-5787615403

   Nice, thanks @hadimobarra! Taking a look at #44529.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "doriansechal (via GitHub)" <gi...@apache.org>.
doriansechal commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2958245264

   I tested the suggested fix with DASHBOARD_VIRTUALIZATION = False in my superset_config.py but the issue persists on both Firefox and Safari


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "stanislav-dombrovskiy-dp (via GitHub)" <gi...@apache.org>.
stanislav-dombrovskiy-dp commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2694104504

   Version 4.1.1
   Google Chrome - Version 133.0.6943.142 (Official Build) (arm64)
   It doesn't work (pdf or jpg)
   
   <img width="1419" alt="Image" src="https://github.com/user-attachments/assets/e8465efa-1928-4a08-9ae0-41a85ea3a7a1" />


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "Gordonei (via GitHub)" <gi...@apache.org>.
Gordonei commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2692850793

   Also seeing this with `4.1.1` and Firefox `135.0.1`, for both dashboards **and** charts:
   
   ![Image](https://github.com/user-attachments/assets/df97c99b-27c4-462d-b04b-ae596cbadcc1)
   
   Chrome and M$ Edge seem to be working fine. Not sure if it's relevant or not, but the partial Firefox download seems to be wider than the complete Chrome one.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Diagram [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-2133630186

   <!-- Greeting -->
   Hello @CharlesNkdl, I'm here to help you with the issue you're facing. I'm a bot that can assist you with bug resolution, answer your questions, and guide you to become a contributor. Let's work together to get this sorted out.
   
   <!-- Answer -->
   To resolve the issue of exporting charts as blank images from multiple dashboards in Apache Superset version 4.0.1, you need to ensure that the charts are fully loaded before initiating the export process. The provided code snippet shows the `handleBulkChartExport` function, which handles the export of charts.
   
   Here is the relevant part of the code:
   
   ```tsx
   const handleBulkChartExport = (chartsToExport: Chart[]) => {
       const ids = chartsToExport.map(({ id }) => id);
       handleResourceExport('chart', ids, () => {
         setPreparingExport(false);
       });
       setPreparingExport(true);
     };
   ```
   
   To ensure that charts are fully loaded before exporting, you might need to add a check to confirm that the charts are rendered and ready. This can be done by verifying the loading state and ensuring that the charts are not in a loading state before calling the `handleBulkChartExport` function.
   
   Here is an example of how you might modify the function to include such a check:
   
   ```tsx
   const handleBulkChartExport = (chartsToExport: Chart[]) => {
       if (loading) {
         addDangerToast(t('Charts are still loading. Please wait until all charts are fully loaded before exporting.'));
         return;
       }
   
       const ids = chartsToExport.map(({ id }) => id);
       handleResourceExport('chart', ids, () => {
         setPreparingExport(false);
       });
       setPreparingExport(true);
     };
   ```
   
   This modification ensures that the export process is only initiated when the charts are fully loaded, preventing the issue of exporting blank images <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/features/home/ChartTable.tsx)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   <details open>
   <summary>
   
   #### Details
   </summary>
   
   **About Dosu**
   This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research.
   
   Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
   </details>
   
   *To continue the conversation, mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "stanislav-dombrovskiy-dp (via GitHub)" <gi...@apache.org>.
stanislav-dombrovskiy-dp commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-3005192929

   I've tried 
   ```
   FEATURE_FLAGS = {
   DASHBOARD_VIRTUALIZATION: False
   }
   ```
   And it helped in Chrome. In Safari still doesn't work.
   I'm confused a bit, because in the docs this parameter is False by default.
   But anyway Thank you! 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Problem Exporting Charts as Image [superset]

Posted by "hadimobarra (via GitHub)" <gi...@apache.org>.
hadimobarra commented on issue #28713:
URL: https://github.com/apache/superset/issues/28713#issuecomment-5777770941

   Opened a PR for the Safari/WebKit path suggested above: #44529. It routes chart/dashboard image capture through `html2canvas` when running on Safari, and leaves the existing `dom-to-image-more` pipeline untouched on other engines. Feedback welcome.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org