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

Should parse resources fetched by a fetch cells synchronously #1278

Closed
wlach opened this issue Dec 12, 2018 · 2 comments
Closed

Should parse resources fetched by a fetch cells synchronously #1278

wlach opened this issue Dec 12, 2018 · 2 comments
Assignees

Comments

@wlach
Copy link
Contributor

wlach commented Dec 12, 2018

Load this notebook and click "run all":

https://extremely-alpha.iodide.io/notebooks/148/?

Expected:

See a graph in the report view

Actual:

See a console error because it tries to render the graph before all the supported libraries are fully loaded. If I run the fetch cell again (e.g. by clicking run all a second time), it seems to load the libraries successfully.

@wlach wlach changed the title fetch cell fails to load all resources on first run Should parse resources fetched by a fetch cells synchronously Dec 12, 2018
@wlach
Copy link
Contributor Author

wlach commented Dec 12, 2018

Talked to @hamilton and apparently this is the way things work right now -- we both load and parse asynchronously, so a resource that depends on another might be loaded in the wrong order (in this case d3 seems to be loaded after metrics-graphics). We should be able to fix this by modifying the fetch cell to parse resources only in the order they are defined, rather than as they are fetched (we can still fetch them async for maximum performance).

@wlach
Copy link
Contributor Author

wlach commented Nov 5, 2019

Another internal example of this error case: https://definitely-staging.iodide.io/notebooks/210/

@wlach wlach self-assigned this Nov 5, 2019
wlach added a commit to wlach/iodide that referenced this issue Nov 5, 2019
…e-project#1278)

We were already waiting for the network, but should also be waiting
for the DOM event that the script has been evaluated.
wlach added a commit to wlach/iodide that referenced this issue Nov 5, 2019
…e-project#1278)

We were already waiting for the network, but should also be waiting
for the DOM event that the script has been evaluated.
@wlach wlach closed this as completed in 88b9e7f Nov 5, 2019
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

2 participants