Skip to content

Conversation

daihere1993
Copy link
Contributor

warning: cannot resolve "http-parser", a dependency of "testapp"
error: failed to prepare transaction (could not satisfy dependencies)

FAIL   node  test/src/updater/blackboxUpdateTest.ts > Electron autoupdate (fresh install & update) > linux > arch - (pacman)
FAIL   node  test/src/updater/linuxUpdaterTest.ts > test arch download and install (pacman)

Root cause: Arch Linux removed the http-parser package, but our Pacman metadata still declares it as a required dependency. Reinstall attempts during the Arch updater tests therefore fail with “unable to satisfy dependency ‘http-parser’”, causing both the blackbox pacman autoupdate test and the Linux pacman updater unit test to error out.

Fix: I can not find our project depends on http-parser, so the easiest way to fix is just remove it.

@mmaietta if we do depend on http-parser, then we may need switch to llhttp instead.

Copy link

changeset-bot bot commented Sep 26, 2025

⚠️ No Changeset found

Latest commit: 8f89afa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@daihere1993 daihere1993 changed the title Fix two failed linux updater tests fix: two failed linux updater tests Sep 26, 2025
@daihere1993 daihere1993 force-pushed the fix/two-linux-updater-tests-failed branch from f9bf49c to 8f89afa Compare September 26, 2025 09:55

case "pacman":
return ["c-ares", "ffmpeg", "gtk3", "http-parser", "libevent", "libvpx", "libxslt", "libxss", "minizip", "nss", "re2", "snappy", "libnotify", "libappindicator-gtk3"]
return ["c-ares", "ffmpeg", "gtk3", "libevent", "libvpx", "libxslt", "libxss", "minizip", "nss", "re2", "snappy", "libnotify", "libappindicator-gtk3"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a breaking change since this impacts end-user application packaging. Is there a drop-in replacement for http-parser?

Copy link
Contributor Author

@daihere1993 daihere1993 Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the history and found that these dependencies were introduced in this commit on June 26, 2019. At that time, http-parser had already been deprecated in Node.js v12 (released on April 23, 2019).

It seems we added these dependencies because some packages on Arch-based systems still relied on http-parser while Node.js was just beginning its transition to llhttp. As a workaround, we bundled additional dependencies in electron-builder. It's just my guess as there no enough description for above commit.

From my perspective, removing this package now is not a breaking change. The latest Arch Linux image no longer supports http-parser, and since Node.js has fully supported llhttp for many years, no drop-in replacement is required.

@mmaietta
Copy link
Collaborator

On the premise of not changing production behavior/logic in order to fix an issue with a test case, I took a different route in 53415d3 to resolve the test failures.

Closing this PR since master is building successfully

@mmaietta mmaietta closed this Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants