<?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>170463</bug_id>
          
          <creation_ts>2017-04-04 12:14:45 -0700</creation_ts>
          <short_desc>REGRESSION(r204512): WebSocket errors with &quot;Failed to send WebSocket frame.&quot;  if too much data is sent</short_desc>
          <delta_ts>2019-11-15 11:18:43 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>Safari 10</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://watson-speech.mybluemix.net/file-url.html</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="Nathan Friedly">nathan.friedly+webkit</reporter>
          <assigned_to name="Alex Christensen">achristensen</assigned_to>
          <cc>569569569</cc>
    
    <cc>achristensen</cc>
    
    <cc>adamduren</cc>
    
    <cc>ap</cc>
    
    <cc>berkus</cc>
    
    <cc>carlos</cc>
    
    <cc>cgarcia</cc>
    
    <cc>deepak</cc>
    
    <cc>gneius</cc>
    
    <cc>jmorris</cc>
    
    <cc>khomenkoigor</cc>
    
    <cc>kurteknikk</cc>
    
    <cc>lisongli199019</cc>
    
    <cc>manian</cc>
    
    <cc>planauts</cc>
    
    <cc>quint</cc>
    
    <cc>rmay31</cc>
    
    <cc>spalmer</cc>
    
    <cc>thomas.schreiber</cc>
    
    <cc>vandenbj</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1294106</commentid>
    <comment_count>0</comment_count>
    <who name="Nathan Friedly">nathan.friedly+webkit</who>
    <bug_when>2017-04-04 12:14:45 -0700</bug_when>
    <thetext>I have some code that streams audio data over a WebSocket connection. In Safari 10.03 (and it other current and recent browsers), it works as expected. In Safari 10.1, it errors with &quot;WebSocket connection to wss://[...] failed: Failed to send WebSocket frame.&quot; and closes the connection with status 1006 (CLOSE_ABNORMAL) after &quot;too much&quot; data is sent. (I haven&apos;t worked out the exact amount, but artificially slowing down my source seems to make it work sometimes. My code checks the bufferedAmount property and slows it self down if it gets too high, but this appears to always be 0 in Safari until after the error.)

This is some example code that reproduces the issue:


// this fails in Safari 10.1 but works in 10.03 (and other browsers)
var ws = new WebSocket(&apos;wss://echo.websocket.org&apos;);

ws.onerror = function(evt) {
  // Not sure why, but error events don&apos;t seem to include the actual error
  // The console, however, will have the following error:
  // WebSocket connection to &apos;wss://echo.websocket.org/&apos; failed: Failed to send WebSocket frame.
  console.log(&quot;WebSocket error - see console for message&quot;);
}

ws.onclose = function(evt) {
  console.log(`WebSocket closed with code: ${evt.code}, reason: ${evt.reason}`);
}

ws.onopen = function() {
  console.log(&apos;sending first binary message&apos;);
  ws.send(new Uint8Array(23085)); // works
  console.log(&apos;bufferedAmount is &apos; + ws.bufferedAmount); // 0

  // this gets the error
  console.log(&apos;sending second binary message&apos;);
  ws.send(new Uint8Array(23085)); // triggers error and close
  console.log(&apos;bufferedAmount is &apos; + ws.bufferedAmount); // 0

  console.log(&apos;sending third binary message&apos;);
  ws.send(new Uint8Array(23085));
  console.log(&apos;bufferedAmount is &apos; + ws.bufferedAmount);

  ws.close();
}


https://jsfiddle.net/yta2mjuf/

My actual code is at https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/v0.32.3/speech-to-text/recognize-stream.js, and you can see a live example of it at https://watson-speech.mybluemix.net/file-url.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294108</commentid>
    <comment_count>1</comment_count>
    <who name="Nathan Friedly">nathan.friedly+webkit</who>
    <bug_when>2017-04-04 12:22:33 -0700</bug_when>
    <thetext>Op, the JSFiddle link should be https://jsfiddle.net/yta2mjuf/4/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294120</commentid>
    <comment_count>2</comment_count>
    <who name="Nathan Friedly">nathan.friedly+webkit</who>
    <bug_when>2017-04-04 12:43:27 -0700</bug_when>
    <thetext>Safari Technology Preview behaves the same as 10.1.

WebKit Nightly (r214532) behaves a little differently -  it logs the &quot;Failed to send WebSocket frame&quot; error three times and doesn&apos;t close the connection until the end.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294155</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-04-04 14:04:33 -0700</bug_when>
    <thetext>&lt;rdar://problem/31436977&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294660</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Duren">adamduren</who>
    <bug_when>2017-04-05 15:04:25 -0700</bug_when>
    <thetext>We have encountered this as well. Without a workaround our product which requires moving large amounts of data over WebSockets is totally broken in Safari.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294666</commentid>
    <comment_count>5</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-05 15:26:51 -0700</bug_when>
    <thetext>CFWriteStreamCanAcceptBytes seems to be returning false.  We should just put the bytes in the buffer in this case instead of reporting a failure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294677</commentid>
    <comment_count>6</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-05 15:49:25 -0700</bug_when>
    <thetext>Carlos, does this reproduce on linux, too?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294811</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-04-05 22:43:40 -0700</bug_when>
    <thetext>(In reply to Alex Christensen from comment #6)
&gt; Carlos, does this reproduce on linux, too?

I&apos;m not sure how to test it, but loading https://jsfiddle.net/yta2mjuf/4/ and sending console messages to stdout, this is what I get:

https://fiddle.jshell.net/_display/:60:14: CONSOLE LOG sending first binary message
https://fiddle.jshell.net/_display/:62:14: CONSOLE LOG bufferedAmount is 0
https://fiddle.jshell.net/_display/:65:14: CONSOLE LOG sending second binary message
https://fiddle.jshell.net/_display/:67:14: CONSOLE LOG bufferedAmount is 0
https://fiddle.jshell.net/_display/:69:14: CONSOLE LOG sending third binary message
https://fiddle.jshell.net/_display/:71:14: CONSOLE LOG bufferedAmount is 0
https://fiddle.jshell.net/_display/:56:14: CONSOLE LOG WebSocket closed with code: 1005, reason:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294812</commentid>
    <comment_count>8</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-04-05 22:45:40 -0700</bug_when>
    <thetext>And this is what I get with WebKitGTK+ 2.16 branch (before web sockets were moved to the network process)

https://fiddle.jshell.net/_display/:60:14: CONSOLE LOG sending first binary message
https://fiddle.jshell.net/_display/:62:14: CONSOLE LOG bufferedAmount is 6709
https://fiddle.jshell.net/_display/:65:14: CONSOLE LOG sending second binary message
https://fiddle.jshell.net/_display/:67:14: CONSOLE LOG bufferedAmount is 29802
https://fiddle.jshell.net/_display/:69:14: CONSOLE LOG sending third binary message
https://fiddle.jshell.net/_display/:71:14: CONSOLE LOG bufferedAmount is 52895
https://fiddle.jshell.net/_display/:56:14: CONSOLE LOG WebSocket closed with code: 1005, reason:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294853</commentid>
    <comment_count>9</comment_count>
    <who name="Jonas">vandenbj</who>
    <bug_when>2017-04-06 04:14:10 -0700</bug_when>
    <thetext>We too suffer from this blocking issue. We transfer large amounts of data in our product using a WebSocket.

We have emailed all of our customers and partners to postpone the update of Safari and in the meanwhile we are working on a hack/patch to limit the amount of data we transfer. This fix however is seriously affecting the user experience.

Hope to receive additional feedback about this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294899</commentid>
    <comment_count>10</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-06 09:11:47 -0700</bug_when>
    <thetext>This regressed with http://trac.webkit.org/r204512</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294901</commentid>
    <comment_count>11</comment_count>
    <who name="Adam Duren">adamduren</who>
    <bug_when>2017-04-06 09:20:31 -0700</bug_when>
    <thetext>@jona(In reply to Jonas from comment #9)
Our workaround in the meantime was to delay between each call to send. Our service was already chunking data to 8000 bytes and a delay of 125ms seemed to mostly smooth over this issue in the meantime but with a hit to overall performance. It will most likely depend on individual message sizes, the bandwidth of your users, and other network factors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294920</commentid>
    <comment_count>12</comment_count>
      <attachid>306397</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-06 09:55:51 -0700</bug_when>
    <thetext>Created attachment 306397
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294921</commentid>
    <comment_count>13</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-06 09:58:45 -0700</bug_when>
    <thetext>The attached patch fixes your issue and restores our compatibility with other browsers.
Carlos, could you see if it fixes the libsoup implementation?
I&apos;m having trouble writing a regression test that fails before this change and succeeds after using a local python server.  What exactly is echo.websocket.org doing?  Is the source available somewhere?  Is it taking a long time to do something?  Maybe it&apos;s just that it&apos;s a remote server, so sending and receiving takes longer than it ever would when testing on a local machine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294922</commentid>
    <comment_count>14</comment_count>
      <attachid>306397</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-04-06 10:01:22 -0700</bug_when>
    <thetext>Comment on attachment 306397
Patch

Um, shouldn&apos;t we fix the callers to expect std::nullopt instead? If I saw this when working on nearby code, I&apos;d be tempted to change it back to return nullopt and call it good if it doesn&apos;t break any tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294923</commentid>
    <comment_count>15</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-06 10:03:57 -0700</bug_when>
    <thetext>No, if CFWriteStreamWrite returns -1, then we do need an error because something has gone wrong with the socket.  If the stream cannot accept bytes yet, then we report that we have written 0 bytes and there was no error.  The bytes go into the buffer and they will be written later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294945</commentid>
    <comment_count>16</comment_count>
    <who name="Nathan Friedly">nathan.friedly+webkit</who>
    <bug_when>2017-04-06 10:35:24 -0700</bug_when>
    <thetext>(In reply to Alex Christensen from comment #13)
&gt; The attached patch fixes your issue and restores our compatibility with
&gt; other browsers.
&gt; Carlos, could you see if it fixes the libsoup implementation?
&gt; I&apos;m having trouble writing a regression test that fails before this change
&gt; and succeeds after using a local python server.  What exactly is
&gt; echo.websocket.org doing?  Is the source available somewhere?  Is it taking
&gt; a long time to do something?  Maybe it&apos;s just that it&apos;s a remote server, so
&gt; sending and receiving takes longer than it ever would when testing on a
&gt; local machine.

I think you&apos;re correct that the difference is just that it&apos;s a remote vs local server.

You could try increasing the amount of data the test sends, but I&apos;m not sure how much it would take to get a reliable test. Alternatively, is it possible to throttle the connection to the local server, or otherwise make it slow?

echo.websocket.org is just supposed to respond with whatever data you sent it. My actual server is stream.watsonplatform.net - but that requires credentials.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1294962</commentid>
    <comment_count>17</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-06 11:18:31 -0700</bug_when>
    <thetext>I don&apos;t think this should be committed without a regression test to make sure we never regress this behavior again.  Using https://trac.webkit.org/browser/webkit/trunk/LayoutTests/http/tests/websocket/tests/hybi/send_wsh.py doesn&apos;t reproduce the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1295408</commentid>
    <comment_count>18</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-07 11:28:38 -0700</bug_when>
    <thetext>I committed this to https://trac.webkit.org/changeset/215102/webkit after manually verifying manually that Nathan&apos;s test case was fixed, meaning the error was no longer there and data was actually sent and received.

Nathan, Adam, and Jonas, could you please do some testing with the upcoming Safari Technology Preview?  We have released them every 2 weeks or so at https://developer.apple.com/safari/technology-preview/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1295468</commentid>
    <comment_count>19</comment_count>
    <who name="Adam Duren">adamduren</who>
    <bug_when>2017-04-07 13:34:35 -0700</bug_when>
    <thetext>Will do. When is this expected to drop into the main Safari builds?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1295469</commentid>
    <comment_count>20</comment_count>
    <who name="Nathan Friedly">nathan.friedly+webkit</who>
    <bug_when>2017-04-07 13:37:15 -0700</bug_when>
    <thetext>Yes, I&apos;ll check on the next Safari Technology Preview. Could you post an update here (or send me an email if you prefer) once it&apos;s available?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1295935</commentid>
    <comment_count>21</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2017-04-10 02:21:01 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #7)
&gt; (In reply to Alex Christensen from comment #6)
&gt; &gt; Carlos, does this reproduce on linux, too?
&gt; 
&gt; I&apos;m not sure how to test it, but loading https://jsfiddle.net/yta2mjuf/4/
&gt; and sending console messages to stdout, this is what I get:
&gt; 
&gt; https://fiddle.jshell.net/_display/:60:14: CONSOLE LOG sending first binary
&gt; message
&gt; https://fiddle.jshell.net/_display/:62:14: CONSOLE LOG bufferedAmount is 0
&gt; https://fiddle.jshell.net/_display/:65:14: CONSOLE LOG sending second binary
&gt; message
&gt; https://fiddle.jshell.net/_display/:67:14: CONSOLE LOG bufferedAmount is 0
&gt; https://fiddle.jshell.net/_display/:69:14: CONSOLE LOG sending third binary
&gt; message
&gt; https://fiddle.jshell.net/_display/:71:14: CONSOLE LOG bufferedAmount is 0
&gt; https://fiddle.jshell.net/_display/:56:14: CONSOLE LOG WebSocket closed with
&gt; code: 1005, reason:

How can I check this is fixed in soup? I&apos;m still getting this output even after the patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1296027</commentid>
    <comment_count>22</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-10 10:11:23 -0700</bug_when>
    <thetext>I used Nathan&apos;s code to verify that onerror was no longer being called.  I modified it by adding an onmessage that counts the number of bytes received to verify that the bytes were actually being sent and received.

We really need to figure out how to reproduce this issue locally with python.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1297000</commentid>
    <comment_count>23</comment_count>
    <who name="">gneius</who>
    <bug_when>2017-04-13 08:49:34 -0700</bug_when>
    <thetext>Our customers are currently experiencing the same issue as described by this defect and we have to put in a fixed delay between sending data frames in order to get around this problem and it doesn&apos;t always work. Since this has been marked as fixed. Is there an ETA on when the new version of Safari and iOS will be released with this fix so we can communicate with our customers? thx</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1297948</commentid>
    <comment_count>24</comment_count>
    <who name="Divya Manian">manian</who>
    <bug_when>2017-04-17 10:59:40 -0700</bug_when>
    <thetext>Folks mentioning impact, can you give us names of your products and the number of folks who are impacted?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1297970</commentid>
    <comment_count>25</comment_count>
    <who name="">gneius</who>
    <bug_when>2017-04-17 12:12:28 -0700</bug_when>
    <thetext>(In reply to Divya Manian from comment #24)
&gt; Folks mentioning impact, can you give us names of your products and the
&gt; number of folks who are impacted?

Our product is called Klipfolio (www.klipfolio.com). We have 22 of our customers reporting this issue, before we put in a 50ms delay between sending messages. After the 50ms delay there are still 3 reported cases that are still experiencing this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1297997</commentid>
    <comment_count>26</comment_count>
    <who name="Nathan Friedly">nathan.friedly+webkit</who>
    <bug_when>2017-04-17 13:43:39 -0700</bug_when>
    <thetext>(In reply to Divya Manian from comment #24)
&gt; Folks mentioning impact, can you give us names of your products and the
&gt; number of folks who are impacted?

In my case it&apos;s the IBM Watson Speech to Text API. I can&apos;t give exact numbers, but we handled around 100~150k WebSocket connections from Safari users last month. (Presumably it would be quite a bit more if Safari supported microphone input via getUserMedia rather than just files, so maybe we got lucky here ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298436</commentid>
    <comment_count>27</comment_count>
    <who name="Adam Duren">adamduren</who>
    <bug_when>2017-04-18 14:33:57 -0700</bug_when>
    <thetext>Tested our application with r215468 and it appears to be fixed in this build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298456</commentid>
    <comment_count>28</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-18 15:14:31 -0700</bug_when>
    <thetext>Hooray!  Thanks!
I still think we need to add an automated regression test using python somehow to prevent us from accidentally breaking this again.  We will do refactoring or reimplementing in the future</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298673</commentid>
    <comment_count>29</comment_count>
    <who name="Jonas">vandenbj</who>
    <bug_when>2017-04-19 07:22:23 -0700</bug_when>
    <thetext>Our product is called Awingu and we emailed all of our customers warning them not to update to the latest Safari. Because of this, we only had to patch one customer environment with a fix that limits the package size to around 5000 bytes.

How and where can we test the &quot;r215468&quot; build? Is it better to wait for the next technology preview? I&apos;m guessing it&apos;s going to be released one of these days?

Thanks for the update!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298689</commentid>
    <comment_count>30</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-04-19 09:17:42 -0700</bug_when>
    <thetext>&gt; How and where can we test the &quot;r215468&quot; build? Is it better to wait for the next technology preview?

Either the next Safari Technology preview or the current WebKit nightly build (https://webkit.org/downloads/) would work for this purpose.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1299102</commentid>
    <comment_count>31</comment_count>
    <who name="Jonas">vandenbj</who>
    <bug_when>2017-04-20 05:38:31 -0700</bug_when>
    <thetext>I&apos;ve verified the fix on the Safari Technology Preview r28 of yesterday and I can confirm the issue is not present anymore.

Now it&apos;s only a matter of knowing when this version is releasable to the public.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1299112</commentid>
    <comment_count>32</comment_count>
    <who name="">gneius</who>
    <bug_when>2017-04-20 07:05:22 -0700</bug_when>
    <thetext>Just an additional note, in addition to Safari, a portion of our mobile user who&apos;s updated to latest iOS is also affected by this defect. Our native mobile app also uses webkit behind it. 

It will be great to know the release schedule for iOS with this fix as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1302092</commentid>
    <comment_count>33</comment_count>
    <who name="Igor Khomenko">khomenkoigor</who>
    <bug_when>2017-04-27 08:34:36 -0700</bug_when>
    <thetext>I have the same issue with 10.1
but it works fine with 10.0.3
 
Here is my log from browser console:
http://image.quickblox.com/459f0469f8c5af77d71775066988.injoit.png

Our product https://qm.quickblox.com is completely broken in Safari 10.1.
So waiting for you guys to release a new update..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1302167</commentid>
    <comment_count>34</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-04-27 10:47:38 -0700</bug_when>
    <thetext>Igor, could you also verify that the latest Safari Technology Preview has fixed your problem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1305089</commentid>
    <comment_count>35</comment_count>
    <who name="Igor Khomenko">khomenkoigor</who>
    <bug_when>2017-05-05 05:56:40 -0700</bug_when>
    <thetext>It works fine with dev preview version.
When are you going to push 10.1.1?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1308569</commentid>
    <comment_count>36</comment_count>
    <who name="Deepak Chaula">deepak</who>
    <bug_when>2017-05-14 22:41:34 -0700</bug_when>
    <thetext>Hi guys,
When are you going to push fixed 10.1 safari latest version?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309086</commentid>
    <comment_count>37</comment_count>
    <who name="Songli Li">lisongli199019</who>
    <bug_when>2017-05-16 02:46:56 -0700</bug_when>
    <thetext>Hi folks, I&apos;ve just upgraded Safari to 10.1.1 and this issue can still happen...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309088</commentid>
    <comment_count>38</comment_count>
    <who name="Jonas">vandenbj</who>
    <bug_when>2017-05-16 02:55:05 -0700</bug_when>
    <thetext>It looks like 10.1.1 only contains Security updates.

https://support.apple.com/en-us/HT207804</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309114</commentid>
    <comment_count>39</comment_count>
    <who name="Deepak Chaula">deepak</who>
    <bug_when>2017-05-16 06:25:25 -0700</bug_when>
    <thetext>Yes, still I am facing this issue...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1309915</commentid>
    <comment_count>40</comment_count>
    <who name="Divya Manian">manian</who>
    <bug_when>2017-05-17 16:57:53 -0700</bug_when>
    <thetext>There is a Beta program https://beta.apple.com that would be good to sign up for to get early access on what goes into the next release of Safari ahead of time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1311833</commentid>
    <comment_count>41</comment_count>
    <who name="">gneius</who>
    <bug_when>2017-05-23 05:59:32 -0700</bug_when>
    <thetext>(In reply to Divya Manian from comment #40)
&gt; There is a Beta program https://beta.apple.com that would be good to sign up
&gt; for to get early access on what goes into the next release of Safari ahead
&gt; of time.

Hi, 

We have more and more customer experiencing this issue. So far the work around is to add some delay when sending data through websocket. The work around is not really acceptable by our customers as it adds a lot of overhead and reduce performance by a large margin. 

Is it possible to get an ETA on when the fix will make it into the release version of Safari and iOS so we can communicate that to our customers? 

TIA!
qing</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1311837</commentid>
    <comment_count>42</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-05-23 06:29:27 -0700</bug_when>
    <thetext>Hi, you&apos;re unlikely to get a response from Apple developers here, as they&apos;re not generally allowed to comment about future product releases. This issue has been fixed in WebKit, and that&apos;s as much as you&apos;re going to be able to get here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1348741</commentid>
    <comment_count>43</comment_count>
    <who name="Jonas">vandenbj</who>
    <bug_when>2017-09-14 05:51:01 -0700</bug_when>
    <thetext>Is this confirmed to be part of Safari 11?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1348803</commentid>
    <comment_count>44</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-09-14 09:26:31 -0700</bug_when>
    <thetext>This is fixed in the latest updates to shipping Safari, in macOS 10.12.6 and iOS 10.3.3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586902</commentid>
    <comment_count>45</comment_count>
    <who name="">berkus</who>
    <bug_when>2019-11-04 00:15:43 -0800</bug_when>
    <thetext>This issue is still present in Safari 13.0.2 (14608.2.40.1.3)

Log from the sample above in this version of Safari:

[Log] sending first binary message (wstest.js, line 16)
[Log] bufferedAmount is 0 (wstest.js, line 18)
[Log] sending second binary message (wstest.js, line 21)
[Log] bufferedAmount is 0 (wstest.js, line 23)
[Log] sending third binary message (wstest.js, line 25)
[Log] bufferedAmount is 0 (wstest.js, line 27)
[Log] WebSocket closed with code: 1005, reason:  (wstest.js, line 12)

Log from the same code on Firefox:

sending first binary message wstest.js:16:11
bufferedAmount is 23085 wstest.js:18:11
sending second binary message wstest.js:21:11
bufferedAmount is 46170 wstest.js:23:11
sending third binary message wstest.js:25:11
bufferedAmount is 69255 wstest.js:27:11
WebSocket closed with code: 1005, reason:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586903</commentid>
    <comment_count>46</comment_count>
    <who name="">berkus</who>
    <bug_when>2019-11-04 00:16:17 -0800</bug_when>
    <thetext>That&apos;s macOS 10.14.6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1586905</commentid>
    <comment_count>47</comment_count>
    <who name="">berkus</who>
    <bug_when>2019-11-04 01:00:23 -0800</bug_when>
    <thetext>Not sure if this is related or not, but we get on Safari 13.0.2 the following:

WebSocket connection to &apos;wss://xxx/&apos; failed: Failed to compress frame

This seems related to larger size frames.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1587375</commentid>
    <comment_count>48</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2019-11-05 07:00:19 -0800</bug_when>
    <thetext>I&apos;m seeing &quot;bufferedAmount is 0&quot; in the console logs from jsfiddle.  Last time it was an indicator that the WebSocket data was not being sent, which had huge consequences.  This time something different is going on, but I&apos;ve verified the WebSocket data is being sent.  What is the actual consequence of the bufferedAmount being 0 in a real application?

The &quot;Failed to compress frame&quot; is probably something unrelated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1588385</commentid>
    <comment_count>49</comment_count>
    <who name="">planauts</who>
    <bug_when>2019-11-07 13:49:21 -0800</bug_when>
    <thetext>I&apos;m also seeing issues when I send a large payload. It works on Safari 12 but not Safari 13.

Is this being investigated again?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1590489</commentid>
    <comment_count>50</comment_count>
    <who name="spalmer">spalmer</who>
    <bug_when>2019-11-15 07:38:04 -0800</bug_when>
    <thetext>The status on this bug states &quot;RESOLVED FIXED&quot;, can we please update to &quot;REOPENED&quot; or &quot;OPEN&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1590555</commentid>
    <comment_count>51</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-11-15 11:05:11 -0800</bug_when>
    <thetext>Please file a new bug. This one from 2017 has been fixed for a long time, and it is not appropriate to track new issues here, even if they have similar symptoms.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1590558</commentid>
    <comment_count>52</comment_count>
    <who name="">berkus</who>
    <bug_when>2019-11-15 11:09:56 -0800</bug_when>
    <thetext>What about comments #45 and #48 - are those not relevant as well?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1590565</commentid>
    <comment_count>53</comment_count>
    <who name="">berkus</who>
    <bug_when>2019-11-15 11:18:43 -0800</bug_when>
    <thetext>New bug for frame compress issue is created: https://bugs.webkit.org/show_bug.cgi?id=204237</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>306397</attachid>
            <date>2017-04-06 09:55:51 -0700</date>
            <delta_ts>2017-04-06 11:14:02 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-170463-20170406095554.patch</filename>
            <type>text/plain</type>
            <size>2390</size>
            <attacher name="Alex Christensen">achristensen</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDIxNTA0MSkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE3IEBACisyMDE3LTA0LTA2ICBBbGV4IENo
cmlzdGVuc2VuICA8YWNocmlzdGVuc2VuQHdlYmtpdC5vcmc+CisKKyAgICAgICAgUkVHUkVTU0lP
TihTYWZhcmkgMTAuMSk6IFdlYlNvY2tldCBlcnJvcnMgd2l0aCAiRmFpbGVkIHRvIHNlbmQgV2Vi
U29ja2V0IGZyYW1lLiIgIGlmIHRvbyBtdWNoIGRhdGEgaXMgc2VudAorICAgICAgICBodHRwczov
L2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTcwNDYzCisKKyAgICAgICAgUmV2aWV3
ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgVGhpcyBuZWVkcyBhIHJlZ3Jlc3Npb24g
dGVzdC4KKworICAgICAgICAqIHBsYXRmb3JtL25ldHdvcmsvY2YvU29ja2V0U3RyZWFtS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1cm4gc3RkOjpudWxsb3B0OworICAgICAgICByZXR1cm4gMDsKIAogICAgIEdV
bmlxdWVPdXRQdHI8R0Vycm9yPiBlcnJvcjsKICAgICBnc3NpemUgd3JpdHRlbiA9IGdfcG9sbGFi
bGVfb3V0cHV0X3N0cmVhbV93cml0ZV9ub25ibG9ja2luZyhtX291dHB1dFN0cmVhbS5nZXQoKSwg
ZGF0YSwgbGVuZ3RoLCBtX2NhbmNlbGxhYmxlLmdldCgpLCAmZXJyb3Iub3V0UHRyKCkpOwo=
</data>
<flag name="review"
          id="327741"
          type_id="1"
          status="+"
          setter="mcatanzaro"
    />
          </attachment>
      

    </bug>

</bugzilla>