martyngigg commented on PR #30134:
URL: https://github.com/apache/superset/pull/30134#issuecomment-2572849976

   Happy New Year!
   
   I've investigated further and found the issue with "Export to PDF" & 
"Download image" not working on dashboards. The issue seems to be the 
interaction of the headless browser and `WEBDRIVER_BASEURL`. In the docker 
compose setup `superset_config.py` suggests setting 
`WEBDRIVER_BASEURL=http://superset_app:8088/`, so accessing the superset 
instance directly and skipping the nginx reverse proxy. This is fine when there 
is no url prefix set as the paths that both the reverse proxy and the superset 
app see are the same. When there is a url prefix set it is baked into the 
javascript files that webpack builds and when accessing the superset app 
directly the extra prefix part of the path raises an error in the superset app 
and the screenshot generation fails.
   
   A fix/workaround (??) seems to be to set `WEBDRIVER_BASEURL = 
f"http://superset_nginx{base_path}/"` but this also requires removing this 
[with 
statement](https://github.com/apache/superset/blob/109e6c69ff25b82b603a4daff40207250788e6b1/superset/utils/urls.py#L35)
 that seems to set a test context that doesn't know about the prefix. I'm not 
sure of the knock on effects of this. @rusackas Would you know someone who 
could comment on this or possibly suggest an alternative approach?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to