<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>197472</bug_id>
          
          <creation_ts>2019-05-01 13:11:43 -0700</creation_ts>
          <short_desc>Pyodide WASM bundle fetched but won&apos;t load (&quot;Unhandled promise rejection&quot;), works on FF / Chrome</short_desc>
          <delta_ts>2019-05-03 10:34:57 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebAssembly</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.14</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph D. Long">jdl</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>fpizlo</cc>
    
    <cc>keith_miller</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1532029</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph D. Long">jdl</who>
    <bug_when>2019-05-01 13:11:43 -0700</bug_when>
    <thetext>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 &apos;%% py&apos; and &quot;Shift-Enter&quot; to execute.)

Corresponding Pyodide bug: https://github.com/iodide-project/pyodide/issues/402

It&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1532094</commentid>
    <comment_count>1</comment_count>
    <who name="Joseph D. Long">jdl</who>
    <bug_when>2019-05-01 15:03:30 -0700</bug_when>
    <thetext>Also present in today&apos;s Safari Technology Preview Release 81.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1532810</commentid>
    <comment_count>2</comment_count>
    <who name="Joseph D. Long">jdl</who>
    <bug_when>2019-05-03 09:42:15 -0700</bug_when>
    <thetext>The underlying issue was a call to WebAssembly.compileStreaming, which is not (yet) available on Safari. I&apos;m not sure why this was not visible from the traceback, but a debug / non-minified build showed the culprit. Closing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1532844</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-05-03 10:34:57 -0700</bug_when>
    <thetext>&lt;rdar://problem/50448468&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>