<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chatter3</title>
    <description>The latest articles on DEV Community by Chatter3 (@chatter3_lab).</description>
    <link>https://dev.to/chatter3_lab</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4250965%2F199bcb19-4f8b-413b-a42a-287b008cd084.jpg</url>
      <title>DEV Community: Chatter3</title>
      <link>https://dev.to/chatter3_lab</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chatter3_lab"/>
    <language>en</language>
    <item>
      <title>Six production bugs in a WebRTC app, with the tests that keep them fixed</title>
      <dc:creator>Chatter3</dc:creator>
      <pubDate>Wed, 18 Nov 2026 05:54:48 +0000</pubDate>
      <link>https://dev.to/chatter3_lab/six-production-bugs-in-a-webrtc-app-with-the-tests-that-keep-them-fixed-25oj</link>
      <guid>https://dev.to/chatter3_lab/six-production-bugs-in-a-webrtc-app-with-the-tests-that-keep-them-fixed-25oj</guid>
      <description>&lt;p&gt;Chatter3 is a free 1-on-1 English conversation app (&lt;a href="https://app.chatter3.com" rel="noopener noreferrer"&gt;https://app.chatter3.com&lt;/a&gt;) — two learners, five minutes, one video call. This is the engineering log of six bugs that reached production, and every one of them is written up with the code that runs and the test that keeps it fixed.&lt;/p&gt;

&lt;p&gt;The notes live at &lt;a href="https://chatter3-lab.github.io/" rel="noopener noreferrer"&gt;https://chatter3-lab.github.io/&lt;/a&gt; — plain HTML, one stylesheet, no CDN fonts and no analytics, because they have to be readable from a phone in mainland China.&lt;/p&gt;

&lt;h2&gt;
  
  
  The six notes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. A frozen screen, and the sentence in the documentation that said why
&lt;/h3&gt;

&lt;p&gt;The share button froze the HarmonyOS app. The cause was a window request answered with a controller that no component ever rendered — a documented way to block the render process. The fix was to render the requested window as a second component that is always in the tree, so its controller is attached when the request arrives.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The camera was granted, and the app still said it was denied
&lt;/h3&gt;

&lt;p&gt;A protected resource has two permissions, not one: the system-level one and the one the page asks the host for. The shell never answered the second, so every request was refused. The fix is an &lt;code&gt;onPermissionRequest&lt;/code&gt; handler that asks the system for &lt;code&gt;ohos.permission.CAMERA&lt;/code&gt; / &lt;code&gt;ohos.permission.MICROPHONE&lt;/code&gt; at the moment the page asks, and grants the page only if the system granted it.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. A Durable Object that forgot one of the two people
&lt;/h3&gt;

&lt;p&gt;The sockets stayed open, but a field holding them was lost when the object was evicted. One side sent everything; the other side received nothing. The fix is to never keep sockets in a field: the hibernation API is the only place they live.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. A wider route ate a GDPR export request
&lt;/h3&gt;

&lt;p&gt;"Export my data" answered &lt;em&gt;User not found&lt;/em&gt; for every signed-in user, because a generic &lt;code&gt;/api/user/&amp;lt;id&amp;gt;&lt;/code&gt; handler sat above it in the file. Route order is not a style question when the routes have different shapes.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. "Your network blocked the call" when the other person never arrived
&lt;/h3&gt;

&lt;p&gt;The failure reason was read out of the ICE statistics. But a connection that was never offered makes no candidates at all — and every statistic then looks like a blocked network. The fix is to check &lt;code&gt;peer_not_joined&lt;/code&gt; &lt;em&gt;before&lt;/em&gt; any ICE statistics, and to hide "Report connection issue" for that reason.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. The timer that started before the call did
&lt;/h3&gt;

&lt;p&gt;The countdown began at the moment of the match, so the waiting counted as conversation. Fixing it also uncovered a sign error that made two phones count down to different seconds: the skew is subtracted, not added.&lt;/p&gt;

&lt;p&gt;The clock now belongs to the server. &lt;code&gt;POST /api/matching/ready&lt;/code&gt; records &lt;code&gt;user1_ready_at&lt;/code&gt; / &lt;code&gt;user2_ready_at&lt;/code&gt; and sets &lt;code&gt;call_started_at&lt;/code&gt; in one atomic statement; the client polls every two seconds and also signals over the socket; and the server's &lt;code&gt;server_time_ms&lt;/code&gt; is the truth, with the client's skew computed against it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The measurements
&lt;/h2&gt;

&lt;p&gt;There is also a page with the first 133 sessions measured on the live server — how long a call takes to connect, and how often the other person never comes — with the query that produced every number and the limits of the sample attached: &lt;a href="https://chatter3-lab.github.io/data/" rel="noopener noreferrer"&gt;https://chatter3-lab.github.io/data/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Eight sessions ended because the partner never arrived. One was a genuine network failure. The product was telling its users to fix their networks nine times out of ten.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why these are public
&lt;/h2&gt;

&lt;p&gt;These are the kinds of bug that every video call app has and none of them write down. The notes are here because the fixes are more useful to the next person than the app is, and because a page with real code on it is a page a search engine can quote.&lt;/p&gt;

&lt;p&gt;The app itself is free: &lt;a href="https://app.chatter3.com" rel="noopener noreferrer"&gt;https://app.chatter3.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webrtc</category>
      <category>javascript</category>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
