fiftyone
fiftyone copied to clipboard
[BUG] Chrome shows blank page of localhost:5151 and gives error: disallowed MIME type (“text/plain”) after fiftyone app launch, in Windows 10 x64
System information
Windows 10 21H2 19044.1889 (64bit) chrome 104.0.5112.102 (64bit) firefox: 103.0.2 (64bit) miniconda 4.12.0 Python 3.9.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)] (all installed from pip) fiftyone 0.16.5 fiftyone-brain 0.8.2 fiftyone-db 0.3.0 fiftyone-desktop 0.22.1 jupyterlab 3.4.4 ipywidgets 7.7.1
Commands to reproduce
quickstart.py
import fiftyone as fo
import fiftyone.zoo as foz
dataset = foz.load_zoo_dataset("quickstart")
if __name__ == "__main__":
# Ensures that the App processes are safely launched on Windows
session = fo.launch_app(dataset)
session.wait()
python quickstart.py
Describe the problem
http://localhost:5151/ shows blank page and give error in console of chrome and firefox, after fiftyone.launch_app in windows.
the errors are:
chrome 104.0.5112.102 (64bit) Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.
firefox: 103.0.2 (64bit) Loading module from “http://localhost:5151/assets/index.036df8dd.js” was blocked because of a disallowed MIME type (“text/plain”).
Other info / logs
fo.launch_app(dataset, desktop=True) popup the normal fiftyone window.
What areas of FiftyOne does this bug affect?
- [x ]
App
: FiftyOne application issue
attachments
One potential work-around is to use the desktop app:
session = fo.launch_app(dataset, desktop=True)
I enconutered the exactly the same issue above.
OS Name Microsoft Windows 10 Pro Version 10.0.19043 Build 19043 Chrome Version 105.0.5195.127 (Official Build) (64-bit)
conda (pip) packages: pip_list_cv_general.txt With the pip list above, desktop version does not work either.
After I upgraded my env with the following cmds
pip install --upgrade pip setuptools wheel
pip install --upgrade fiftyone
pip install --upgrade fiftyone[desktop]
Now desktop works fine, though the web version on my local machine still complains about plain text javascript loading (script tag with type=module).
Hello all, pardon the delay. We will work on a patch.
Note that this issue can be addressed by ensuring the mimetypes
package returns correct types. Some discussion can be found here
I am facing the same issue and none of the above solutions or workaround worked. The desktop version is also not working as expected.
I'm having the same problem i.e blank browser, and for the desktop version- nothing happens
It seems still not fixed
I found a solution for this bug.
I have the same problem, but the desktop version works for me.
Windows 11 Python 3.9 fiftyone 19.1
I tried all the above solutions, but none of them worked. It did point me in the right direction and after spending hours on it, I finally figured out the solution. Hoping it would help others too.
You have to change Registry settings for two keys. Open the Registry Editor and
- Go to
Computer\HKEY_CLASSES_ROOT\.js
and changeContent Type
toapplication/javascript
- Go to
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.js
and changeContent Type
toapplication/javascript
.
Then just restart your shell or jupyter kernel, and the app should start working on localhost. Make sure you force reload the app (Ctrl + Shift + R) to get rid of cached contents.
I tried all the above solutions, but none of them worked. It did point me in the right direction and after spending hours on it, I finally figured out the solution. Hoping it would help others too.
You have to change Registry settings for two keys. Open the Registry Editor and
- Go to
Computer\HKEY_CLASSES_ROOT\.js
and changeContent Type
toapplication/javascript
- Go to
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.js
and changeContent Type
toapplication/javascript
.Then just restart your shell or jupyter kernel, and the app should start working on localhost. Make sure you force reload the app (Ctrl + Shift + R) to get rid of cached contents.
Hi @ajaymaity , this is what i see. How do i modify the Content Type
?
I tried all the above solutions, but none of them worked. It did point me in the right direction and after spending hours on it, I finally figured out the solution. Hoping it would help others too. You have to change Registry settings for two keys. Open the Registry Editor and
- Go to
Computer\HKEY_CLASSES_ROOT\.js
and changeContent Type
toapplication/javascript
- Go to
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.js
and changeContent Type
toapplication/javascript
.Then just restart your shell or jupyter kernel, and the app should start working on localhost. Make sure you force reload the app (Ctrl + Shift + R) to get rid of cached contents.
Hi @ajaymaity , this is what i see. How do i modify the
Content Type
?
Try adding a new key
I tried all the above solutions, but none of them worked. It did point me in the right direction and after spending hours on it, I finally figured out the solution. Hoping it would help others too. You have to change Registry settings for two keys. Open the Registry Editor and
- Go to
Computer\HKEY_CLASSES_ROOT\.js
and changeContent Type
toapplication/javascript
- Go to
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.js
and changeContent Type
toapplication/javascript
.Then just restart your shell or jupyter kernel, and the app should start working on localhost. Make sure you force reload the app (Ctrl + Shift + R) to get rid of cached contents.
Hi @ajaymaity , this is what i see. How do i modify the
Content Type
?Try adding a new key
Thanks for the help. I'm not very familiar with this so please guide me along. I've added new key as shown below and clicked around, the only editable field is "Data", not "Type". May I know if there's anything else i should amend? I've restarted my computer but it seems like the issue is still around (blank page of localhost:5151 saying Not Found. For fiftyone v0.21.6)
For Computer\HKEY_CLASSES_ROOT\.js
:
For Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.js
:
2. application/javascript
@JoyLinWQ It's not a new key but a new "string value". If you just want to edit, double-click the existing string value name.