Skip to content

Bump radiance to fix Pro lost on upgrade (radiance #463)#8733

Open
myleshorton wants to merge 3 commits intomainfrom
fix/radiance-preserve-data-dir
Open

Bump radiance to fix Pro lost on upgrade (radiance #463)#8733
myleshorton wants to merge 3 commits intomainfrom
fix/radiance-preserve-data-dir

Conversation

@myleshorton
Copy link
Copy Markdown
Contributor

Summary

Picks up radiance#463 at commit 182a5c1 to fix the v9.1.x "Pro shown as expired after the update" regression reported on Freshdesk #174455 / #174496 / #174515.

The radiance refactor in #370 (restructure codebase around LocalBackend) silently moved Android's settings.json from <app.dataDir>/.lantern/settings.json (v9.0.x) to <app.dataDir>/.lantern/data/settings.json (v9.1.x). Every existing install lost its persisted user_id, device_id, jwt_token, and user_level on first launch of v9.1.x — surfacing as "Pro expired" because the fresh client called UserRecoverByDevice against a brand-new device id and got back a fresh user.

radiance #463 fix in two parts

  1. setupDirectories honors the caller's path as-is again (drops the unconditional maybeAddSuffix calls "failed to bind..." error installing lantern in windows #370 added).
  2. One-shot migration in InitSettings: reads both <dataDir>/settings.json and <dataDir>/data/settings.json on first launch of the fixed client, prefers whichever actually has user_level="pro", falls back to canonical otherwise. So any user already on v9.1.x gets their Pro state restored on the next upgrade regardless of which file holds the good state. 6 unit tests cover the migration paths.

What this PR does

Single bump of getlantern/radiance in go.mod (and the corresponding go.sum) to commit 182a5c1 from the fix/preserve-data-dir-path branch. No other code changes.

Test plan

  • Build a nightly off this branch
  • Manual Android upgrade test: install latest 9.1.5-beta on a real device with Pro, upgrade to a build off this branch, verify Pro is preserved
  • Manual fresh-install test: install a build off this branch on a clean device, verify normal Pro purchase flow still works (migration is a no-op)
  • Confirm no /data / /logs subdirectories are created under the app's data dir after upgrade

Cut a nightly

Once approved, tag and cut a nightly so the fix lands for users currently affected on 9.1.5.

🤖 Generated with Claude Code

Picks up radiance#463 which fixes the v9.1.x settings-path
regression that wiped users' persisted state (user_id, device_id,
jwt token, user_level) on the first launch of v9.1.x. After
upgrade, the client started fresh with `user_level="free"`, called
`UserRecoverByDevice` cold against the auth server, and surfaced
"Pro shown as expired" — see Freshdesk #174455 / #174496 / #174515.

The radiance fix has two parts:
1. `setupDirectories` honors the caller's path as-is (drops the
   unconditional `/data` and `/logs` suffixes #370 introduced).
2. One-shot migration in `InitSettings`: reads both <dataDir>/
   settings.json and <dataDir>/data/settings.json on first launch
   of the fixed client, prefers whichever has user_level="pro",
   falls back to canonical otherwise. So any user already on
   v9.1.x gets their Pro state restored on the next upgrade
   regardless of which file holds the good state.

Cut a nightly off this branch to ship the fix to affected v9.1.5
users.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 6, 2026 14:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the github.com/getlantern/radiance Go module dependency to a newer pseudo-version to pick up the upstream fix described in radiance PR #463 (intended to prevent Android users’ persisted Pro state from being lost after upgrading from v9.0.x → v9.1.x).

Changes:

  • Bump github.com/getlantern/radiance to v0.0.0-20260506142456-182a5c14342a in go.mod.
  • Update go.sum entries to match the new radiance version.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
go.mod Updates the required radiance pseudo-version to the commit containing the upstream fix.
go.sum Refreshes module hashes for the updated radiance version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

myleshorton and others added 2 commits May 6, 2026 09:52
Picks up radiance d97729d which extends the migration to also check
<dataDir>/local.json, the filename v9.0.x used before #370 renamed
it to settings.json. Fixes Derek's reproduction where 9.0.25→fix
on macOS lost Pro because the prior code only looked at
settings.json and data/settings.json.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Picks up the review fixes on radiance#463: migration now distinguishes
ENOENT from other read errors (skips migration if canonical is
unreadable for non-ENOENT reasons) and uses atomicfile.WriteFile so
a crash mid-write can't leave a partial settings.json on disk.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants