pyodide: Maximum call stack error when running pyodide within a web worker
System combinations that were tested, and confirmed bug occured:
- Ubuntu 19.04
- Firefox Quantum 67.0 (64-bit)
- Chrome Version 74.0.3729.157 (Official Build) (64-bit)
Description of Bug
This issue appears to have been introduced when running Pyodide within a webworker.
Firefox
On Firefox I get the following error message:
Weirdly on Firefox on first page load it doesn’t appear to occur, but after running a plain refresh F5
this error message does occur.
Chrome
On Chrome I get the following error message:
How issue was introduced
It occurs by including the line ctx.pyodide.runPython('import matplotlib')
at the following location:
Demo of app causing issue
See a live version of this commit over at https://5ce927378b870500077d8c9c--app-pymedphys.netlify.com/
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 17 (15 by maintainers)
For me, Pyodide worker works in Chrome and Firefox (for both Windows 10/Mac 10.14), but I haven’t tried loading any heavy packages. In Safari, I get a maximum call stack error as soon as I try to initialize Pyodide in a worker.
I’m switching back to a non-worker solution… 😞
Thanks @SimonBiggs for reporting this issue.