Skip to content

Fix module repository loading and missing README rendering#747

Open
byemaxx wants to merge 4 commits into
JingMatrix:masterfrom
byemaxx:fix-module-repository
Open

Fix module repository loading and missing README rendering#747
byemaxx wants to merge 4 commits into
JingMatrix:masterfrom
byemaxx:fix-module-repository

Conversation

@byemaxx

@byemaxx byemaxx commented Jun 3, 2026

Copy link
Copy Markdown

Summary

Fix module repository loading by switching to the new official LSPosed backup CDN endpoint, https://backup.modules.lsposed.org/.

The previous repository endpoints and fallback mirrors are deprecated because the official LSPosed manager has moved to a newer CDN-backed repository request mechanism. The new official backup CDN endpoint remains compatible with the legacy repository API format used by this manager:

  • <base>/modules.json
  • <base>/module/<package>.json

This allows the existing repository loading logic to keep working without migrating this manager to the newer official request mechanism.

This PR also fixes README rendering on the module detail page. Some module entries from modules.json do not include full README content. When README content is missing, the manager now loads the per-module JSON and refreshes the README view after the full module data is available.

Changes

  • Switch module repository loading to the new official LSPosed backup CDN endpoint.
  • Remove the deprecated old repository fallback chain.
  • Load per-module JSON and refresh the README tab when README content is missing.

byemaxx and others added 4 commits June 3, 2026 12:26
@ahmed-alnassif

Copy link
Copy Markdown

@JingMatrix

@Shallow-dusty

Copy link
Copy Markdown

Thanks for working on this. I pulled and tested the PR locally.

What looks good:

  • https://backup.modules.lsposed.org/modules.json currently returns 200 with the expected JSON payload, while the old list endpoint https://modules.lsposed.org/modules.json returns 403 for me.
  • The per-module JSON endpoint also works on the backup host, e.g. https://backup.modules.lsposed.org/module/com.luckyzyx.luckytool.json returns 200.
  • ./gradlew.bat --no-daemon :app:compileDebugJavaWithJavac and :app:assembleDebug both pass locally on this branch.

One regression I noticed: RepoItemFragment changes the "open in browser" URL from https://modules.lsposed.org/module/<package> to https://backup.modules.lsposed.org/module/<package>, but the backup host appears to serve only the JSON API for module details. For example:

  • https://backup.modules.lsposed.org/module/com.luckyzyx.luckytool -> 404
  • https://modules.lsposed.org/module/com.luckyzyx.luckytool -> 200 HTML page
  • https://backup.modules.lsposed.org/module/com.luckyzyx.luckytool.json -> 200 JSON

So it may be better to keep a separate web base URL for menu_open_in_browser, and only use the backup host for the JSON API calls.

A smaller robustness note: loadRemoteData() / loadRemoteReleases() still silently ignore non-2xx HTTP responses. That is the behavior that made the old 403 list response hard to surface in the UI. Not necessarily required to fix the current outage, but treating non-successful responses as load failures would make the repo loader less fragile next time a CDN endpoint changes.

@Shallow-dusty

Copy link
Copy Markdown

I opened a small follow-up PR at #765 with the two adjustments mentioned above: keeping the browser URL on the public web host, and surfacing non-2xx / empty API responses as load failures.

Thanks again for the original fix and investigation here. If maintainers prefer this to stay in #747 instead, the changes should be straightforward to fold back.

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.

3 participants