pyodide icon indicating copy to clipboard operation
pyodide copied to clipboard

Fatal TypeError in mi.readdir: e.push is not a function

Open NeilStrickland opened this issue 2 years ago • 4 comments

🐛 Bug

While trying to use Jupyter Lite with Pyodide, I see a fatal error in the Chrome Dev Console, with a message asking me to report it to the Pyodide maintainers.

To Reproduce

The file https://strickland1.org/courses/MAS2008/lectures/l.html generates the error consistently. It has three Jupyter Lite notebooks in iframes, with URLs as follows:

  • https://neilstrickland.github.io/jlite/lab?path=lecture01/arithmetic.ipynb
  • https://neilstrickland.github.io/jlite/lab?path=lecture01/data_types.ipynb
  • https://neilstrickland.github.io/jlite/lab?path=lecture01/equals.ipynb If I open these URLs individually, I sometimes get the same error, and sometimes not.

Expected behavior

When I press SHIFT-ENTER on the first cell in a Jupyter Lite notebook, I expect that the cell will be evaluated and the result will be shown below the cell after a brief pause, during which the cell number will change from [1]: to [*]:. In cases where the error occurs, the cell number changes to [*]: and does not change back, no output is shown, and error messages appear in the Chrome Dev Console.

Environment

  • Pyodide Version: The page loads https://neilstrickland.github.io/jlite/extensions/@jupyterlite/pyodide-kernel-extension/static/pypi/pyodide_kernel-0.1.3-py3-none-any.whl?sha256=8824ed68653cb9290ea0127c36ed98aa5c0038455499c4a00bd0b8f923886fad with initiator https://cdn.jsdelivr.net/pyodide/v0.24.1/full/pyodide.asm.js. I do not know whether that means the relevant version number is 0.1.3 or 0.24.1
  • Browser version: Chrome Version 118.0.5993.118 (Official Build) (64-bit)

Additional context

The fatal error is always like this:

Uncaught TypeError: e.push is not a function
    at mi.readdir (worker.js:7:3746)
    at hi.readdir (worker.js:7:2754)
    at Object.readdir (pyodide.asm.js:9:213065)
    at ___syscall_getdents64 (pyodide.asm.js:9:257635)
    at pyodide.asm.wasm:0x444e17
    at pyodide.asm.wasm:0x38660e
    at pyodide.asm.wasm:0x269016
    at pyodide.asm.wasm:0x260a7b
    at pyodide.asm.wasm:0x25e033
    at pyodide.asm.wasm:0x1e3f77

Sometimes non-fatal errors are shown as well. A sample log file is attached.

strickland1.org-1698880948135.log

NeilStrickland avatar Nov 02 '23 00:11 NeilStrickland

This looks like a file system issue. As far as I know, the jupyterlite team implements and uses its own file system, so you might need to open an issue in jupyterlite repository.

cc: @jtpio

ryanking13 avatar Nov 02 '23 10:11 ryanking13

Hi @NeilStrickland! It's great to see homotopy theorists in our issue tracker. When I was in grad school I gave a talk once on "Morava E Theory of Symmetric Groups" which is an incredible paper.

hoodmane avatar Nov 02 '23 16:11 hoodmane

Hi @hoodmane , nice to see you here. I've been enjoying your story about the Snaith construction.

NeilStrickland avatar Nov 02 '23 16:11 NeilStrickland

I have raised this issue on the Jupyter Lite tracker at https://github.com/jupyterlite/jupyterlite/issues/1243

NeilStrickland avatar Nov 03 '23 09:11 NeilStrickland