Bug 197472
| Summary: | Pyodide WASM bundle fetched but won't load ("Unhandled promise rejection"), works on FF / Chrome | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph D. Long <jdl> |
| Component: | WebAssembly | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | fpizlo, keith_miller, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Mac | ||
| OS: | macOS 10.14 | ||
Joseph D. Long
Using Safari Version 12.1 (14607.1.40.1.4) and the latest Safari Technology Preview (Release 80 (Safari 12.2, WebKit 14608.1.16)) on macOS 10.14.4, I am unable to run pyodide examples (though other iodide examples work). Pyodide fetches a WASM archive with Python + scientific packages cross-compiled to WebAssembly, and uses them to execute Python in the browser. For context, see https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scientific-python-stack-to-the-browser/ .
The only error that appears in the (devtools) console when I try to run a %% py block is
[Error] Unhandled Promise Rejection: undefined
(anonymous function)
rejectPromise
promiseReactionJob
I carved out a subset of one of the Pyodide examples that reproduces this behavior here: https://alpha.iodide.io/notebooks/2154/ (Click in text field after '%% py' and "Shift-Enter" to execute.)
Corresponding Pyodide bug: https://github.com/iodide-project/pyodide/issues/402
It's entirely possible this is a Pyodide bug that is being obscured by the default behavior in Firefox and Chrome, but I cannot find anywhere in the Safari Dev Tools that will expose what exactly is happening. Another pair of eyes on this would be very helpful! Thanks in advance.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Joseph D. Long
Also present in today's Safari Technology Preview Release 81.
Joseph D. Long
The underlying issue was a call to WebAssembly.compileStreaming, which is not (yet) available on Safari. I'm not sure why this was not visible from the traceback, but a debug / non-minified build showed the culprit. Closing.
Radar WebKit Bug Importer
<rdar://problem/50448468>