<?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>272400</bug_id>
          
          <creation_ts>2024-04-09 08:18:27 -0700</creation_ts>
          <short_desc>ASSERTION FAILED: Unhandled message WebSWServerConnection_PostMessageToServiceWorker to 0</short_desc>
          <delta_ts>2024-04-10 11:19:25 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=272442</see_also>
          <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="Alexey Proskuryakov">ap</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>cdumez</cc>
    
    <cc>rniwa</cc>
    
    <cc>sihui_liu</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2027158</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2024-04-09 08:18:27 -0700</bug_when>
    <thetext>Open source iOS simulator build always crashes MobileSafari with unhandled message assertion.

ASSERTION FAILED: Unhandled message WebSWServerConnection_PostMessageToServiceWorker to 0

This happens on a fresh simulator without any state, so this is just at the launch page, no website.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027159</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-04-09 08:19:07 -0700</bug_when>
    <thetext>&lt;rdar://problem/126136961&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027160</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2024-04-09 08:20:24 -0700</bug_when>
    <thetext>This is on 277221@main, after `build-webkit --debug --ios-simulator` and `run-safari --debug --ios-simulator`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027343</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2024-04-09 22:32:05 -0700</bug_when>
    <thetext>/Tools/Scripts/run-minibrowser --debug --ios-simulator hits the same issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027344</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2024-04-09 22:34:17 -0700</bug_when>
    <thetext>run-webkit-tests works, however.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027348</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2024-04-09 22:47:31 -0700</bug_when>
    <thetext>Hm... I can, however, launch MobileMiniBrowser.app from Xcode. As far as I can tell, it&apos;s loading the locally built WebKit although I can&apos;t attach lldb to a WebContent process launched this way for whatever reason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027353</commentid>
    <comment_count>6</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2024-04-09 23:04:27 -0700</bug_when>
    <thetext>This appears to be caused by setupIOSWebKitEnvironment not setting __XPC_* environmental variables. Applying the following diff seems to solve this issue although trunk WebKit immediately hits a debug assertion trying to load any real web page. It can successfully load about:blank and some basic data URLs however.

diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index abff7ad462a6..0042c11f70b8 100755
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -2999,6 +2999,8 @@ sub setupIOSWebKitEnvironment($)
 
     prependToEnvironmentVariableList(&quot;DYLD_FRAMEWORK_PATH&quot;, $dyldFrameworkPath);
     prependToEnvironmentVariableList(&quot;DYLD_LIBRARY_PATH&quot;, $dyldFrameworkPath);
+    prependToEnvironmentVariableList(&quot;__XPC_DYLD_FRAMEWORK_PATH&quot;, $dyldFrameworkPath);
+    prependToEnvironmentVariableList(&quot;__XPC_DYLD_LIBRARY_PATH&quot;, $dyldFrameworkPath);
     prependToEnvironmentVariableList(&quot;METAL_DEVICE_WRAPPER_TYPE&quot;, &quot;1&quot;);
 
     setUpGuardMallocIfNeeded();</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027354</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2024-04-09 23:08:33 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/27068</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027472</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-04-10 09:47:45 -0700</bug_when>
    <thetext>Committed 277304@main (c1593e5d86c1): &lt;https://commits.webkit.org/277304@main&gt;

Reviewed commits have been landed. Closing PR #27068 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027504</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2024-04-10 11:19:25 -0700</bug_when>
    <thetext>*** Bug 272401 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>