<?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>262628</bug_id>
          
          <creation_ts>2023-10-04 09:22:11 -0700</creation_ts>
          <short_desc>WebGL: context lost - iOS 17 Safari</short_desc>
          <delta_ts>2023-10-30 08:31:31 -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>WebGL</component>
          <version>Safari 17</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 17</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>261313</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>travis</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>dino</cc>
    
    <cc>josselin.guillozet</cc>
    
    <cc>kbr</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1982462</commentid>
    <comment_count>0</comment_count>
    <who name="">travis</who>
    <bug_when>2023-10-04 09:22:11 -0700</bug_when>
    <thetext>We have a very lightweight Unity game that we&apos;ve been running pretty successfully on mobile web. That said, we&apos;ve just run into a pretty show-stopping issue with iOS 17 Safari. The game will work totally fine on iOS 17 Safari - but then after some combination of backgrounding, using other sites and other apps (not totally sure the exact repo) - it errors with:

&quot;WebGL: context lost&quot;

At this point, no matter how many times I refresh, I will always get this error. Force quitting browser and event resetting the device doesn&apos;t seem to recover it. I&apos;ve also tried to do different combos of compressed builds - and nothing seems to work. The one thing that does recover is clearing the safari cache. We never encountered this issue in Safari 16 - only 17. 

It seems like this might be an issue beyond Unity - see this thread. Apparently threejs is experiencing the same: https://developer.apple.com/forums/thread/737042</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1982529</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-10-04 12:33:47 -0700</bug_when>
    <thetext>I think it seems to be fixed in Safari 17.1:

https://developer.apple.com/documentation/safari-release-notes/safari-17_1-release-notes#WebGL</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983999</commentid>
    <comment_count>2</comment_count>
    <who name="Josselin Guillozet">josselin.guillozet</who>
    <bug_when>2023-10-10 08:46:18 -0700</bug_when>
    <thetext>We also observed some &quot;WebGL: context lost&quot; at least on iPhone X with iOS/Safari 16.7 after moving the browser to the background.
Once we get the error, we can&apos;t create any stable WebGL context until we clear the browser data.
More generally in production, we&apos;ve noticed a sharp increase of WebGL related error on Safari 16.7 and 17 (Unfortunately, we don&apos;t have specific logging to check whether it relates to &quot;WebGL: context lost&quot;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1984306</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-10-11 09:23:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/116813694&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988400</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-10-29 20:16:16 -0700</bug_when>
    <thetext>Safari 17.1 is released now, do we need to keep this open since it shipped with WebGL fix.

@Alexey - any input?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1988500</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-10-30 08:31:31 -0700</bug_when>
    <thetext>Indeed, this should have been duped to bug 261313.

*** This bug has been marked as a duplicate of bug 261313 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>