<?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>227072</bug_id>
          
          <creation_ts>2021-06-16 08:39:15 -0700</creation_ts>
          <short_desc>Service worker sometimes inactive after browser start up</short_desc>
          <delta_ts>2022-03-14 03:38:02 -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>Service Workers</component>
          <version>Safari 14</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 11</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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>marian.schaub</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1770197</commentid>
    <comment_count>0</comment_count>
    <who name="">marian.schaub</who>
    <bug_when>2021-06-16 08:39:15 -0700</bug_when>
    <thetext>We are witnessing a strange behaviour in Safari Desktop regarding service workers when the browser is initially started.

Steps to reproduce:
1. Visit https://sw-lifecycle-test.app.baqend.com/swTest/test.html . The Page will display &quot;No SW Response&quot; and install a simple service worker.
2. Close Safari (command+Q).
3. Open Safari and visit https://sw-lifecycle-test.app.baqend.com/swTest/test.html again.

While repeating steps 2 + 3 we saw different outcomes. Our expectation would be to always see &quot;SW Response&quot; since the installed service worker simply intercepts the html request and delivers a page with that content.
What we found is sometimes the page displayed &quot;SW Response&quot;, but often displayed &quot;No SW Response&quot;. In these cases we did not see a service worker in Develop -&gt; Service Workers context menu, but navigator.serviceWorker.controller
referenced the correct service worker. Reloading (both soft and hard reload) did not reliably lead to the service worker being activated again.

We were able to reproduce this on serveral Mac Book Pro machines running Safari 14.1.1 (16611.2.7.1.4).

After analyzing our tracking data we estimate about 4% of the Safari page impressions on our customers pages are affected by this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1770709</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2021-06-17 10:10:07 -0700</bug_when>
    <thetext>I personally haven&apos;t been able to reproduce this yet on Safari 15 beta. I see &quot;SW response&quot; every time I relaunch Safari.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1771944</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-06-23 08:40:31 -0700</bug_when>
    <thetext>&lt;rdar://problem/79667318&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1850044</commentid>
    <comment_count>3</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2022-03-10 05:18:18 -0800</bug_when>
    <thetext>@marian.schaub@baqend.com, can you still reproduce the issue with Safari 15?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1850123</commentid>
    <comment_count>4</comment_count>
    <who name="">marian.schaub</who>
    <bug_when>2022-03-10 09:03:47 -0800</bug_when>
    <thetext>Hello Youenn, the issue seems to be resolved, we were not able to reproduce it in Safari 15, thanks.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>