Skip to content

fix bepinex reinstall loop and enable free-user install flow#22470

Merged
IDCs merged 1 commit intov2.0from
fix/app-324
Apr 16, 2026
Merged

fix bepinex reinstall loop and enable free-user install flow#22470
IDCs merged 1 commit intov2.0from
fix/app-324

Conversation

@IDCs
Copy link
Copy Markdown
Contributor

@IDCs IDCs commented Apr 15, 2026

addGameSupport applied DEFAULT_VERSION ("5.4.22") even to games whose customPackDownloader (CPD) ships a different BepInEx version (e.g. I Am Future ships 5.4.23). The pinned-version check in ensureBepInExPack then fired on every will-deploy, re-invoked the CPD, and looped the "replace existing mod?" dialog indefinitely.

  • Skip DEFAULT_VERSION in addGameSupport when a CPD is set; gate the pinned-version check in ensureBepInExPack on the same condition.
  • Replace the slice(0, 6) version truncation with a regex so patch numbers >= 100 (e.g. 5.4.110) aren't corrupted.
  • Swap the premium-gated nexus-download in download() for a start-download via nxm://, mirroring the SMAPI flow. Free users now get the browser-redirect dialog instead of a silent rejection.
  • Drop the now-dead NotPremiumError class and its catches.
  • Flatten ensureBepInExPack, dedupe download()'s install paths, and key updateSupportedGames off the downloadId directly.

fixes https://linear.app/nexus-mods/issue/APP-324/bepinex-constant-reinstall-loop-via-modtype-bepinex-extension fixes #20876

NOTE: this will not be backported to 1.16; fix will only be available for 2.0

`addGameSupport` applied DEFAULT_VERSION ("5.4.22") even to games
whose customPackDownloader ships a different BepInEx version
(e.g. I Am Future ships 5.4.23). The pinned-version check in
ensureBepInExPack then fired on every will-deploy, re-invoked the CPD,
and looped the "replace existing mod?" dialog indefinitely.

- Skip DEFAULT_VERSION in addGameSupport when a CPD is set; gate the
  pinned-version check in ensureBepInExPack on the same condition.
- Replace the slice(0, 6) version truncation with a regex so patch
  numbers >= 100 (e.g. 5.4.110) aren't corrupted.
- Swap the premium-gated nexus-download in download() for a
  start-download via nxm://, mirroring the SMAPI flow. Free users now
  get the browser-redirect dialog instead of a silent rejection.
- Drop the now-dead NotPremiumError class and its catches.
- Flatten ensureBepInExPack, dedupe download()'s install paths, and
  key updateSupportedGames off the downloadId directly.

fixes https://linear.app/nexus-mods/issue/APP-324/bepinex-constant-reinstall-loop-via-modtype-bepinex-extension
fixes #20876
@IDCs IDCs self-assigned this Apr 15, 2026
@IDCs IDCs requested a review from a team as a code owner April 15, 2026 11:52
@IDCs IDCs linked an issue Apr 15, 2026 that may be closed by this pull request
@IDCs IDCs merged commit e905f83 into v2.0 Apr 16, 2026
3 checks passed
@IDCs IDCs deleted the fix/app-324 branch April 16, 2026 13:59
github-actions bot pushed a commit that referenced this pull request Apr 16, 2026
fix bepinex reinstall loop and enable free-user install flow
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.

Constant Reinstall loop

2 participants