Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The resource from “https://cdn.jsdelivr.net/npm/plotly.js/dist/plotly.min.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff). #3448

Closed
rusdiy opened this issue Nov 2, 2021 · 11 comments

Comments

@rusdiy
Copy link

rusdiy commented Nov 2, 2021

Recently, I get this error when using plotly in html. But weirdly enough, it does not happened in all device/browser.
I use this code to embed the html inside my web program:
html = fig.to_html(include_plotlyjs="require", full_html=False, config=config)
Image of the Console Error
Plotly Error

@MartinKolarik
Copy link

Hi, Martin from jsDelivr here. We removed the size limit for that package so it should load now.

@rusdiy
Copy link
Author

rusdiy commented Nov 2, 2021

The issue has already been resolved, and it is already worked now. Thank you very much.

@rusdiy rusdiy closed this as completed Nov 2, 2021
@nicolaskruchten
Copy link
Contributor

🙈 thanks @MartinKolarik !

cc @archmoj @alexcjohnson ;)

@archmoj
Copy link
Contributor

archmoj commented Nov 3, 2021

Which version(s) of plotly.js cased this issue?

@MartinKolarik
Copy link

@archmoj v2.6.0 went above 100 MB, which is currently our default limit for the cdn.

@archmoj
Copy link
Contributor

archmoj commented Nov 3, 2021

Wondering if one could switch to https://cdn.jsdelivr.net/npm/plotly.js-dist instead?

@MartinKolarik
Copy link

Wondering if one could switch to https://cdn.jsdelivr.net/npm/plotly.js-dist instead?

Quite possibly, but the main package also seems to include localization support and other dist files, which I'm not sure if are available elsewhere.

@MartinKolarik
Copy link

Not sure how the npm cli calculates it but the final version indeed is 107 MB.

@archmoj
Copy link
Contributor

archmoj commented Nov 3, 2021

I found the source of this problem.
FYI - I opened plotly/plotly.js#6007 and I'll work on the fix for it.

@archmoj
Copy link
Contributor

archmoj commented Nov 3, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants