Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix incorrect MIME/Content-Type for JavaScript on misconfigured Windows systems#4468

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
minrk merged 2 commits intojupyter:masterfromunknown repositoryMar 27, 2019
Merged

Conversation

@ghost
Copy link

@ghostghost commentedMar 10, 2019
edited by minrk
Loading

Problem

Tornado serves JavaScript files withContent-Type: text/plain, which causes the browser to reject loading the JavaScript, due to Strict MIME checking enabled in the last version. This problem appears to manifest only on Windows hosted notebooks.

Solution

Similar to the CSS fix, add in a mimetypes override for .js files

closes#4467

Forser, RayCarbonyl, wayoungofustc, Taaji, BLGAmazingJ, Tim-Chard, asteppke, mikofski, and MRJIANCHEN reacted with thumbs up emojistonebig, dmitry-vorobiev, gaborvecsei, and MRJIANCHEN reacted with heart emoji
@raeperd
Copy link

thanks! it works very well now!
I love you!

@ejmoya
Copy link

In w10 I have the same problem but it does not solve only with this. To solve it, I went to the directory"AppData\Local\Programs\Python\Python37\Lib\site-packages\notebook\templates" and edit the file "page.html" on line 18, changing the double quotes with single quotes.
Before:
<script src="{{static_url("components/es6-promise/promise.min.js")}}" type="text/javascript" charset="utf-8"></script>

After:
<script src="{{static_url('components/es6-promise/promise.min.js')}}" type="text/javascript" charset="utf-8"></script>

SharsDela, ejmoya, and Palladiumm reacted with thumbs up emoji

@lovettchris
Copy link

I had the blank page problem today, and this PR fixed it, thanks. Just had to do CTRL+F5 to force refresh and my Jupyter notebooks are back in business. Thanks!

AnMa12, cconw, tianyilt, sidharthsamanta, and LianShuobin reacted with thumbs up emojiAnMa12 reacted with hooray emojiAnMa12, cconw, and ssurananitish reacted with heart emojiAnMa12 reacted with rocket emoji

@AnMa12
Copy link

I had the blank page problem today, and this PR fixed it, thanks. Just had to do CTRL+F5 to force refresh and my Jupyter notebooks are back in business. Thanks!

Thank you sir!

@ghost
Copy link
Author

Thank you so much for fixing this, really hope this is merged soon.

@ghernie
Copy link

Thanks a lot mate !! It solved my MINE issue 👍

@deepandas11
Copy link

How to use this?

@BLGAmazingJ
Copy link

Thx^_^
Problem fixed.

@BLGAmazingJ
Copy link

How to use this?

You need to locate noteapp.py and override that part.

@gaborvecsei
Copy link

gaborvecsei commentedMar 23, 2019
edited
Loading

Thanks for the fix! ❤️

@kzq666666
Copy link

I am still confused about the details of solution

monocongo, AndrissP, viniciusmonteiro, and EAly reacted with thumbs up emoji

@matt-bernhardt
Copy link

matt-bernhardt commentedMar 26, 2019
edited
Loading

This sounds like it would solve the problem I've had when starting to work with Jupyter, but I'm not sure how to check out this branch (via pip) to confirm this.

I'm trying to use Jupyter with Windows 10 using any of Chrome, Firefox, or Edge. All three browsers exhibit the same behavior - a blank browser window, no apparent errors in the terminal console, but warnings and errors in the browser console relating to MIME type problems. I'm including screenshots here for reference.

image
image
image

Edit: paying close attention toBLGAmazingJ and the diff in this PR, I was able to find the right file and make this change manually. Once this was done, I no longer have the described problem.

monocongo reacted with thumbs up emoji

@minrk
Copy link
Member

Excellent, thank you!

@minrkminrk merged commit7a13d5c intojupyter:masterMar 27, 2019
@minrkminrk changed the titleFix incorrect MIME/Content-Type for JavaScriptFix incorrect MIME/Content-Type for JavaScript on misconfigured Windows systemsMar 27, 2019
@minrk
Copy link
Member

@meeseeksdev backport to 5.7.x

asteppke reacted with thumbs up emoji

meeseeksmachine pushed a commit to meeseeksmachine/notebook that referenced this pull requestMar 27, 2019
minrk added a commit that referenced this pull requestMar 27, 2019
…8-on-5.7.xBackport PR#4468 on branch 5.7.x (Fix incorrect MIME/Content-Type for JavaScript on misconfigured Windows systems)
@monocongo
Copy link

I have tried moving my version of notebook back to 5.7.4 but no luck so far. Can someone comment as to how I can build from source into my conda environment, in order to leverage the fix described in the comments above? Or will this fix be included in an upcoming release that I can utilize viaconda update notebook?

BTW I have tried the following command, but it failed with a compilation error regarding a missing "bower" (which I was not able to find/install, so I gave up):

$ pip install git+git://github.com/jupyter/notebook@5.7.x

Thanks in advance for any assistance with this!

@minrk
Copy link
Member

Working on publishing 5.7.7 now.

nodejs and npm are needed to build notebook from source.

majiang and jamesmyatt reacted with heart emoji

@jamesmyatt
Copy link

Is there a way of fixing the root cause, i.e. that the registry has the wrong mime type?

@minrk
Copy link
Member

I'm not a Windows expert, but fromthis, it appears to be inHKEY_CLASSES_ROOT\MIME\Database\Content Type. Ithink the root cause is installation of certain software may modify this database, perhaps as a way of associating itself as an opener for file extensions.

jamesmyatt reacted with thumbs up emoji

@minrk
Copy link
Member

5.7.7 ison pypi

@jamesmyatt
Copy link

jamesmyatt commentedMar 28, 2019
edited
Loading

Thanks,@minrk . I found it inHKCR\.js\Content Type (for Windows 10) and changing that also fixed this problem.

@EAly
Copy link

Can anyone help how to apply this solution, i.e how to "add in a mimetypes override for .js files"?!

@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsMar 26, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

5.7.7

Development

Successfully merging this pull request may close these issues.

notebook gives blank page when start

15 participants

@raeperd@ejmoya@lovettchris@AnMa12@ghernie@deepandas11@BLGAmazingJ@gaborvecsei@kzq666666@matt-bernhardt@minrk@monocongo@jamesmyatt@EAly@satchel3037

[8]ページ先頭

©2009-2025 Movatter.jp