jupyter-widgets / pythreejs

A Jupyter - Three.js bridge
https://pythreejs.readthedocs.io
Other
943 stars 188 forks source link

pythreejs does not work with Mozilla Firefox 98.0.2 #373

Closed hstarmans closed 2 years ago

hstarmans commented 2 years ago

PyThreeJS does not work with the latest version of firefox on Ubuntu In firefox, I get

Error displaying widget: model not found

If I open up More Tools --> developer tools in Firefox, I see several issues;

Error: widget model not found
WebGL warning: <Create>: WebglAllowWindowsNativeGl:false restricts context creation on this system.
THREE.WebGLRenderer: Error creating WebGL context.

In Chromium it works like a charm. This is the output of poetry run jupyter labextension list. I moved to older version of the packages as I thought this was the issue.

JupyterLab v3.0.16
/home/hexastorm/.cache/pypoetry/virtualenvs/render-bM3rOvbY-py3.8/share/jupyter/labextensions
        jupyter-threejs v2.3.0 enabled OK (python, pythreejs)
        jupyterlab-datawidgets v7.0.0 enabled OK
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /home/hexastorm/.cache/pypoetry/virtualenvs/render-bM3rOvbY-py3.8/share/jupyter/lab

This is the information on my environment poetry show;

alabaster                     0.7.12     A configurable sidebar-enabled Sph...
anyio                         3.1.0      High level compatibility layer for...
argon2-cffi                   20.1.0     The secure Argon2 password hashing...
async-generator               1.10       Async generators and context manag...
attrs                         21.2.0     Classes Without Boilerplate
babel                         2.9.1      Internationalization utilities
backcall                      0.1.0      Specifications for callback functi...
bleach                        3.3.0      An easy safelist-based HTML-saniti...
certifi                       2019.11.28 Python package for providing Mozil...
cffi                          1.14.5     Foreign Function Interface for Pyt...
chardet                       3.0.4      Universal encoding detector for Py...
decorator                     4.4.2      Decorators for Humans
defusedxml                    0.7.1      XML bomb protection for Python std...
deprecation                   2.1.0      A library to handle automated depr...
docutils                      0.17.1     Docutils -- Python Documentation U...
entrypoints                   0.3        Discover and load entry points fro...
idna                          2.8        Internationalized Domain Names in ...
imagesize                     1.2.0      Getting image size from png/jpeg/j...
importlib-resources           3.0.0      Read resources from Python packages
install                       1.3.5      Install packages from within code
ipydatawidgets                4.2.0      A set of widgets to help facilitat...
ipykernel                     5.3.4      IPython Kernel for Jupyter
ipython                       7.13.0     IPython: Productive Interactive Co...
ipython-genutils              0.2.0      Vestigial utilities from IPython
ipywidgets                    7.6.3      IPython HTML widgets for Jupyter
jedi                          0.15.2     An autocompletion tool for Python ...
jinja2                        2.11.2     A very fast and expressive templat...
json5                         0.9.5      A Python implementation of the JSO...
jsonschema                    3.2.0      An implementation of JSON Schema v...
jupyter                       1.0.0      Jupyter metapackage. Install all t...
jupyter-client                6.1.12     Jupyter protocol implementation an...
jupyter-console               6.4.0      Jupyter terminal console
jupyter-core                  4.7.1      Jupyter core package. A base packa...
jupyter-packaging             0.10.2     Jupyter Packaging Utilities.
jupyter-server                1.8.0      The backend—i.e. core services, AP...
jupyterlab                    3.0.16     JupyterLab computational environment
jupyterlab-pygments           0.1.2      Pygments theme using JupyterLab CS...
jupyterlab-server             2.5.2      A set of server components for Jup...
jupyterlab-widgets            1.0.0      A JupyterLab extension.
markupsafe                    2.0.0a1    Safely add untrusted strings to HT...
mistune                       0.8.4      The fastest markdown parser in pur...
more-itertools                8.12.0     More routines for operating on ite...
nbclassic                     0.3.1      Jupyter Notebook as a Jupyter Serv...
nbclient                      0.5.3      A client library for executing not...
nbconvert                     6.0.7      Converting Jupyter Notebooks
nbformat                      5.0.7      The Jupyter Notebook format
nbsphinx                      0.8.5      Jupyter Notebook Tools for Sphinx
nest-asyncio                  1.5.1      Patch asyncio to allow nested even...
notebook                      6.4.0      A web-based notebook environment f...
numpy                         1.22.3     NumPy is the fundamental package f...
packaging                     21.3       Core utilities for Python packages
pandocfilters                 1.5.0      Utilities for writing pandoc filte...
parso                         0.8.3      A Python Parser
pexpect                       4.8.0      Pexpect allows easy control of int...
pickleshare                   0.7.5      Tiny 'shelve'-like database with c...
pluggy                        0.13.1     plugin and hook calling mechanisms...
prometheus-client             0.10.1     Python client for the Prometheus m...
prompt-toolkit                2.0.10     Library for building powerful inte...
ptyprocess                    0.7.0      Run a subprocess in a pseudo terminal
py                            1.10.0     library with cross-python path, in...
pycparser                     2.20       C parser in Python
pygments                      2.9.0      Pygments is a syntax highlighting ...
pyparsing                     2.4.7      Python parsing module
pyrsistent                    0.17.3     Persistent/Functional/Immutable da...
pytest                        5.4.3      pytest: simple powerful testing wi...
python-dateutil               2.8.1      Extensions to the standard Python ...
pythreejs                     2.3.0      Interactive 3D graphics for the Ju...
pytz                          2022.1     World timezone definitions, modern...
pyzmq                         22.0.3     Python bindings for 0MQ
qtconsole                     5.1.0      Jupyter Qt console
qtpy                          1.9.0      Provides an abstraction layer on t...
requests                      2.22.0     Python HTTP for Humans.
send2trash                    1.8.0      Send file to trash natively under ...
six                           1.16.0     Python 2 and 3 compatibility utili...
sniffio                       1.2.0      Sniff out which async library your...
snowballstemmer               2.2.0      This package provides 29 stemmers ...
sphinx                        1.8.4      Python documentation generator
sphinxcontrib-serializinghtml 1.1.5      sphinxcontrib-serializinghtml is a...
sphinxcontrib-websupport      1.2.4      Sphinx API for Web Apps
terminado                     0.10.0     Tornado websocket backend for the ...
testpath                      0.5.0      Test utilities for code working wi...
tomlkit                       0.7.2      Style preserving TOML library
tornado                       6.1        Tornado is a Python web framework ...
traitlets                     4.3.3      Traitlets Python config system
traittypes                    0.2.1      Scipy trait types
urllib3                       1.25.8     HTTP library with thread-safe conn...
wcwidth                       0.1.8      Measures number of Terminal column...
webencodings                  0.5.1      Character encoding aliases for leg...
websocket-client              1.0.1      WebSocket client for Python with l...
widgetsnbextension            3.5.1      IPython HTML widgets for Jupyter

My current solution is to use Chromium-browser.

vidartf commented 2 years ago

It works for me on Firefox 100. Did you try some of the generic solutions for making webgl work on firefox? E.g. the first google hit for your error message: https://support.mozilla.org/en-US/questions/1334668

hakonanes commented 2 years ago

I encountered the same issue (via pyvista), and the chosen solution in the link provided by @vidartf solved it for me.

vidartf commented 2 years ago

Thanks for the feedback @hakonanes . Closing this as an upstream issue then. If anyone knows of anything we can do from our end to work around this issue, please write a comment.