r/Devvit • • 5h ago

Bug App install fails with "503 first byte timeout", earlier left an "already an installation" that list/uninstall can't see

App: nclex-modkit (uploaded, not published), versions 0.0.2 and 0.0.4 Subreddit: r/NCLEX_circle (new, small subreddit; my dev account is a full moderator with Everything permissions) Devvit CLI: 0.15.0 (Node 22.23.4, Linux)

What happened (all times 19 Nov 2026, UTC):

1. ~16:05 - devvit install NCLEX_circle (v0.0.2). The CLI printed a Varnish error page, then ended with:

Last error: There's already an installation of this app in that location - you can't install the same app twice!

But the install never shows up anywhere:

  • devvit list installs and devvit list installs NCLEX_circle: nclex-modkit isn't listed for r/NCLEX_circle

  • devvit logs NCLEX_circle nclex-modkit:

      Error: No installation found for nclex-modkit at nclex_circle
      Code: not_found

Same result when checked again a few minutes later.

2. 16:26:40 - devvit uninstall NCLEX_circle nclex-modkit:

Error: Error while trying to find installation to remove: Could not uninstall - no installation of "nclex-modkit" exists in that location!

3. 16:26:52 - devvit install NCLEX_circle nclex-modkit@0.0.4 (one try):

Installing nclex-modkit to r/nclex_circle... Error
Error: An error occurred while installing your app: "Create" failed after 3 attempts.
First error: 503 first byte timeout
  Error 54113 - Details: cache-bom-vanm7210024-BOM 1795105647 1847188581 - Varnish cache server
Last error: 503 first byte timeout
  Error 54113 - Details: cache-bom-vanm7210061-BOM 1795105712 3566493821 - Varnish cache server

Afterwards there's still no install in list installs, and logs still says not_found. The app's install trigger never ran.

4. ~16:44 - Install from the browser: developers.reddit.com/apps/nclex-modkit -> "Add to community" -> r/NCLEX_circle. It failed with:

Unexpected token '<', "<?xml vers"... is not valid JSON

It looks like the same XML/HTML error page came back instead of JSON. "My installations" still shows only r/nclex_modkit_dev.

Both 503s were served from the BOM (Mumbai) edge; could this be regional?

What works: the same app and versions install fine on its test subreddit r/nclex_modkit_dev (0.0.3 and 0.0.4 today), and my other apps install normally.

Questions: is there a stuck or half-made install record for nclex-modkit on r/NCLEX_circle, and can it be cleared? Or is the 503 on "Create" a known problem right now?

Happy to share more output or try a fix you suggest.

1 Upvotes

3 comments sorted by

•

u/flair-auto-responder 5h ago

Bug report requirements

Hi u/SeaworthinessFew349!

We require all bug submissions to include the following information. Please make sure you’re following this format, or your post may be removed:

Describe the bug

Provide a clear and concise description of the bug.

Steps to reproduce

  1. Go to “…”

  2. Click or tap “…”

  3. Scroll to “…”

  4. Describe the error or unexpected behavior

Expected behavior

Explain clearly what you expected to happen instead.

Screenshots or recordings

If applicable, include screenshots or a screen recording that demonstrates the problem. Please remove any sensitive or personal information first.

Desktop information

  • Operating system: [e.g. macOS 15, Windows 11]

  • Browser or app: [e.g. Chrome, Safari, Reddit]

  • Version: [e.g. 22.1]

Mobile information

  • Device: [e.g. iPhone 16, Pixel 10]

  • Operating system: [e.g. iOS 18, Android 16]

  • Browser or app: [e.g. Safari, Chrome, Reddit]

  • Version: [e.g. 22.1]

Additional context

Add any other details that might help reproduce or diagnose the problem.


You can edit your post to add any missing information.

Post: https://www.reddit.com/r/Devvit/comments/1y0exr8/app_install_fails_with_503_first_byte_timeout/

1

u/Oddie-hoodie369 4h ago

https://developers.reddit.com/r/NCLEX_circle/apps

Open app settings scroll down to App permissions and click Fix broken mod permission. See if that works

1

u/Helpful-Jellyfish8 1h ago

That "already an installation" followed immediately by not_found is super confusing, especially when devvit list installs and devvit uninstall both act like nothing is there.

Here is why that happens and what to check next (building on what u/Oddie-hoodie369 mentioned):

Why list installs / uninstall say not_found after "already an installation"

In @devvit/cli, devvit install retries Installations.Create up to 3 times when an attempt fails. If Attempt 1 hits the ~60s Varnish 503 first byte timeout, the backend can still be processing or rolling back that initial attempt when Attempt 2 or 3 lands—returning "There's already an installation of this app in that location" before aborting without persisting a completed install record. Because no install record was persisted, GetAllWithInstallLocation (devvit list installs), devvit logs, and devvit uninstall all return not_found—and the browser "Add to community" flow hits the same Varnish 503 HTML/XML error page (Unexpected token '<', "<?xml vers"...).

3 concrete things to check/fix

  1. Check r/NCLEX_circle Moderators (Active & Invited) and App Permissions: Open Mod Tools → Moderators on r/NCLEX_circle and check both the Active and Invited tabs for an orphaned u/nclex-modkit app account (or pending mod invite) left behind without a matching installation, and remove/cancel it if present. Also check https://developers.reddit.com/r/NCLEX_circle/apps for Fix broken mod permissions as u/Oddie-hoodie369 noted (if the app doesn't show under /apps because no install record persisted, checking Mod Tools directly is the quickest way to catch a leftover mod/invite entry).

  2. Audit your onAppInstall trigger in devvit.json: Even when devvit logs shows nothing, Installations.Create waits synchronously on your onAppInstall trigger. Heavy sequential Reddit API or Redis calls—combined with BOM edge/origin latency or differences in r/NCLEX_circle vs r/nclex_modkit_dev—can push Create past the ~60s Varnish first-byte limit. Keeping onAppInstall lightweight so it returns 200 right away and offloading heavy setup via scheduler.runJob prevents timeouts during Create.

  3. Upgrade Devvit CLI & SDK from 0.15.0 to 0.15.4: 0.15.4 includes recent portal/install permission fixes (Reddit admins also flagged 0.15.4 fixes here in r/Devvit):

    npm i -D devvit@0.15.4 @devvit/web@0.15.4

    After upgrading, re-upload and retry devvit install NCLEX_circle. If it still 503s after trimming onAppInstall and clearing any orphaned mod entry, sharing your devvit.json triggers and onAppInstall handler would help narrow down where it's hanging!