external-install: page shows app uninstalled but reinstall is blocked as if still installed
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 10m
- Merged PRs (30d)
- 635
Description
## Summary
On the external-install page, after an integration is uninstalled (or deletion fails silently — see related #112438), the UI correctly shows the app as uninstalled. However, attempting to reinstall it fails because the backend still considers the app installed. The UI state and backend state are out of sync.
## Steps to reproduce
1. Install a Sentry app integration via the external-install page
2. Uninstall the integration (e.g. via integration settings)
3. Return to the external-install page — it shows the app as uninstalled
4. Attempt to reinstall — the install flow fails or is blocked, as if the app is still installed
## Expected behavior
After a successful uninstall, reinstalling the app via the external-install page should succeed. If the backend still considers the app installed, the UI should reflect that state consistently rather than showing conflicting information.
## Actual behavior
- UI shows app as uninstalled
- Reinstall attempt is rejected by the backend (or the install flow silently fails)
- The user has no recourse or clear error message
## Root cause hypotheses
- **High confidence:** The uninstall hook never fired (backend installation record was not cleaned up), so the app remains installed in the database despite the UI treating it as gone — likely related to #112438 where deletion is slow and may not complete.
- **Medium confidence:** A race condition or async cleanup failure left a stale `SentryAppInstallation` record that blocks re-install.
## Related
- #112438 — Integration deletion is very slow on uninstall (possibly the root cause)
Action taken on behalf of David Cramer.
Contributor guide
Research direction
Start with the external-install page's uninstall and reinstall flow, then trace how the SentryAppInstallation record is cleaned up. Read related issue #112438 for the deletion-delay context. Done means a successful uninstall leaves UI and backend state consistent, and reinstall succeeds or reports a clear failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100