<?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>271664</bug_id>
          
          <creation_ts>2024-03-25 10:57:05 -0700</creation_ts>
          <short_desc>[iOS 17.4] Local WebKit builds don&apos;t use locally-built app extensions, lldb cannot attach</short_desc>
          <delta_ts>2025-04-24 08:48:41 -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>WebKit Process Model</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>273550</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=272401</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=291243</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="Ali Juma">ajuma</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>ap</cc>
    
    <cc>dave+webkit</cc>
    
    <cc>dvpdiner2</cc>
    
    <cc>justincohen</cc>
    
    <cc>jzw</cc>
    
    <cc>mike</cc>
    
    <cc>mjs</cc>
    
    <cc>pvollan</cc>
    
    <cc>rniwa</cc>
    
    <cc>rohitrao</cc>
    
    <cc>sihui_liu</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2023720</commentid>
    <comment_count>0</comment_count>
    <who name="Ali Juma">ajuma</who>
    <bug_when>2024-03-25 10:57:05 -0700</bug_when>
    <thetext>When building WebKit for the iOS simulator after 276550@main (so that USE_EXTENSIONKIT is true), local builds try to use app extensions from the simulator runtime rather than their locally-built counterparts.

For example, rather than using WebKitBuild/Debug-iphonesimulator/WebContentExtension.appex, local builds instead try to use /Library/Developer/CoreSimulator/Volumes/iOS_21E213/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/ExtensionKit/Extensions/WebContentExtension.appex

In practice this means that local builds are very broken, since they are combining locally-built WebKit.framework with pre-built app extensions, resulting in mismatching IPC messages.

Is there some additional configuration needed to get ExtensionKit builds working with the public SDK?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2023939</commentid>
    <comment_count>1</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2024-03-26 09:08:54 -0700</bug_when>
    <thetext>(In reply to Ali Juma from comment #0)
&gt; When building WebKit for the iOS simulator after 276550@main (so that
&gt; USE_EXTENSIONKIT is true), local builds try to use app extensions from the
&gt; simulator runtime rather than their locally-built counterparts.
&gt; 
&gt; For example, rather than using
&gt; WebKitBuild/Debug-iphonesimulator/WebContentExtension.appex, local builds
&gt; instead try to use
&gt; /Library/Developer/CoreSimulator/Volumes/iOS_21E213/Library/Developer/
&gt; CoreSimulator/Profiles/Runtimes/iOS
&gt; 17.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/ExtensionKit/
&gt; Extensions/WebContentExtension.appex
&gt; 
&gt; In practice this means that local builds are very broken, since they are
&gt; combining locally-built WebKit.framework with pre-built app extensions,
&gt; resulting in mismatching IPC messages.
&gt; 
&gt; Is there some additional configuration needed to get ExtensionKit builds
&gt; working with the public SDK?

Thanks for reporting this issue!

The extension executables themselves are very small executables that just calls into the WebKit framework. What specific issues are you seeing? Since the IPC code is contained in the WebKit framework, I would not immediately expect there to be mismatches with regards to IPC messaging.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2023975</commentid>
    <comment_count>2</comment_count>
    <who name="Ali Juma">ajuma</who>
    <bug_when>2024-03-26 12:24:44 -0700</bug_when>
    <thetext>(In reply to Per Arne Vollan from comment #1)
&gt; Thanks for reporting this issue!
&gt; 
&gt; The extension executables themselves are very small executables that just
&gt; calls into the WebKit framework. What specific issues are you seeing?

The main issue is that since these executables are part of the system, SIP prevents attaching a debugger to them, even if they are ultimately calling into the WebKit framework.

&gt; Since
&gt; the IPC code is contained in the WebKit framework, I would not immediately
&gt; expect there to be mismatches with regards to IPC messaging.

Sometimes on launch, NetworkProcessProxy::didReceiveNetworkProcessProxyMessage
receives a WebSWServerConnection_WhenServiceWorkerIsTerminatedForTesting message which it should never receive outside of tests, so fails an assertion for this unhandled message. That made me think that the sender and receiver were using different versions of the MessageName enum, but since this is not consistent it&apos;s probably unrelated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2024182</commentid>
    <comment_count>3</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2024-03-27 08:29:05 -0700</bug_when>
    <thetext>(In reply to Ali Juma from comment #2)
&gt; (In reply to Per Arne Vollan from comment #1)
&gt; &gt; Thanks for reporting this issue!
&gt; &gt; 
&gt; &gt; The extension executables themselves are very small executables that just
&gt; &gt; calls into the WebKit framework. What specific issues are you seeing?
&gt; 
&gt; The main issue is that since these executables are part of the system, SIP
&gt; prevents attaching a debugger to them, even if they are ultimately calling
&gt; into the WebKit framework.
&gt; 

That is a good point! I will look into ways of resolving this.

&gt; &gt; Since
&gt; &gt; the IPC code is contained in the WebKit framework, I would not immediately
&gt; &gt; expect there to be mismatches with regards to IPC messaging.
&gt; 
&gt; Sometimes on launch,
&gt; NetworkProcessProxy::didReceiveNetworkProcessProxyMessage
&gt; receives a WebSWServerConnection_WhenServiceWorkerIsTerminatedForTesting
&gt; message which it should never receive outside of tests, so fails an
&gt; assertion for this unhandled message. That made me think that the sender and
&gt; receiver were using different versions of the MessageName enum, but since
&gt; this is not consistent it&apos;s probably unrelated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2025127</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-04-01 10:58:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/125726458&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027333</commentid>
    <comment_count>5</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2024-04-09 21:48:41 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 272401 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027505</commentid>
    <comment_count>6</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2024-04-10 11:22:24 -0700</bug_when>
    <thetext>This is still an issue, but the crash you are seeing should be resolved by  https://commits.webkit.org/277304@main.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2027624</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2024-04-10 17:53:31 -0700</bug_when>
    <thetext>*** Bug 272442 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2034556</commentid>
    <comment_count>8</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2024-05-10 09:47:48 -0700</bug_when>
    <thetext>*** Bug 273550 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2112364</commentid>
    <comment_count>9</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2025-04-22 01:04:03 -0700</bug_when>
    <thetext>Was this ever resolved?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2112830</commentid>
    <comment_count>10</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2025-04-24 00:02:01 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 273550 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2112832</commentid>
    <comment_count>11</comment_count>
    <who name="Per Arne Vollan">pvollan</who>
    <bug_when>2025-04-24 00:02:25 -0700</bug_when>
    <thetext>Yes, this is a dupe of https://bugs.webkit.org/show_bug.cgi?id=273550.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2112901</commentid>
    <comment_count>12</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2025-04-24 08:48:41 -0700</bug_when>
    <thetext>Nice!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>