Skip to content

fix(app): accept shared instance invite before installing - #8327

Closed
ha-am-dev wants to merge 1 commit into
modrinth:mainfrom
ha-am-dev:fix/shared-instance-invite-accept
Closed

ha-am-dev wants to merge 1 commit into
modrinth:mainfrom
ha-am-dev:fix/shared-instance-invite-accept

Conversation

@ha-am-dev

@ha-am-dev ha-am-dev commented Nov 14, 2026 •

Copy link
Copy Markdown

Fixes #8326

What

Installing from an invite link calls accept_shared_instance_invite_for_install, which probes access first and only accepts the invite when the probe answers 401. If the probe answers 403, the unmapped status becomes an error before the accept is attempted (the toast then shows HTTP 403). If the probe answers successfully, that is treated as membership and the accept is skipped, so the membership-only version listing fails afterwards.

This accepts the invite first and falls back to the access probe only when the accept call fails. Accepting is idempotent on the client side - an "already has access" response is already treated as success - so reinstalls and owner installs keep working.

It also lines this path up with the notification path, which already accepts first (accept_pending_shared_instance_invite).

Testing

I could not test this end to end against the shared instances service from here. Repro to check with an invite whose recipient is still pending:

  • before: preview loads, install fails with HTTP 403
  • after: preview loads, invite is accepted, install starts

Happy to adjust if the membership check is supposed to happen somewhere else.

Confirmed failure point

The affected installation logs:

shared instances API request get_instance GET /instances/<instance-id> failed with status 403 Forbidden

That is the access probe, before any accept attempt. 403 is not mapped by SharedInstanceUnavailableReason::from_status, so the ? aborts and accept_shared_instance_invite is never reached. Accepting first removes that abort path entirely.

@github-actions

Copy link
Copy Markdown
Contributor

Pull request changelog

App

Added

Changed

Deprecated

Removed

Fixed

Security

Website

Added

Changed

Deprecated

Removed

Fixed

Security

Hosting

Added

Changed

Deprecated

Removed

Fixed

Security

@mergify

mergify Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

This pull request is closed, so it cannot be queued. Reopen it to get the box back.

@Prospector

Copy link
Copy Markdown
Member

Do not open slop PRs

@Prospector Prospector closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Shared instance: installing from an invite link fails with HTTP 403

2 participants