<?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>280512</bug_id>
          
          <creation_ts>2024-09-27 07:31:38 -0700</creation_ts>
          <short_desc>REGRESSION(284269@main?) [WPE] generate-bundle is failing with assert error</short_desc>
          <delta_ts>2024-10-17 19:43:26 -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>New Bugs</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=186594</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=280561</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=281717</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="Diego Pino">dpino</reporter>
          <assigned_to name="Diego Pino">dpino</assigned_to>
          <cc>aperez</cc>
    
    <cc>clopez</cc>
    
    <cc>lisiwei</cc>
    
    <cc>pgriffis</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2063735</commentid>
    <comment_count>0</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2024-09-27 07:31:38 -0700</bug_when>
    <thetext>The script `Tools/Scripts/generate-bundle` is failing after. Taking a look at the error message and latest commit, I believe the regression was introduced by 284269@main, but I haven&apos;t confirmed it.

To reproduce the error is necessary to do a build clean of WPE. In my case, I built WPE with JHBuild minimal dependencies moduleset. 

$ Tools/Scripts/generate-bundle --bundle=MiniBrowser --release --platform=wpe --destination=/home/pwuser/webkit/WebKitBuild/webkit-deploy-VNBqNIAhZZ
Traceback (most recent call last):
  File &quot;Tools/Scripts/generate-bundle&quot;, line 920, in &lt;module&gt;
    sys.exit(main())
  File &quot;Tools/Scripts/generate-bundle&quot;, line 915, in main
    bundle_file_path = bundle_creator.create()
  File &quot;Tools/Scripts/generate-bundle&quot;, line 337, in create
    self._create_bundle(bundle_binary)
  File &quot;Tools/Scripts/generate-bundle&quot;, line 681, in _create_bundle
    objects_to_copy.append(self._get_webkit_lib(&apos;InspectorResources&apos;))
  File &quot;Tools/Scripts/generate-bundle&quot;, line 377, in _get_webkit_lib
    assert(bundle_lib)
AssertionError</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2063742</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2024-09-27 07:56:13 -0700</bug_when>
    <thetext>Ah, we need to update the script, it currently has:

        if bundle_binary == &apos;MiniBrowser&apos;:
            # bunddle WebKit libraries
            objects_to_copy.extend(self._get_webkit_binaries())
            objects_to_copy.append(self._get_webkit_lib(&apos;InjectedBundle&apos;))
            if self._platform == &apos;wpe&apos;:
               objects_to_copy.append(self._get_webkit_lib(&apos;InspectorResources&apos;))

Instead of that, we need to pick the inspector.gresource file. Maybe
also check if other scripts need to set WEBKIT_INSPECTOR_RESOURCES_PATH
in the environment to run things from the bundle or uninstalled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064179</commentid>
    <comment_count>2</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2024-09-30 02:55:14 -0700</bug_when>
    <thetext>I cannot find `inspector.gresource` file in `WebKitBuild/WPE/Release`. OTOH, file `InspectorGResourceBundle.c` exists in `WebKitBuild/GTK/Release`.

```
$ find WebKitBuild/GTK/Release/ -name &quot;InspectorGResourceBundle.c&quot;
WebKitBuild/GTK/Release/WebKitGTK/DerivedSources/InspectorGResourceBundle.c
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064180</commentid>
    <comment_count>3</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2024-09-30 03:02:14 -0700</bug_when>
    <thetext>(In reply to Diego Pino from comment #2)
&gt; I cannot find `inspector.gresource` file in `WebKitBuild/WPE/Release`. OTOH,
&gt; file `InspectorGResourceBundle.c` exists in `WebKitBuild/GTK/Release`.
&gt; 
&gt; ```
&gt; $ find WebKitBuild/GTK/Release/ -name &quot;InspectorGResourceBundle.c&quot;
&gt; WebKitBuild/GTK/Release/WebKitGTK/DerivedSources/InspectorGResourceBundle.c
&gt; ```

That&apos;s expected: the GTK port compiles the .c file into libwebkitgtk-6.0.so
and only the WPE port has been changed to produce inspector.gresource</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064191</commentid>
    <comment_count>4</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2024-09-30 03:55:16 -0700</bug_when>
    <thetext>&gt; That&apos;s expected: the GTK port compiles the .c file into libwebkitgtk-6.0.so
&gt; and only the WPE port has been changed to produce inspector.gresource

Ok, so now WPE should produce a file called &apos;inspector.gresource&apos;. Agree. However, what I mentioned is that after building WPE I cannot find any file called &apos;inspector.gresource&apos; in &apos;WebKitBuild/WPE/Release&apos;. Maybe I&apos;m looking in the wrong place. Where should be this file?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064192</commentid>
    <comment_count>5</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2024-09-30 03:59:27 -0700</bug_when>
    <thetext>The generation of &apos;inspector.gresource&apos; file was fixed by Lauro in https://github.com/WebKit/WebKit/pull/34409</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064194</commentid>
    <comment_count>6</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2024-09-30 04:08:46 -0700</bug_when>
    <thetext>After apply the patch by Lauro, the command:

```
Tools/Scripts/generate-bundle --bundle=MiniBrowser --release --platform=wpe --destination=/home/pwuser/webkit/WebKitBuild/webkit-deploy-VNBqNIAhZZ
```

finished successfully.

I&apos;m not sure if Lauro&apos;s patch is enough or more changes are needed, like the ones mentioned by Adrian in https://bugs.webkit.org/show_bug.cgi?id=280512#c1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064468</commentid>
    <comment_count>7</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2024-10-01 02:08:32 -0700</bug_when>
    <thetext>Pull request: https://github.com/webkit/webkit/pull/34495</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064808</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-10-02 01:58:09 -0700</bug_when>
    <thetext>Committed 284551@main (26028203feef): &lt;https://commits.webkit.org/284551@main&gt;

Reviewed commits have been landed. Closing PR #34495 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2064809</commentid>
    <comment_count>9</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-10-02 01:59:18 -0700</bug_when>
    <thetext>&lt;rdar://problem/137111294&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>