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

Examples don't load #240

Open
bsyouness opened this issue Sep 27, 2021 · 7 comments
Open

Examples don't load #240

bsyouness opened this issue Sep 27, 2021 · 7 comments
Labels
bug Something isn't working

Comments

@bsyouness
Copy link

Description

None of the examples load as expected. Instead I get the following error in the inspector:

Blocked script execution in 'blob:http://localhost:8889/a42cb406-c95b-4137-9e18-631aae09a43b' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
blob:http://localhost:8889/a42cb406-c95b-4137-9e18-631aae09a43b:3 GET http://localhost:8889/files/examples/example-datastore/build/bundle.example.js net::ERR_ABORTED 404 (Not Found)
Not allowed to load local resource: blob:http://localhost:8889/a3ee0a47-7c4f-4a63-bb96-3911ae656bd9

It looks like a security issue that occurs when one tries to load a local file on Chrome, which is what happens in index.html: <script type="text/javascript" src="build/bundle.example.js"></script>. I changed the code in index.html to <script sandbox="allow-scripts" type="text/javascript" src="build/bundle.example.js"></script> but then I run into:

Cross-Origin Read Blocking (CORB) blocked cross-origin response http://localhost:8889/login?next=%2Ffiles%2Fexamples%2Fexample-datastore%2Fbuild%2Fbundle.example.js with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.

Reproduce

Open any of the example folders and open index.html.

Context

  • Operating System and version: macOS 10.15.7 (19H1417)
  • Browser and version: Version 93.0.4577.82 (Official Build) (x86_64)
  • JupyterLab version: 4.0.0a4 (dev), 3.1.0a5 (app)
Troubleshoot Output
$PATH:
	/opt/miniconda3/envs/upstream/bin
	/opt/miniconda3/condabin
	/usr/local/bin
	/usr/bin
	/bin
	/usr/sbin
	/sbin
	/Library/TeX/texbin
	/usr/local/MacGPG2/bin

sys.path:
/opt/miniconda3/envs/upstream/bin
/opt/miniconda3/envs/upstream/lib/python39.zip
/opt/miniconda3/envs/upstream/lib/python3.9
/opt/miniconda3/envs/upstream/lib/python3.9/lib-dynload
/opt/miniconda3/envs/upstream/lib/python3.9/site-packages
/Users/ybennani/Desktop/code/jupyterlab
/Users/ybennani/Desktop/code/ipywidgets/widgetsnbextension
/Users/ybennani/Desktop/code/ipywidgets
/Users/ybennani/Desktop/code/ipywidgets/jupyterlab_widgets

sys.executable:
/opt/miniconda3/envs/upstream/bin/python

sys.version:
3.9.4 (default, Apr 9 2021, 09:32:38)
[Clang 10.0.0 ]

platform.platform():
macOS-10.15.7-x86_64-i386-64bit

which -a jupyter:
/opt/miniconda3/envs/upstream/bin/jupyter

pip list:
Package Version Location
---------------------- ------------------- ---------------------------------------------------------
anyio 2.2.0
appdirs 1.4.4
appnope 0.1.2
argon2-cffi 20.1.0
async-generator 1.10
attrs 21.2.0
Babel 2.9.1
backcall 0.2.0
bleach 3.3.0
certifi 2020.12.5
cffi 1.14.5
chardet 4.0.0
coverage 5.5
decorator 5.0.7
defusedxml 0.7.1
deprecation 2.1.0
entrypoints 0.3
idna 2.10
iniconfig 1.1.1
ipykernel 5.5.4
ipython 7.23.1
ipython-genutils 0.2.0
ipywidgets 8.0.0a5 /Users/ybennani/Desktop/code/ipywidgets
jedi 0.18.0
Jinja2 2.11.3
json5 0.9.5
jsonschema 3.2.0
jupyter 1.0.0
jupyter-client 6.1.12
jupyter-console 6.4.0
jupyter-core 4.7.1
jupyter-packaging 0.10.1
jupyter-resource-usage 0.6.0
jupyter-server 1.6.4
jupyterlab 3.1.0a5 /Users/ybennani/Desktop/code/jupyterlab
jupyterlab-pygments 0.1.2
jupyterlab-server 2.5.0
MarkupSafe 1.1.1
matplotlib-inline 0.1.2
mistune 0.8.4
nbclassic 0.2.7
nbclient 0.5.3
nbconvert 6.0.7
nbformat 5.1.3
nest-asyncio 1.5.1
notebook 6.3.0
packaging 20.9
pandocfilters 1.4.3
parso 0.8.2
pexpect 4.8.0
pickleshare 0.7.5
pip 21.0.1
pluggy 0.13.1
prometheus-client 0.10.1
prompt-toolkit 3.0.18
psutil 5.8.0
ptyprocess 0.7.0
py 1.10.0
pycparser 2.20
pyee 7.0.4
Pygments 2.9.0
pyparsing 2.4.7
pyppeteer 0.2.2
pyrsistent 0.17.3
pytest 6.2.4
pytest-cov 2.12.1
python-dateutil 2.8.1
pytz 2021.1
pyzmq 22.0.3
qtconsole 5.1.0
QtPy 1.9.0
requests 2.25.1
Send2Trash 1.5.0
setuptools 52.0.0.post20210125
six 1.16.0
sniffio 1.2.0
terminado 0.9.4
testpath 0.4.4
toml 0.10.2
tomlkit 0.7.0
tornado 6.1
tqdm 4.61.1
traitlets 5.0.5
urllib3 1.26.4
wcwidth 0.2.5
webencodings 0.5.1
websockets 8.1
wheel 0.36.2
widgetsnbextension 3.5.1 /opt/miniconda3/envs/upstream/lib/python3.9/site-packages

conda list:
# packages in environment at /opt/miniconda3/envs/upstream:
#
# Name Version Build Channel
anyio 2.2.0 pypi_0 pypi
appdirs 1.4.4 pypi_0 pypi
appnope 0.1.2 pypi_0 pypi
argon2-cffi 20.1.0 pypi_0 pypi
async-generator 1.10 pypi_0 pypi
attrs 21.2.0 pypi_0 pypi
babel 2.9.1 pypi_0 pypi
backcall 0.2.0 pypi_0 pypi
bleach 3.3.0 pypi_0 pypi
ca-certificates 2021.4.13 hecd8cb5_1
certifi 2020.12.5 py39hecd8cb5_0
cffi 1.14.5 pypi_0 pypi
chardet 4.0.0 pypi_0 pypi
coverage 5.5 pypi_0 pypi
decorator 5.0.7 pypi_0 pypi
defusedxml 0.7.1 pypi_0 pypi
deprecation 2.1.0 pypi_0 pypi
entrypoints 0.3 pypi_0 pypi
idna 2.10 pypi_0 pypi
iniconfig 1.1.1 pypi_0 pypi
ipykernel 5.5.4 pypi_0 pypi
ipython 7.23.1 pypi_0 pypi
ipython-genutils 0.2.0 pypi_0 pypi
ipywidgets 8.0.0a5 dev_0
jedi 0.18.0 pypi_0 pypi
jinja2 2.11.3 pypi_0 pypi
json5 0.9.5 pypi_0 pypi
jsonschema 3.2.0 pypi_0 pypi
jupyter 1.0.0 pypi_0 pypi
jupyter-client 6.1.12 pypi_0 pypi
jupyter-console 6.4.0 pypi_0 pypi
jupyter-core 4.7.1 pypi_0 pypi
jupyter-packaging 0.10.1 pypi_0 pypi
jupyter-resource-usage 0.6.0 pypi_0 pypi
jupyter-server 1.6.4 pypi_0 pypi
jupyterlab 3.1.0a5 dev_0
jupyterlab-pygments 0.1.2 pypi_0 pypi
jupyterlab-server 2.5.0 pypi_0 pypi
libcxx 10.0.0 1
libffi 3.3 hb1e8313_2
markupsafe 1.1.1 pypi_0 pypi
matplotlib-inline 0.1.2 pypi_0 pypi
mistune 0.8.4 pypi_0 pypi
nbclassic 0.2.7 pypi_0 pypi
nbclient 0.5.3 pypi_0 pypi
nbconvert 6.0.7 pypi_0 pypi
nbformat 5.1.3 pypi_0 pypi
ncurses 6.2 h0a44026_1
nest-asyncio 1.5.1 pypi_0 pypi
notebook 6.3.0 pypi_0 pypi
openssl 1.1.1k h9ed2024_0
packaging 20.9 pypi_0 pypi
pandocfilters 1.4.3 pypi_0 pypi
parso 0.8.2 pypi_0 pypi
pexpect 4.8.0 pypi_0 pypi
pickleshare 0.7.5 pypi_0 pypi
pip 21.0.1 py39hecd8cb5_0
pluggy 0.13.1 pypi_0 pypi
prometheus-client 0.10.1 pypi_0 pypi
prompt-toolkit 3.0.18 pypi_0 pypi
psutil 5.8.0 pypi_0 pypi
ptyprocess 0.7.0 pypi_0 pypi
py 1.10.0 pypi_0 pypi
pycparser 2.20 pypi_0 pypi
pyee 7.0.4 pypi_0 pypi
pygments 2.9.0 pypi_0 pypi
pyparsing 2.4.7 pypi_0 pypi
pyppeteer 0.2.2 pypi_0 pypi
pyrsistent 0.17.3 pypi_0 pypi
pytest 6.2.4 pypi_0 pypi
pytest-cov 2.12.1 pypi_0 pypi
python 3.9.4 h88f2d9e_0
python-dateutil 2.8.1 pypi_0 pypi
pytz 2021.1 pypi_0 pypi
pyzmq 22.0.3 pypi_0 pypi
qtconsole 5.1.0 pypi_0 pypi
qtpy 1.9.0 pypi_0 pypi
readline 8.1 h9ed2024_0
requests 2.25.1 pypi_0 pypi
send2trash 1.5.0 pypi_0 pypi
setuptools 52.0.0 py39hecd8cb5_0
six 1.16.0 pypi_0 pypi
sniffio 1.2.0 pypi_0 pypi
sqlite 3.35.4 hce871da_0
terminado 0.9.4 pypi_0 pypi
testpath 0.4.4 pypi_0 pypi
tk 8.6.10 hb0a8c7a_0
toml 0.10.2 pypi_0 pypi
tomlkit 0.7.0 pypi_0 pypi
tornado 6.1 pypi_0 pypi
tqdm 4.61.1 pypi_0 pypi
traitlets 5.0.5 pypi_0 pypi
tzdata 2020f h52ac0ba_0
urllib3 1.26.4 pypi_0 pypi
wcwidth 0.2.5 pypi_0 pypi
webencodings 0.5.1 pypi_0 pypi
websockets 8.1 pypi_0 pypi
wheel 0.36.2 pyhd3eb1b0_0
widgetsnbextension 3.5.1 pypi_0 pypi
xz 5.2.5 h1de35cc_0
zlib 1.2.11 h1de35cc_3

conda env:
name: upstream
channels:
- defaults
dependencies:
- ca-certificates=2021.4.13=hecd8cb5_1
- certifi=2020.12.5=py39hecd8cb5_0
- libcxx=10.0.0=1
- libffi=3.3=hb1e8313_2
- ncurses=6.2=h0a44026_1
- openssl=1.1.1k=h9ed2024_0
- pip=21.0.1=py39hecd8cb5_0
- python=3.9.4=h88f2d9e_0
- readline=8.1=h9ed2024_0
- setuptools=52.0.0=py39hecd8cb5_0
- sqlite=3.35.4=hce871da_0
- tk=8.6.10=hb0a8c7a_0
- tzdata=2020f=h52ac0ba_0
- wheel=0.36.2=pyhd3eb1b0_0
- xz=5.2.5=h1de35cc_0
- zlib=1.2.11=h1de35cc_3
- pip:
- anyio==2.2.0
- appdirs==1.4.4
- appnope==0.1.2
- argon2-cffi==20.1.0
- async-generator==1.10
- attrs==21.2.0
- babel==2.9.1
- backcall==0.2.0
- bleach==3.3.0
- cffi==1.14.5
- chardet==4.0.0
- coverage==5.5
- decorator==5.0.7
- defusedxml==0.7.1
- deprecation==2.1.0
- entrypoints==0.3
- idna==2.10
- iniconfig==1.1.1
- ipykernel==5.5.4
- ipython==7.23.1
- ipython-genutils==0.2.0
- jedi==0.18.0
- jinja2==2.11.3
- json5==0.9.5
- jsonschema==3.2.0
- jupyter==1.0.0
- jupyter-client==6.1.12
- jupyter-console==6.4.0
- jupyter-core==4.7.1
- jupyter-packaging==0.10.1
- jupyter-resource-usage==0.6.0
- jupyter-server==1.6.4
- jupyterlab-pygments==0.1.2
- jupyterlab-server==2.5.0
- markupsafe==1.1.1
- matplotlib-inline==0.1.2
- mistune==0.8.4
- nbclassic==0.2.7
- nbclient==0.5.3
- nbconvert==6.0.7
- nbformat==5.1.3
- nest-asyncio==1.5.1
- notebook==6.3.0
- packaging==20.9
- pandocfilters==1.4.3
- parso==0.8.2
- pexpect==4.8.0
- pickleshare==0.7.5
- pluggy==0.13.1
- prometheus-client==0.10.1
- prompt-toolkit==3.0.18
- psutil==5.8.0
- ptyprocess==0.7.0
- py==1.10.0
- pycparser==2.20
- pyee==7.0.4
- pygments==2.9.0
- pyparsing==2.4.7
- pyppeteer==0.2.2
- pyrsistent==0.17.3
- pytest==6.2.4
- pytest-cov==2.12.1
- python-dateutil==2.8.1
- pytz==2021.1
- pyzmq==22.0.3
- qtconsole==5.1.0
- qtpy==1.9.0
- requests==2.25.1
- send2trash==1.5.0
- six==1.16.0
- sniffio==1.2.0
- terminado==0.9.4
- testpath==0.4.4
- toml==0.10.2
- tomlkit==0.7.0
- tornado==6.1
- tqdm==4.61.1
- traitlets==5.0.5
- urllib3==1.26.4
- wcwidth==0.2.5
- webencodings==0.5.1
- websockets==8.1
- widgetsnbextension==3.5.1
prefix: /opt/miniconda3/envs/upstream

@bsyouness bsyouness added the bug Something isn't working label Sep 27, 2021
@welcome
Copy link

welcome bot commented Sep 27, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@fcollonval
Copy link
Member

@bsyouness you should be able to test the example after clicking on the Trust HTML button in the widget toolbar. See screencast example in the README.

@blink1073
Copy link
Contributor

I had noticed the same even after trusting the html, which is why we switched from binder to static html on ReadTheDocs in #241

@bsyouness bsyouness reopened this Sep 30, 2021
@bsyouness
Copy link
Author

lumino_examples_dont_load

@blink1073
Copy link
Contributor

Right, binder isn't compatible with hosting our examples

@fcollonval
Copy link
Member

fcollonval commented Sep 30, 2021

You need to build the example (in your screencast there is no build folder).

To do so, in the root lumino folder, you need to execute:

yarn
yarn run build:examples

Then you should be able to see the examples:

image

@bsyouness
Copy link
Author

Thanks! That added the build folder (after I ran a lerna run build). But I'm still running into the same issue (new gif):
lumino_examples_dont_load_2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants