xeus icon indicating copy to clipboard operation
xeus copied to clipboard

jupyterlite-xeus on Raspberry Pi 400 failure "compile is disallowed on the main thread"

Open nthiery opened this issue 3 months ago • 6 comments

Description

The jupyterlite-xeus demo in the documentation fails for RaspBerryPi 400.

Browser information: Chromium 109.0.5414.12 (build officiel) Built on Raspbian, running on Raspbian 11 (32 bits)

Reproduce

  1. Go to 'jupyter-lite-xeus.readthedocs.io'
  2. Click on the 'Python' tab (or lua or ... )
  3. The kernel does not start

Expected behavior

The kernel starts and on can execute commands in the console.

Context

  • JupyterLite version:
  • Operating System and version:
  • Browser and version:
Browser Output
    RangeError: WebAssembly.Compile is disallowed on the main thread, if the buffer size is larger than 4KB.
    Use WebAssembly.compile, or compile on a worker thread.

Also many more warnings and a few later errors about no provider for INotebookTracker and IContentFactory. Sorry: I am typing this issue from another computer and can't copy-paste them easily.

Cheers

nthiery avatar Sep 27 '25 12:09 nthiery

I further tested with firefox Extended Support Release 102.15.1esr (32bits). It's failing as well with error

Got invalid theme mode: . Resetting to auto
ReferenceError: WebAssembly is not defined

followed by misc errors about missing providers for IContentFactory and co.

nthiery avatar Sep 27 '25 14:09 nthiery

Thats strange as xeus-python is not running in the main thread. Would be interesting to figure out which wasm is tried to be compiled on the main thread

DerThorsten avatar Sep 28 '25 06:09 DerThorsten

Thanks @DerThorsten for the feedback. Will you be at PyData next week? If yes, I can bring the rasppi for analysis.

nthiery avatar Sep 28 '25 08:09 nthiery

yes, i'll be there

DerThorsten avatar Sep 28 '25 10:09 DerThorsten

I tried with a rasberry pi 4b with 4GB of ram and the most recent 32bit Rasberry Pi OS based on debian 13 (trixie). With that setup, all kernels I tried (xpython and xlua) work, even though it takes about 1-2 minutes to get the kernel started on the rasberry pi 4b. But besides that it seems to be working just fine.

As far as I know, debian version 11 (bullseye) is EOL already. Would it be possible for you to update to a more recent Rasberry PI OS?

DerThorsten avatar Oct 08 '25 07:10 DerThorsten

Thanks @DerThorsten for investigating!

I'll give it a shot at upgrading the system. That being said, given that the aim of JupyterLite is to be "ease of use on any device" it might still be worth investigating what went wrong in that special case. If it's an easy fix, it would enlarge the range of devices where users have an immediate smooth experience. I am planning to go to QuantStack headquarter in the coming weeks and could bring the device for investigation by one of the experts.

Cheers,

nthiery avatar Oct 08 '25 08:10 nthiery