Skip to content

Conversation

@moreveal
Copy link
Contributor

@moreveal moreveal commented Jan 8, 2026

Scope

Requests to https://beatmods.com/api/mods may hang or timeout when executed
from the Electron main process, while the same endpoints work reliably
in browsers.

This results in an infinite "Loading mods" state for users.


Implementation

Requests to beatmods.com are routed through Electron's Chromium network stack
using electron.net.

This avoids Cloudflare-related issues observed with Node.js HTTP clients on
large responses. The change is scoped only to beatmods.com; all other requests
remain unchanged.


How to Test

  1. Run the app (npm run start).
  2. Open the Mods tab for any Beat Saber version.
  3. Verify that the mods list loads correctly.

Emoji Guide

For reviewers: Emojis can be added to comments to call out blocking versus non-blocking feedback.

E.g: Praise, minor suggestions, or clarifying questions that don’t block merging the PR.

🟢 Nice refactor!

🟡 Why was the default value removed?

E.g: Blocking feedback must be addressed before merging.

🔴 This change will break something important

Blocking 🔴 ❌ 🚨 RED
Non-blocking 🟡 💡 🤔 💭 Yellow, thinking, etc
Praise 🟢 💚 😍 👍 🙌 Green, hearts, positive emojis, etc

Note

Resolves Cloudflare timeouts by routing BeatMods traffic through Electron’s Chromium network stack.

  • Adds isBeatmodsUrl and conditionally uses new electron.net implementations for getJSON, downloadFile, and downloadBuffer
  • Implements requestWithElectronNet, downloadFileWithElectronNet, and downloadBufferWithElectronNet with HTTP status validation, timeout/error handling, progress updates, and content-disposition filename support
  • Keeps existing got-based logic (including IPv4/IPv6 family preference caching) for non-BeatMods URLs; headers unchanged via baseHeaders

Written by Cursor Bugbot for commit 27c241e. This will update automatically on new commits. Configure here.

@moreveal moreveal force-pushed the fix/beatmods-electron-net branch 3 times, most recently from ae8086a to 0832357 Compare January 8, 2026 10:31
@moreveal moreveal force-pushed the fix/beatmods-electron-net branch from 0832357 to faeaa7d Compare January 8, 2026 10:32
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@sonarqubecloud
Copy link

Copy link
Owner

@Zagrios Zagrios left a comment

Choose a reason for hiding this comment

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

Looks good to me 🙌

@Zagrios
Copy link
Owner

Zagrios commented Jan 23, 2026

Thanks a lot @moreveal ❤️
Merging ! 🚀

@Zagrios Zagrios merged commit 49ef820 into Zagrios:master Jan 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] : endless loading of mods [BUG] : My mod loader remains stuck on Loading Mods

2 participants