echarts: [Bug] Documentation Website Not Loading
Version
latest
Link to Minimal Reproduction
https://echarts.apache.org/en/api.html
Steps to Reproduce
Currently the website at https://echarts.apache.org/en/api.html isn’t loading and throwing errors in both Firefox and Chrome. Errors below:
Refused to load the stylesheet 'https://fastly.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
api.html:12 Refused to load the stylesheet 'https://fastly.jsdelivr.net/npm/element-ui@2.15.14/lib/theme-chalk/index.css' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
$ is not defined
Uncaught TypeError: Cannot read properties of undefined (reading 'directive')
echartsDoc is not defined
Current Behavior
As mentioned above
Expected Behavior
Page loads properly
Environment
- OS:MacOS
- Browser: Firefox and Chrome
- Framework: N/A
Any additional comments?
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 38
- Comments: 27 (3 by maintainers)
https://www.devdoc.net/web/echarts-site-20190821/en/api.html#echarts
temp fix
This is due to the Content Security Policy. You can view the content by using the Chrome extension “Disable Content Security Policy.” However, please use this extension with caution.
Using that kind of extension is not something we can do at work. How long do we expect the website to be down for?
On Mon, 3 Feb 2025, 07:10 Avaray, @.***> wrote:
UPDATES
I’m going to close this issue as resolved. Please file a new issue if you encounter other unknown problems.
Thank you all for your reports.
We are extremely sorry for the unpleasant experience caused by the unavailability of the website. This was due to the update of the Content Security Policy by the Apache Software Foundation. We have adopted a temporary solution to ensure the accessibility of the website. If you still encounter any problems, please give us your feedback. We are currently communicating with ASF, hoping to further address the issue of access speed while ensuring network security.
Many official examples are still not showing, like https://echarts.apache.org/examples/en/editor.html?c=bar-race-country https://echarts.apache.org/examples/en/editor.html?c=bar-histogram https://echarts.apache.org/examples/en/editor.html?c=heatmap-bmap https://echarts.apache.org/examples/en/editor.html?c=animating-contour-on-globe&gl=1
Currently any file not coming from domain apache.org is refused.
Before, there were several other domains allowed, like baidu.com, jsdelivr.net, etc. So the security issue is not resolved quite yet.
@patcon, thank you for pointing that one out. I think the problem is due to an omission in a recent PR. I think this line 140 and the next should be updated as follows:
That could fix temporarily not only ecStat, but also all 3D/GL examples people are complaining about (#20801, #20786).
@plainheart ?
seems resolved now. But the examples inside still do not show, some error “echarts.apache.org refused to connect”
Wow, it works.
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
We are sorry about this. The ECharts website has to take some time to adapt to the new Content Security Policy of Apache server before March 1st.